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

[Component] [checkbox] 使用 h 函数渲染 ElCheckbox 组件时,组件选中样式不能被改变 #16760

Closed
lin52025iq opened this issue May 6, 2024 · 2 comments

Comments

@lin52025iq
Copy link

Bug Type: Component

Environment

  • Vue Version: 3.4.26
  • Element Plus Version: 2.7.2
  • Browser / OS: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0.0.0 Safari/537.36
  • Build Tool: Other

Reproduction

Related Component

  • el-checkbox

Reproduction Link

Element Plus Playground

Steps to reproduce

进入复现 playground,分别点击 checkbox1 和 checkbox2,观察 checkbox1 勾选框状态

What is Expected?

当 checked 为 true 时,checkbox1 的勾选框为选中状态

What is actually happening?

checked 为 true 时,checkbox 的勾选框还是未选中

Additional comments

在 playground 环境中,不管是切换 checkbox1 还是切换 checkbox2,checkbox1 的勾选状态均不会改变,但相同的代码在 element-plus 的开发环境(element-plus/play/src/App.vue)中,切换 checkbox1 后,checkbox1 的勾选状态会发生改变,但勾选 checkbox2 时 checkbox1 的勾选状态不会改变

@Liao-js
Copy link
Contributor

Liao-js commented May 6, 2024

你可以看下这个 demo

@lin52025iq
Copy link
Author

感谢感谢,学习了

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

No branches or pull requests

2 participants