修复 IconSelect 报错

(cherry picked from commit f436490165)
This commit is contained in:
YunaiV 2023-04-13 21:11:55 +08:00 committed by shizhong
parent 520292c902
commit 0da3c00dea

View File

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