You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
import{h,createApp,resolveComponent}from'vue'importantdfrom'ant-design-vue'consttitleSlot=()=>h('span',null,'submenu')// following causes typeErrorconstmenuItems=()=>[h(resolveComponent('a-menu-item'),{key: 1},{default: ()=>'item1'})]// following code causes warning, but no error// const menuItems = () => [// h(resolveComponent('a-menu-item'), {// key: 1// }, 'item1')// ]constapp=(props,ctx)=>h(resolveComponent('a-menu'),{mode: 'inline'},{default: ()=>[h(resolveComponent('a-sub-menu'),{},{default: menuItems,title: titleSlot})]})createApp(app).use(antd).mount('#app')
What is expected?
no error
What is actually happening?
Uncaught TypeError: children.forEach is not a function
at loopMenuItemRecursively (util.js:33)
at util.js:48
at Array.forEach (<anonymous>)
at loopMenuItemRecursively (util.js:33)
at Proxy.isChildrenSelected2 (SubMenu.js:200)
at Proxy.render39 (SubMenu.js:494)
at renderComponentRoot (runtime-core.esm-bundler.js:846)
at componentEffect (runtime-core.esm-bundler.js:4280)
at reactiveEffect (reactivity.esm-bundler.js:42)
at effect (reactivity.esm-bundler.js:17)
The text was updated successfully, but these errors were encountered:
Version
undefined
Environment
macOS Big Sur, Chrome 89
Reproduction link
https://github.com/Ljzn/vue3-default-slot-error/blob/main/src/main.js
Steps to reproduce
use default slot in
a-menu-item
, undera-sub-menu
What is expected?
no error
What is actually happening?
The text was updated successfully, but these errors were encountered: