提交 | 用户 | 时间
|
759b1c
|
1 |
<template> |
H |
2 |
<span> |
|
3 |
<template v-for="(dict, index) in this.getDictDatas2(type, value)"> |
|
4 |
<!-- 默认样式 --> |
|
5 |
<span v-if="dict.colorType === 'default' || dict.colorType === '' || dict.colorType === undefined" :key="dict.value" :index="index" |
|
6 |
:class="dict.cssClass">{{ dict.label }}</span> |
|
7 |
<!-- Tag 样式 --> |
|
8 |
<el-tag v-else :disable-transitions="true" :key="dict.value" :index="index" :type="dict.colorType" :class="dict.cssClass"> |
|
9 |
{{ dict.label }} |
|
10 |
</el-tag> |
|
11 |
</template> |
|
12 |
</span> |
|
13 |
</template> |
|
14 |
|
|
15 |
<script> |
|
16 |
export default { |
|
17 |
name: "DictTag", |
|
18 |
props: { |
|
19 |
type: String, |
|
20 |
value: [Number, String, Boolean, Array], |
|
21 |
}, |
|
22 |
}; |
|
23 |
</script> |
|
24 |
<style scoped> |
|
25 |
.el-tag + .el-tag { |
|
26 |
margin-left: 10px; |
|
27 |
} |
|
28 |
</style> |