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

[BUG] - Button按钮组件的源码中v-bind了useAttrs,未关闭组件的Attributes 继承,导致属性重复 #183

Open
5 tasks done
euwei7 opened this issue Jun 12, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@euwei7
Copy link

euwei7 commented Jun 12, 2023

Describe the bug

我大概浏览了一下Button的实现方式,发现源码中的v-bind有问题。
如果binds合并了useAttrs(),那应该关闭组件的Attributes 继承,否则会导致属性重复。

问题代码:

// button.vue
const binds = Object.assign({}, useAttrs(), props.to ? { href: props.to } : {})

Reproduction

Playground

System Info

No response

Used Package Manager

npm

Validations

@euwei7 euwei7 added the bug Something isn't working label Jun 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant