fix(table): fix edit-table not work
This commit is contained in:
parent
a2c89d2e84
commit
c031163f34
|
|
@ -148,16 +148,10 @@
|
|||
});
|
||||
|
||||
watchEffect(() => {
|
||||
console.log('======================');
|
||||
console.log(1);
|
||||
console.log('======================');
|
||||
defaultValueRef.value = props.value;
|
||||
});
|
||||
|
||||
watchEffect(() => {
|
||||
console.log('======================');
|
||||
console.log(2);
|
||||
console.log('======================');
|
||||
const { editable } = props.column;
|
||||
if (isBoolean(editable) || isBoolean(unref(getRowEditable))) {
|
||||
isEdit.value = !!editable || unref(getRowEditable);
|
||||
|
|
|
|||
|
|
@ -117,7 +117,8 @@ export function useColumns(
|
|||
}
|
||||
const { ellipsis } = unref(propsRef);
|
||||
|
||||
columns.forEach((item) => {
|
||||
const cloneColumns = cloneDeep(columns);
|
||||
cloneColumns.forEach((item) => {
|
||||
const { customRender, slots } = item;
|
||||
|
||||
handleItem(
|
||||
|
|
@ -125,7 +126,7 @@ export function useColumns(
|
|||
Reflect.has(item, 'ellipsis') ? !!item.ellipsis : !!ellipsis && !customRender && !slots
|
||||
);
|
||||
});
|
||||
return columns;
|
||||
return cloneColumns;
|
||||
});
|
||||
|
||||
const getViewColumns = computed(() => {
|
||||
|
|
@ -152,7 +153,7 @@ export function useColumns(
|
|||
column.customRender = renderEditCell(column);
|
||||
}
|
||||
});
|
||||
return viewColumns;
|
||||
return columns;
|
||||
});
|
||||
|
||||
watch(
|
||||
|
|
|
|||
Loading…
Reference in New Issue