mirror of
https://github.com/yangzongzhuan/RuoYi-Vue3.git
synced 2025-12-17 06:55:56 +00:00
优化字典组件数字类型值处理逻辑
This commit is contained in:
@@ -49,6 +49,7 @@ const props = defineProps({
|
|||||||
|
|
||||||
const values = computed(() => {
|
const values = computed(() => {
|
||||||
if (props.value === null || typeof props.value === 'undefined' || props.value === '') return []
|
if (props.value === null || typeof props.value === 'undefined' || props.value === '') return []
|
||||||
|
if (typeof props.value === 'number' || typeof props.value === 'boolean') return [props.value]
|
||||||
return Array.isArray(props.value) ? props.value.map(item => '' + item) : String(props.value).split(props.separator)
|
return Array.isArray(props.value) ? props.value.map(item => '' + item) : String(props.value).split(props.separator)
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user