Skip to content

自定义组件让slot为空,tempate 必须写一个标签。 #6024

Description

@ranmin69

问题描述
自定义组件让slot为空,tempate 必须写一个标签。
Vue3 + Vite + TS

之前版本用 <template #footer /> 这么写,就能置空组件中的 footer slot 中的内容。

新版本 vue3 这么写失效了,只能 <template #footer ><div></div></template> 才能清空slot中的内容。

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions