实现结果总览详情弹窗前端接线
This commit is contained in:
@@ -39,11 +39,11 @@
|
||||
<div v-if="sidebarData.modelSummary.riskTags.length" class="tag-list">
|
||||
<el-tag
|
||||
v-for="(tag, index) in sidebarData.modelSummary.riskTags"
|
||||
:key="`${tag}-${index}`"
|
||||
:key="`${formatRiskTag(tag)}-${index}`"
|
||||
size="mini"
|
||||
effect="plain"
|
||||
>
|
||||
{{ tag }}
|
||||
{{ formatRiskTag(tag) }}
|
||||
</el-tag>
|
||||
</div>
|
||||
<span v-else class="sidebar-field__value">暂无异常标签</span>
|
||||
@@ -72,6 +72,17 @@ export default {
|
||||
}),
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
formatRiskTag(tag) {
|
||||
if (typeof tag === "string") {
|
||||
return tag;
|
||||
}
|
||||
if (tag && typeof tag === "object") {
|
||||
return tag.ruleName || tag.label || tag.name || "";
|
||||
}
|
||||
return "";
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user