Element UI version
2.15.10
OS/Browsers version
105.0.5195.127
Vue version
2.7.13
Reproduction Link
https://codepen.io/LIDINGYUAN/pen/zYaqLwb
Steps to reproduce
点击click me 按钮 should be disabled按钮应是disabled状态
What is Expected?
正常disabled
What is actually happening?
el-button组件复用时由于
buttonDisabled() {
return this.$options.propsData.hasOwnProperty('disabled') ? this.disabled : (this.elForm || {}).disabled;
}
此计算属性在首次依赖收集时未收集到this.disabled依赖,导致buttonDisabled对this.disabled不再响应
2条答案
按热度按时间e4eetjau1#
可以通过给 button 加唯一的key解决
h79rfbju2#
👍 I confirm the bug, happens also on Vue
v2.6.14
and also Vuev2.7.14
(last version as of today)