소스 검색

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

- 修复 IconPicker.vue 在 updateCurrentSelect 时未同步更新 modelValue 的 Bug
- 优化 IconPicker 适配器配置,使其兼容 Element Plus 的 ElInput 组件
boisduval 1 개월 전
부모
커밋
c0b2ef980e
1개의 변경된 파일3개의 추가작업 그리고 0개의 파일을 삭제
  1. 3 0
      packages/effects/common-ui/src/components/icon-picker/icon-picker.vue

+ 3 - 0
packages/effects/common-ui/src/components/icon-picker/icon-picker.vue

@@ -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);