fix: replace input component in IconPicker (#5047)

* fix: replace input component in `IconPicker`

* chore: fixed IconPicker demo
This commit is contained in:
Netfan
2024-12-06 13:46:52 +08:00
committed by GitHub
parent f0db3d6b79
commit d1862fba27
6 changed files with 76 additions and 49 deletions

View File

@@ -88,7 +88,19 @@ async function initComponentAdapter() {
return h(ElButton, { ...props, attrs, type: 'primary' }, slots);
},
Divider: ElDivider,
IconPicker,
IconPicker: (props, { attrs, slots }) => {
return h(
IconPicker,
{
iconSlot: 'append',
modelValueProp: 'model-value',
inputComponent: ElInput,
...props,
...attrs,
},
slots,
);
},
Input: withDefaultPlaceholder(ElInput, 'input'),
InputNumber: withDefaultPlaceholder(ElInputNumber, 'input'),
RadioGroup: ElRadioGroup,