File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
src/components/Table/src/components/editable Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change 11import type { BasicColumn } from '/@/components/Table/src/types/table' ;
22
3- import { h , Ref } from 'vue' ;
3+ import { h , Ref , toRaw } from 'vue' ;
44
55import EditableCell from './EditableCell.vue' ;
66import { isArray } from '/@/utils/is' ;
@@ -13,7 +13,7 @@ interface Params {
1313
1414export function renderEditCell ( column : BasicColumn ) {
1515 return ( { text : value , record, index } : Params ) => {
16- record . onValid = async ( ) => {
16+ toRaw ( record ) . onValid = async ( ) => {
1717 if ( isArray ( record ?. validCbs ) ) {
1818 const validFns = ( record ?. validCbs || [ ] ) . map ( ( fn ) => fn ( ) ) ;
1919 const res = await Promise . all ( validFns ) ;
@@ -23,7 +23,7 @@ export function renderEditCell(column: BasicColumn) {
2323 }
2424 } ;
2525
26- record . onEdit = async ( edit : boolean , submit = false ) => {
26+ toRaw ( record ) . onEdit = async ( edit : boolean , submit = false ) => {
2727 if ( ! submit ) {
2828 record . editable = edit ;
2929 }
You can’t perform that action at this time.
0 commit comments