[BUG] - Button按钮组件的源码中v-bind了useAttrs,未关闭组件的Attributes 继承,导致属性重复
euwei7 opened this issue · comments
Euwei commented
Describe the bug
我大概浏览了一下Button的实现方式,发现源码中的v-bind有问题。
如果binds合并了useAttrs(),那应该关闭组件的Attributes 继承,否则会导致属性重复。
问题代码:
// button.vue
const binds = Object.assign({}, useAttrs(), props.to ? { href: props.to } : {})
Reproduction
System Info
No response
Used Package Manager
npm
Validations
- Read the Contributing Guidelines.
- Read the docs.
- Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
- Make sure this is a OnuUI issue and not a framework-specific issue. For example, if it's a Vue SFC related bug, it should likely be reported to https://github.com/vuejs/core instead.
- The provided reproduction is a minimal reproducible example of the bug.