Skip to content

Commit a8e73be

Browse files
committed
fix: 优化点击事件处理,避免对禁用项的响应
1 parent efb673a commit a8e73be

File tree

1 file changed

+6
-1
lines changed
  • packages/element-x-ui/src/components/Prompts

1 file changed

+6
-1
lines changed

packages/element-x-ui/src/components/Prompts/main.vue

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,12 @@ export default {
213213
},
214214
215215
handleItemClick(info) {
216-
if (this.onItemClick && !info.disabled) {
216+
if (info.disabled) {
217+
return;
218+
}
219+
this.$emit('on-item-click', { data: info });
220+
// 向后兼容性
221+
if (this.onItemClick) {
217222
this.onItemClick({ data: info });
218223
}
219224
}

0 commit comments

Comments
 (0)