fix(PopConfirmButton): avoid type lint error (#3600)

This commit is contained in:
xachary 2024-02-19 11:26:20 +08:00 committed by GitHub
parent 236ddf3471
commit 5ec4446443
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 5 deletions

View File

@ -38,8 +38,9 @@
});
return () => {
const bindValues = omit(unref(getBindValues), 'icon');
const btnBind = omit(bindValues, 'title') as any;
// omit
const bindValues = omit(unref(getBindValues), 'icon', 'color');
const btnBind = omit(unref(getBindValues), 'title') as any;
if (btnBind.disabled) btnBind.color = '';
const Button = h(BasicButton, btnBind, extendSlots(slots));
@ -47,9 +48,6 @@
if (!props.enable) {
return Button;
}
if (bindValues.color) {
delete bindValues.color;
}
return h(Popconfirm, bindValues, { default: () => Button });
};
},