mirror of
https://github.com/continew-org/continew-admin-ui.git
synced 2025-11-07 02:57:11 +08:00
refactor:优化部分警告
This commit is contained in:
@@ -25,14 +25,15 @@ const props = defineProps({
|
||||
}
|
||||
})
|
||||
|
||||
const dictItem = computed(() => {
|
||||
const dictItem = computed((): LabelValueState => {
|
||||
try {
|
||||
return props.dict.find((d) => d.value === String(props.value) || d.value === Number(props.value))
|
||||
return props.dict.find(
|
||||
(d) => d.value === String(props.value) || d.value === Number(props.value)
|
||||
) || { label: '', value: '' }
|
||||
} catch (error) {
|
||||
return []
|
||||
return { label: '', value: '' }
|
||||
}
|
||||
}
|
||||
)
|
||||
})
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped></style>
|
||||
|
||||
Reference in New Issue
Block a user