Skip to content

vue版本ant-design-vue DatePicker组件不显示 #1468

Locked Answered by MisicDemone
yangshuwei asked this question in Q&A [2.x]
Discussion options

You must be logged in to vote
const DatePicker = (props, context) => h(ADatePicker, context.attrs);

当前将DatePicker包裹在一个没有children的函数式组件中可以解决这个问题。

产生原因是 DatePicker的实现中,默认的input组件能被插槽覆盖,而formily-vue始终为组件添加了默认插槽,但是这个插槽可能是空的。后续版本会提供更严谨的插槽支持能从根源解决该问题。

Replies: 3 comments 3 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
3 replies
@MisicDemone
Comment options

@yangshuwei
Comment options

@yangshuwei
Comment options

Comment options

You must be logged in to vote
0 replies
Answer selected by MisicDemone
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants