Merge pull request 'fix : 修复tag组件' (#53) from dd into master
Reviewed-on: http://git.feashow.cn/feashow/SmartOpsWeb/pulls/53
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
<template>
|
||||
<div class="tag-style">
|
||||
<el-tag v-if="tagConfig.isType" :type="tagConfig.listClass" :effect="tagConfig.theme || 'plain'">
|
||||
<el-tag v-if="tagConfig?.isType" :type="tagConfig?.listClass" :effect="tagConfig?.theme || 'plain'">
|
||||
{{ filterDict(cacheStore.getDict(dictType), value) }}
|
||||
</el-tag>
|
||||
<el-tag v-else :color="tagConfig.listClass" :effect="tagConfig.theme || 'plain'"
|
||||
<el-tag v-else :color="tagConfig?.listClass" :effect="tagConfig?.theme || 'plain'"
|
||||
:class="{'null-tag':filterDict(cacheStore.getDict(dictType), value)===undefined}">
|
||||
{{ filterDict(cacheStore.getDict(dictType), value) }}
|
||||
</el-tag>
|
||||
@@ -45,7 +45,7 @@ const filterDict = (data, value) => {
|
||||
tagConfig.value = data.find(item => item.value == value)
|
||||
}
|
||||
}
|
||||
return tagConfig.value.label
|
||||
return tagConfig.value?.label || '未知'
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user