提交 ff1a52d7 authored 作者: wangjiahao's avatar wangjiahao

fix: 修复antV视图多事件弹框点击不显示问题

上级 06b4d062
...@@ -31,7 +31,10 @@ export default { ...@@ -31,7 +31,10 @@ export default {
}, },
methods: { methods: {
trackButtonClick() { trackButtonClick() {
this.$refs.trackButton.click() const _this = this
setTimeout(() => {
_this.$refs.trackButton.click()
}, 50)
}, },
trackMenuClick(menu) { trackMenuClick(menu) {
this.$emit('trackClick', menu) this.$emit('trackClick', menu)
......
...@@ -10,7 +10,6 @@ ...@@ -10,7 +10,6 @@
<script> <script>
import { baseLiquid } from '@/views/chart/chart/liquid/liquid' import { baseLiquid } from '@/views/chart/chart/liquid/liquid'
// import eventBus from '@/components/canvas/utils/eventBus'
import { uuid } from 'vue-uuid' import { uuid } from 'vue-uuid'
import ViewTrackBar from '@/components/canvas/components/Editor/ViewTrackBar' import ViewTrackBar from '@/components/canvas/components/Editor/ViewTrackBar'
import { hexColorToRGBA } from '@/views/chart/chart/util' import { hexColorToRGBA } from '@/views/chart/chart/util'
...@@ -183,15 +182,7 @@ export default { ...@@ -183,15 +182,7 @@ export default {
if (this.antVRenderStatus) { if (this.antVRenderStatus) {
this.myChart.render() this.myChart.render()
} }
// } else {
// if (this.myChart) {
// this.antVRenderStatus = false
// this.myChart.destroy()
// }
// }
this.setBackGroundBorder() this.setBackGroundBorder()
// console.log(JSON.stringify(chart_option))
}, },
antVAction(param) { antVAction(param) {
...@@ -205,20 +196,10 @@ export default { ...@@ -205,20 +196,10 @@ export default {
this.trackClick(this.trackMenu[0]) this.trackClick(this.trackMenu[0])
} else { // 视图关联多个事件 } else { // 视图关联多个事件
this.trackBarStyle.left = param.x + 'px' this.trackBarStyle.left = param.x + 'px'
this.trackBarStyle.top = (param.y - 15) + 'px' this.trackBarStyle.top = (param.y + 10) + 'px'
this.$refs.viewTrack.trackButtonClick() this.$refs.viewTrack.trackButtonClick()
} }
}, },
// myEcharts(option) {
// // 指定图表的配置项和数据
// const chart = this.myChart
// this.setBackGroundBorder()
// setTimeout(chart.setOption(option, true), 500)
// window.onresize = function() {
// chart.resize()
// }
// },
setBackGroundBorder() { setBackGroundBorder() {
if (this.chart.customStyle) { if (this.chart.customStyle) {
const customStyle = JSON.parse(this.chart.customStyle) const customStyle = JSON.parse(this.chart.customStyle)
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论