Sfoglia il codice sorgente

主题色集中统一

zhangliang2 3 anni fa
parent
commit
fabf26e623

+ 7 - 2
src/components/echarts/lineChartMainPage.vue

@@ -8,6 +8,7 @@
 
 <script>
 import echarts from "echarts";
+import { mapState } from "vuex";
 
 export default {
     name: "lineChartMainPage",
@@ -39,6 +40,10 @@ export default {
         },
     },
 
+    computed: {
+        ...mapState(["themeColor"]),
+    },
+
     methods: {
         initStateList() {
             let xData = [];
@@ -85,7 +90,7 @@ export default {
                         lineStyle: {
                             normal: {
                                 width: 1.5,
-                                color: "#3397FF",
+                                color: this.themeColor,
                             },
                         },
                         areaStyle: {
@@ -108,7 +113,7 @@ export default {
                         },
                         itemStyle: {
                             normal: {
-                                color: "#3397FF",
+                                color: this.themeColor,
                             },
                         },
                     },

+ 8 - 3
src/components/echarts/lineChartMainPageA.vue

@@ -8,6 +8,7 @@
 
 <script>
 import echarts from "echarts";
+import { mapState } from "vuex";
 
 export default {
     name: "lineChartMainPageA",
@@ -39,6 +40,10 @@ export default {
         },
     },
 
+    computed: {
+        ...mapState(["themeColor"]),
+    },
+
     methods: {
         initStateList() {
             let xData = [];
@@ -96,7 +101,7 @@ export default {
                         lineStyle: {
                             normal: {
                                 width: 1.5,
-                                color: "#3397FF",
+                                color: this.themeColor,
                             },
                         },
                         areaStyle: {
@@ -124,8 +129,8 @@ export default {
                                 // label: {
                                 //     show: true,
                                 // },
-                                // borderColor: "#3397FF", // 拐点边框颜色
-                                color: "#3397FF",
+                                // borderColor: this.themeColor, // 拐点边框颜色
+                                color: this.themeColor,
                                 lineStyle: {
                                     // width: 3, // 设置线宽
                                     // type: "dotted", //'dotted'虚线 'solid'实线

+ 8 - 2
src/components/echarts/lineChartTaskInfo.vue

@@ -3,6 +3,8 @@
 </template>
 
 <script>
+import { mapState } from "vuex";
+
 export default {
     name: "lineChartTaskInfo",
     props: {
@@ -44,6 +46,10 @@ export default {
         },
     },
 
+    computed: {
+        ...mapState(["themeColor"]),
+    },
+
     methods: {
         initStateList() {
             let xData = this.xList;
@@ -91,12 +97,12 @@ export default {
                         lineStyle: {
                             normal: {
                                 width: 1.5,
-                                color: "#3397FF",
+                                color: this.themeColor,
                             },
                         },
                         itemStyle: {
                             normal: {
-                                color: "#3397FF",
+                                color: this.themeColor,
                             },
                         },
                     },

+ 8 - 1
src/views/page/pageMenu.vue

@@ -57,7 +57,7 @@
                     ref="menu"
                     :default-active="activeMenu"
                     class="el-menu-vertical-demo"
-                    background-color="#3397FF"
+                    :background-color="themeColor"
                     :unique-opened="true"
                     :router="true"
                     @select="menuSel"
@@ -145,6 +145,8 @@
 </template>
 
 <script>
+import { mapState } from "vuex";
+
 export default {
     name: "pageMenu",
     data() {
@@ -161,6 +163,11 @@ export default {
             activeMenu: "mainPage", // 当前menu
         };
     },
+
+    computed: {
+        ...mapState(["themeColor"]),
+    },
+
     methods: {
         menuFoldHandle(val) {
             if (val) {