Skip to content
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

当Dialog作为组件使用时,控制台弹出警告且组件工作异常 #11036

Closed
leostou-cn opened this issue Sep 11, 2022 · 2 comments
Closed

Comments

@leostou-cn
Copy link

重现链接

https://gitee.com/leostou/toutiao

Vant 版本

3.6.1

描述一下你遇到的问题。

环境描述:在vue3项目下,组件使用unplugin-vue-components自动导入,js代码使用setup语法糖,Dialog代码复制官网案例。
案例代码:
image

bug表现:v-model:show 的值无论是true或者false,当当前组件渲染时都自动展示Dialog,且无法渲染插槽内容
image

控制台警告:

  1. [Vue warn]: Extraneous non-props attributes (show, title, show-cancel-button) were passed to component but could not be automatically inherited because component renders fragment or text root nodes.
  2. [Vue warn]: Invalid VNode type: undefined (undefined)
    image

重现步骤

  1. 登录
  2. 切换到个人
  3. 点击编辑资料

设备/浏览器

Chrome@ 100.0.4896.127

@chenjiahan
Copy link
Member

参见 #10858

@leostou-cn
Copy link
Author

参见 #10858

感谢!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants