fix: 修复 IconPicker 在手动输入时表单值不更新的问题 (#7869)

- 修复 IconPicker.vue 在 updateCurrentSelect 时未同步更新 modelValue 的 Bug
- 优化 IconPicker 适配器配置,使其兼容 Element Plus 的 ElInput 组件
master^2
boisduval 2026-04-30 15:46:07 +08:00 committed by GitHub
parent e8dc464e79
commit c0b2ef980e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 0 deletions

View File

@ -147,6 +147,9 @@ const searchInputProps = computed(() => {
function updateCurrentSelect(v: string) {
currentSelect.value = v;
if (props.modelValueProp === 'modelValue') {
modelValue.value = v;
}
const eventKey = `onUpdate:${props.modelValueProp}`;
if (attrs[eventKey] && isFunction(attrs[eventKey])) {
attrs[eventKey](v);