Update C3.vue

This commit is contained in:
sc 2021-04-27 16:34:19 +08:00
parent a2d6dd93b5
commit 15c4f643c4
1 changed files with 16 additions and 2 deletions

View File

@ -1,12 +1,14 @@
<template> <template>
<div style="height: 200px" ref="demo"></div> <div v-loading="loading">
<div style="height: 200px" ref="demo"></div>
</div>
</template> </template>
<script> <script>
import * as echarts from 'echarts'; import * as echarts from 'echarts';
import T from '@/utils/echarts-theme-T.js'; import T from '@/utils/echarts-theme-T.js';
echarts.registerTheme('T', T); echarts.registerTheme('T', T);
export default { export default {
title:"模块3", title:"模块3",
components: { components: {
@ -15,7 +17,16 @@
props: { props: {
msg: String msg: String
}, },
data() {
return {
loading: true
}
},
mounted(){ mounted(){
var _this = this;
setTimeout(function() {
_this.loading = false
}, 500);
const myChart = echarts.init(this.$refs.demo, 'T'); const myChart = echarts.init(this.$refs.demo, 'T');
const option = { const option = {
@ -27,6 +38,9 @@
}, },
tooltip: { tooltip: {
trigger: 'axis', trigger: 'axis',
axisPointer: {
type: 'shadow'
}
}, },
legend: { legend: {
data: ['预购队列', '最新成交价'], data: ['预购队列', '最新成交价'],