From a4ee6ba0ca28833cbbb8cf0e675561b10fa4c1af Mon Sep 17 00:00:00 2001
From: Ben Lin <maobin001@msn.com>
Date: 星期四, 12 九月 2024 01:23:40 +0800
Subject: [PATCH] 规则维护更新

---
 src/components/Table/src/components/editable/index.ts |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/src/components/Table/src/components/editable/index.ts b/src/components/Table/src/components/editable/index.ts
index 4f7d4da..75b4ebf 100644
--- a/src/components/Table/src/components/editable/index.ts
+++ b/src/components/Table/src/components/editable/index.ts
@@ -1,9 +1,9 @@
-import type { BasicColumn } from '/@/components/Table/src/types/table';
+import type { BasicColumn } from '@/components/Table/src/types/table';
 
-import { h, Ref } from 'vue';
+import { h, Ref, toRaw } from 'vue';
 
 import EditableCell from './EditableCell.vue';
-import { isArray } from '/@/utils/is';
+import { isArray } from '@/utils/is';
 
 interface Params {
   text: string;
@@ -13,7 +13,7 @@
 
 export function renderEditCell(column: BasicColumn) {
   return ({ text: value, record, index }: Params) => {
-    record.onValid = async () => {
+    toRaw(record).onValid = async () => {
       if (isArray(record?.validCbs)) {
         const validFns = (record?.validCbs || []).map((fn) => fn());
         const res = await Promise.all(validFns);
@@ -23,7 +23,7 @@
       }
     };
 
-    record.onEdit = async (edit: boolean, submit = false) => {
+    toRaw(record).onEdit = async (edit: boolean, submit = false) => {
       if (!submit) {
         record.editable = edit;
       }

--
Gitblit v1.9.3