Skip to content

使用Form.create()修饰组件之后,组件的slots丢失 #1998

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
1 task
JobinJia opened this issue Apr 1, 2020 · 2 comments
Closed
1 task

使用Form.create()修饰组件之后,组件的slots丢失 #1998

JobinJia opened this issue Apr 1, 2020 · 2 comments
Labels

Comments

@JobinJia
Copy link
Contributor

JobinJia commented Apr 1, 2020

  • I have searched the issues of this repository and believe that this is not a duplicate.

Version

undefined

Environment

mac Os catalina 10.15.4/ chrome 80.0.3987.149 (正式版本) (64 位)/ vue 2.5.17

Reproduction link

Edit on CodeSandbox

Steps to reproduce

参见重现链接
在components/search.js中
如果 使用 Form.create({})(Search) 则render时打印this.$slots对象为空
如果 不使用Form.cretae()则能正常打印this.$slots并渲染slots中的内容

What is expected?

使用Form.create修饰时能正常的传递自定义的slots

What is actually happening?

使用Form.create修饰时不能传递自定义slots

@tangjinzhou
Copy link
Member

tangjinzhou commented Apr 1, 2020

先使用 createForm 吧

@github-actions
Copy link

github-actions bot commented Apr 2, 2021

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 2, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants