diff --git a/components/menu/demo/inline.vue b/components/menu/demo/inline.vue index fcfdbb831..86e600db4 100644 --- a/components/menu/demo/inline.vue +++ b/components/menu/demo/inline.vue @@ -86,12 +86,9 @@ export default defineComponent({ const titleClick = (e: Event) => { console.log('titleClick', e); }; - watch( - () => openKeys, - val => { - console.log('openKeys', val); - }, - ); + watch(openKeys, val => { + console.log('openKeys', val); + }); return { selectedKeys, openKeys, diff --git a/components/table/hooks/useColumns.tsx b/components/table/hooks/useColumns.tsx index 8aed4d259..aab022e25 100644 --- a/components/table/hooks/useColumns.tsx +++ b/components/table/hooks/useColumns.tsx @@ -37,7 +37,7 @@ function fillSlots(columns: ColumnsType, contextSlots: R () => [column.title as any], ); } - if ('children' in cloneColumn) { + if ('children' in cloneColumn && Array.isArray(cloneColumn.children)) { cloneColumn.children = fillSlots(cloneColumn.children, contextSlots); }