mirror of
https://github.com/imdap/ruoyi-plus-vben5.git
synced 2026-05-11 21:42:09 +08:00
fix bug
[Vue warn]: Invalid prop: custom validator check failed for prop "variant".
This commit is contained in:
@@ -165,7 +165,17 @@ async function initComponentAdapter() {
|
|||||||
DatePicker,
|
DatePicker,
|
||||||
// 自定义默认按钮
|
// 自定义默认按钮
|
||||||
DefaultButton: (props, { attrs, slots }) => {
|
DefaultButton: (props, { attrs, slots }) => {
|
||||||
return h(Button, { ...props, attrs, theme: 'default' }, slots);
|
let ghost = false;
|
||||||
|
let variant = props.variant;
|
||||||
|
if (props.variant === 'ghost') {
|
||||||
|
ghost = true;
|
||||||
|
variant = 'base';
|
||||||
|
}
|
||||||
|
return h(
|
||||||
|
Button,
|
||||||
|
{ ...props, ghost, variant, attrs, theme: 'default' },
|
||||||
|
slots,
|
||||||
|
);
|
||||||
},
|
},
|
||||||
Divider,
|
Divider,
|
||||||
IconPicker: withDefaultPlaceholder(IconPicker, 'select', {
|
IconPicker: withDefaultPlaceholder(IconPicker, 'select', {
|
||||||
|
|||||||
Reference in New Issue
Block a user