<el-form-item prop="a" :label="'一樓:'">
<geoJson />
</el-form-item>
<el-form-item prop="a" :label="'二樓:'">
<geoJson />
</el-form-item>
//如有頁(yè)面需要多次調(diào)用,使用document.getElementById不能多次初始化,只會(huì)顯示一個(gè)
//用this.$refs.myChart 或者currentInstance.ctx.$refs.myChart
import { getCurrentInstance, onMounted } from '@vue/runtime-core'
setup(){
onMounted(() => {
currentInstance = getCurrentInstance()
})
const initGeo = (num) => {
var dom = currentInstance.ctx.$refs.myChart
const myChart = echarts.init(dom)
}
}