fix: passing a non-array as children to a table will result in an error. (#6521)
* fix: fix table column data is passed into chlidren is undefined or null errorr * chore(menu): fix menu inline demo watch not triggerpull/6524/head
parent
3b37cc1ae7
commit
045193e797
|
@ -86,12 +86,9 @@ export default defineComponent({
|
||||||
const titleClick = (e: Event) => {
|
const titleClick = (e: Event) => {
|
||||||
console.log('titleClick', e);
|
console.log('titleClick', e);
|
||||||
};
|
};
|
||||||
watch(
|
watch(openKeys, val => {
|
||||||
() => openKeys,
|
console.log('openKeys', val);
|
||||||
val => {
|
});
|
||||||
console.log('openKeys', val);
|
|
||||||
},
|
|
||||||
);
|
|
||||||
return {
|
return {
|
||||||
selectedKeys,
|
selectedKeys,
|
||||||
openKeys,
|
openKeys,
|
||||||
|
|
|
@ -37,7 +37,7 @@ function fillSlots<RecordType>(columns: ColumnsType<RecordType>, contextSlots: R
|
||||||
() => [column.title as any],
|
() => [column.title as any],
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
if ('children' in cloneColumn) {
|
if ('children' in cloneColumn && Array.isArray(cloneColumn.children)) {
|
||||||
cloneColumn.children = fillSlots(cloneColumn.children, contextSlots);
|
cloneColumn.children = fillSlots(cloneColumn.children, contextSlots);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue