mirror of
https://github.com/continew-org/continew-admin-ui.git
synced 2025-11-07 02:57:11 +08:00
chore: 优化字典重复请求问题
This commit is contained in:
@@ -25,8 +25,13 @@ const props = defineProps({
|
||||
}
|
||||
})
|
||||
|
||||
const dictItem = computed(() =>
|
||||
props.dict.find((d) => d.value === String(props.value) || d.value === Number(props.value))
|
||||
const dictItem = computed(() => {
|
||||
try {
|
||||
return props.dict.find((d) => d.value === String(props.value) || d.value === Number(props.value))
|
||||
} catch (error) {
|
||||
return []
|
||||
}
|
||||
}
|
||||
)
|
||||
</script>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user