Ver Fonte

添加到package.json

xiaoyang há 5 anos atrás
pai
commit
6f15e06be4

+ 1 - 0
package.json

@@ -10,6 +10,7 @@
   "dependencies": {
     "ant-design-vue": "^1.6.5",
     "core-js": "^3.6.5",
+    "echarts": "^4.9.0",
     "vue": "^2.6.11",
     "vue-router": "^3.2.0",
     "vuex": "^3.4.0"

+ 3 - 3
src/components/echarts/data.js

@@ -150,7 +150,7 @@ class areaData {
           },
           {
             title: "标题3",
-            value: "1230"
+            value: "80"
           }
         ]
       },
@@ -176,7 +176,7 @@ class areaData {
         DateItems: [
           {
             title: "标题1",
-            value: "10"
+            value: "40"
           },
           {
             title: "标题2",
@@ -184,7 +184,7 @@ class areaData {
           },
           {
             title: "标题3",
-            value: "30"
+            value: "130"
           }
         ]
       },

+ 1 - 1
src/components/echarts/echartsSimple.vue

@@ -246,7 +246,7 @@ export default {
           let divY = this.getMousePos()["y"];
           this.barWrap.setAttribute(
             "style",
-            `width: 250px; height: 180px;border: 1px solid #ccc;position:absolute;top: ${divY}px;left:${divX}px`
+            `width: 350px; height: 180px;border: 1px solid #ccc;position:absolute;top: ${divY}px;left:${divX}px`
           );
           this.drawBar.setAttribute("style", `width: 100%; height: 100%`);
           // 创建柱状图