refactor(DictTag): 简化配置检查逻辑并修复选项返回
修复 MmMaterialCategory 中状态选项的值类型,将数字改为字符串以保持一致性
This commit is contained in:
@@ -46,7 +46,7 @@ const props = defineProps({
|
||||
}
|
||||
})
|
||||
const dataList = computed(() => {
|
||||
if (props.config && typeof props.config === 'object' && props.config.label && props.config.value && props.options) {
|
||||
if (props.config) {
|
||||
let config = props.config
|
||||
var newList = []
|
||||
|
||||
@@ -58,7 +58,7 @@ const dataList = computed(() => {
|
||||
}
|
||||
return newList
|
||||
}
|
||||
return props.options || []
|
||||
return props.options
|
||||
})
|
||||
const values = computed(() => {
|
||||
if (props.value !== null && typeof props.value !== 'undefined') {
|
||||
|
||||
Reference in New Issue
Block a user