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
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
在代码中 default 插槽或其他具名插槽的返回值总是 VNode[] 类型,这是否属于 vue 的标准行为。如果是的话为何没在文档中说明,不是的话什么情况下会出现例外
如果返回值是一个 VNode[] 类型的数组,那在类型定义中 const slots = defineSlots<{default: () => any}>()
const defaultSlot = slots?.default() 应该总是 undefined | VNode[]
Beta Was this translation helpful? Give feedback.
All reactions