mirror of
https://github.com/vbenjs/vue-vben-admin.git
synced 2025-08-25 16:16:20 +08:00
fix(PopConfirmButton): avoid type lint error (#3600)
This commit is contained in:
@@ -38,8 +38,9 @@
|
|||||||
});
|
});
|
||||||
|
|
||||||
return () => {
|
return () => {
|
||||||
const bindValues = omit(unref(getBindValues), 'icon');
|
// 用 omit 剔除一些已知可能导致异常的属性
|
||||||
const btnBind = omit(bindValues, 'title') as any;
|
const bindValues = omit(unref(getBindValues), 'icon', 'color');
|
||||||
|
const btnBind = omit(unref(getBindValues), 'title') as any;
|
||||||
if (btnBind.disabled) btnBind.color = '';
|
if (btnBind.disabled) btnBind.color = '';
|
||||||
const Button = h(BasicButton, btnBind, extendSlots(slots));
|
const Button = h(BasicButton, btnBind, extendSlots(slots));
|
||||||
|
|
||||||
@@ -47,9 +48,6 @@
|
|||||||
if (!props.enable) {
|
if (!props.enable) {
|
||||||
return Button;
|
return Button;
|
||||||
}
|
}
|
||||||
if (bindValues.color) {
|
|
||||||
delete bindValues.color;
|
|
||||||
}
|
|
||||||
return h(Popconfirm, bindValues, { default: () => Button });
|
return h(Popconfirm, bindValues, { default: () => Button });
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
Reference in New Issue
Block a user