From c467a598f23fd81cf624e0abc5f012fb5c9c6ada Mon Sep 17 00:00:00 2001 From: huangxiaoqiang <1247017146@qq.com> Date: 星期五, 25 四月 2025 09:54:00 +0800 Subject: [PATCH] 1 --- CodeManagement/BigScreenVue/src/components/echart/index.vue | 16 ++++++++++------ 1 files changed, 10 insertions(+), 6 deletions(-) diff --git a/CodeManagement/BigScreenVue/src/common/echart/index.vue b/CodeManagement/BigScreenVue/src/components/echart/index.vue similarity index 75% rename from CodeManagement/BigScreenVue/src/common/echart/index.vue rename to CodeManagement/BigScreenVue/src/components/echart/index.vue index 6473245..0ae38d4 100644 --- a/CodeManagement/BigScreenVue/src/common/echart/index.vue +++ b/CodeManagement/BigScreenVue/src/components/echart/index.vue @@ -1,11 +1,16 @@ +<!-- + * @Author: daidai + * @Date: 2022-02-28 16:29:08 + * @LastEditors: Please set LastEditors + * @LastEditTime: 2022-09-27 15:05:45 + * @FilePath: \web-pc\src\pages\big-screen\components\echart\index.vue +--> <template> <div :id="id" :class="className" :style="{ height: height, width: width }" /> </template> <script> -import tdTheme from './theme.json' // 寮曞叆榛樿涓婚 -import '../map/fujian.js' - +import * as echarts from 'echarts'; export default { name: 'echart', props: { @@ -23,7 +28,7 @@ }, height: { type: String, - default: '2.5rem' + default: '100%' }, options: { type: Object, @@ -45,7 +50,6 @@ } }, mounted () { - this.$echarts.registerTheme('tdTheme', tdTheme); // 瑕嗙洊榛樿涓婚 this.initChart(); }, beforeDestroy () { @@ -55,7 +59,7 @@ methods: { initChart () { // 鍒濆鍖杄chart - this.chart = this.$echarts.init(this.$el, 'tdTheme') + this.chart = echarts.init(this.$el) this.chart.setOption(this.options, true) } } -- Gitblit v1.9.3