🐛fix dict-tag组件split为null报错
This commit is contained in:
parent
beb98ce525
commit
0797a69b9a
@ -35,10 +35,12 @@ const props = defineProps({
|
||||
})
|
||||
|
||||
const values = computed(() => {
|
||||
if (props.value !== null && typeof props.value !== 'undefined') {
|
||||
if (props.split != null && props.split != '') {
|
||||
return props.value.split(props.split) ?? []
|
||||
} else if (props.value !== null && typeof props.value !== 'undefined') {
|
||||
} else {
|
||||
return Array.isArray(props.value) ? props.value : [String(props.value)]
|
||||
}
|
||||
} else {
|
||||
return []
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user