Prechádzať zdrojové kódy

修复 IconSelect 报错

YunaiV 2 rokov pred
rodič
commit
f436490165
1 zmenil súbory, kde vykonal 1 pridanie a 1 odobranie
  1. 1 1
      src/components/Icon/src/IconSelect.vue

+ 1 - 1
src/components/Icon/src/IconSelect.vue

@@ -95,7 +95,7 @@ watch(
     return props.modelValue
   },
   () => {
-    if (props.modelValue && props.modelValue.contains(':')) {
+    if (props.modelValue && props.modelValue.indexOf(':') >= 0) {
       currentActiveType.value = props.modelValue.substring(0, props.modelValue.indexOf(':') + 1)
       icon.value = props.modelValue.substring(props.modelValue.indexOf(':') + 1)
     }