mirror of
https://github.com/yangzongzhuan/RuoYi-Vue3.git
synced 2025-06-07 10:49:30 +00:00
优化字典数组条件判断
This commit is contained in:
parent
7507a187aa
commit
341e3be3a9
@ -55,7 +55,7 @@ const values = computed(() => {
|
||||
const unmatch = computed(() => {
|
||||
unmatchArray.value = [];
|
||||
// 没有value不显示
|
||||
if (props.value === null || typeof props.value === 'undefined' || props.value === '' || props.options.length === 0) return false
|
||||
if (props.value === null || typeof props.value === 'undefined' || props.value === '' || !Array.isArray(props.options) || props.options.length === 0) return false
|
||||
// 传入值为数组
|
||||
let unmatch = false // 添加一个标志来判断是否有未匹配项
|
||||
values.value.forEach(item => {
|
||||
|
Loading…
Reference in New Issue
Block a user