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

@@ -89,7 +89,13 @@ async function initComponentAdapter() {
return h(NButton, { ...props, attrs, type: 'primary' }, slots);
},
Divider: NDivider,
IconPicker,
IconPicker: (props, { attrs, slots }) => {
return h(
IconPicker,
{ iconSlot: 'suffix', inputComponent: NInput, ...props, ...attrs },
slots,
);
},
Input: withDefaultPlaceholder(NInput, 'input'),
InputNumber: withDefaultPlaceholder(NInputNumber, 'input'),
RadioGroup: NRadioGroup,