From b341867731286e7ebfa1bc5fd8f699c780d232a4 Mon Sep 17 00:00:00 2001
From: wente <329538422@qq.com>
Date: 星期四, 16 十一月 2023 17:41:45 +0800
Subject: [PATCH] 项目表
---
web/packages/components/zt-dict-tag/src/zt-dict-tag.vue | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/web/packages/components/zt-dict-tag/src/zt-dict-tag.vue b/web/packages/components/zt-dict-tag/src/zt-dict-tag.vue
index 0eca5ed..a294a2c 100644
--- a/web/packages/components/zt-dict-tag/src/zt-dict-tag.vue
+++ b/web/packages/components/zt-dict-tag/src/zt-dict-tag.vue
@@ -32,7 +32,8 @@
data() {
return {
tagType: 'primary',
- tagColor: ''
+ tagColor: '',
+ colorArr:['primary','success','info','warning','danger']
}
},
mounted() {
@@ -41,6 +42,7 @@
methods: {
async init() {
let value = this.value + ''
+
if (this.typeS && this.typeS.split(',').indexOf(value) >= 0) {
this.tagType = 'success'
}
@@ -58,7 +60,9 @@
}
if (!this.typeS && !this.typeI && !this.typeW && !this.typeD && !this.typeColor) { // 娌℃湁鎸囧畾棰滆壊
if (this.value === false || this.value === 0 || this.value === '0' || this.value === 'false') {
- this.tagType = 'info'
+ this.tagType = 'primary'
+ }else{
+ this.tagType = this.colorArr[this.value%5]
}
}
}
--
Gitblit v1.9.1