提交 c031163f 编写于 作者: V vben

fix(table): fix edit-table not work

上级 a2c89d2e
......@@ -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(
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册