From 02e1a2fe30788cb356ecc898ea3c0b563ca54d63 Mon Sep 17 00:00:00 2001
From: shuishen <1109946754@qq.com>
Date: Wed, 17 Jan 2024 19:05:00 +0800
Subject: [PATCH] 标签颜色调整

---
 src/views/userHouse/houseList.vue |   17 +++++++++++------
 1 files changed, 11 insertions(+), 6 deletions(-)

diff --git a/src/views/userHouse/houseList.vue b/src/views/userHouse/houseList.vue
index 0432f21..69c1039 100644
--- a/src/views/userHouse/houseList.vue
+++ b/src/views/userHouse/houseList.vue
@@ -52,8 +52,8 @@
 
                 <el-dialog title="标签管理" append-to-body :visible.sync="labelFlag" center width="600px">
                     <div id="" class="grid-container2">
-                        <div class="grid-item" :style="{ backgroundColor: item.color }" v-for="(item, index) in labelData"
-                            :key="index" @click="changLabel(item)">
+                        <div class="grid-item" v-for="(item, index) in labelData" :key="index" @click="changLabel(item)">
+                            {{ item.color }}
                             {{ item.name }}
                         </div>
                     </div>
@@ -92,6 +92,8 @@
 </template>
 
 <script>
+import { setLabelColor } from '@/util/util'
+
 import {
     getList,
     remove,
@@ -162,18 +164,15 @@
                     row: true,
                     dicData: [{
                         label: '撤销',
-                        // value: '#EBEDF0'
+                        value: '#999'
                     }, {
                         label: '绿',
-                        // value: '#30D17C'
                         value: 'green'
                     }, {
                         label: '黄',
-                        // value: '#FFB42B'
                         value: 'yellow'
                     }, {
                         label: '红',
-                        // value: '#EA1F1F'
                         value: 'red'
                     }],
                     rules: [{
@@ -512,6 +511,12 @@
             return (list) => {
                 return list.map(item => item.labelName).join(',')
             }
+        },
+
+        getColor () {
+            return (data) => {
+                return setLabelColor(data)
+            }
         }
     },
     mounted () { },

--
Gitblit v1.9.3