1.下载echarts版本5.1.2
32.在vue文件中引用echarts
import * as echarts from 'echarts';
3.在图表series下添加以下代码
roam: true,
scaleLimit: {
min: 0.5,
max: 3
},
zoom: 0.5,
4.如若不起效,则需要再main.js中添加:window.wx = undefined
import App from './App'
// #ifndef VUE3
import Vue from 'vue'
import './uni.promisify.adaptor'
Vue.config.productionTip = false
window.wx = undefined
App.mpType = 'app'
const app = new Vue({
...App
})
app.$mount()
// #endif
// #ifdef VUE3
import { createSSRApp } from 'vue'
export function createApp() {
const app = createSSRApp(App)
return {
app
}
}
// #endif
5.在mounted中运行时,直接调用this.options()
6.在methods中,需要以下方式调用
this.$nextTick(() => {
this.options()
})
1788

被折叠的 条评论
为什么被折叠?



