forked from github/dataease
commit
23dd0ee9a4
@ -32,7 +32,9 @@ import '@/utils/DateUtil'
|
||||
import draggable from 'vuedraggable'
|
||||
import deWebsocket from '@/websocket'
|
||||
import { GaodeMap } from '@antv/l7-maps'
|
||||
import { Mix } from '@antv/g2plot'
|
||||
import * as echarts from 'echarts'
|
||||
import { clear } from 'size-sensor'
|
||||
import UmyUi from 'umy-ui'
|
||||
// 全屏插件
|
||||
import fullscreen from 'vue-fullscreen'
|
||||
@ -58,6 +60,8 @@ Vue.prototype.$api = api
|
||||
|
||||
Vue.prototype.$echarts = echarts
|
||||
Vue.prototype.$gaodeMap = GaodeMap
|
||||
Vue.prototype.$Mix = Mix
|
||||
Vue.prototype.$G2SizeSensorClear = clear
|
||||
|
||||
Vue.use(UmyUi)
|
||||
|
||||
|
@ -31,6 +31,8 @@ import '@/utils/DateUtil'
|
||||
import draggable from 'vuedraggable'
|
||||
import deWebsocket from '@/websocket'
|
||||
import { GaodeMap } from '@antv/l7-maps'
|
||||
import { Mix } from '@antv/g2plot'
|
||||
import { clear } from 'size-sensor'
|
||||
import * as echarts from 'echarts'
|
||||
import UmyUi from 'umy-ui'
|
||||
// 全屏插件
|
||||
@ -57,6 +59,8 @@ Vue.prototype.$api = api
|
||||
|
||||
Vue.prototype.$echarts = echarts
|
||||
Vue.prototype.$gaodeMap = GaodeMap
|
||||
Vue.prototype.$Mix = Mix
|
||||
Vue.prototype.$G2SizeSensorClear = clear
|
||||
|
||||
Vue.use(UmyUi)
|
||||
|
||||
|
@ -11,11 +11,9 @@
|
||||
"buildPlugin": "node build/build-async-plugins.js"
|
||||
},
|
||||
"dependencies": {
|
||||
"@antv/g2plot": "^2.4.31",
|
||||
"@babel/polyfill": "^7.12.1",
|
||||
"@babel/runtime": "^7.18.9",
|
||||
"@riophae/vue-treeselect": "0.4.0",
|
||||
"lodash": "^4.17.21",
|
||||
"lodash-es": "^4.17.21",
|
||||
"vue": "2.6.10",
|
||||
"vue-i18n": "7.3.2",
|
||||
|
@ -32,7 +32,6 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {Mix} from '@antv/g2plot'
|
||||
import {uuid, hexColorToRGBA, setGradientColor} from '../../../utils/chartmix'
|
||||
import ViewTrackBar from '../../../components/views/ViewTrackBar'
|
||||
import {getRemark} from "../../../components/views/utils";
|
||||
@ -44,7 +43,6 @@ import {
|
||||
} from '../../../utils/map';
|
||||
import ChartTitleUpdate from '../../../components/views/ChartTitleUpdate';
|
||||
import {map, filter, join, flatten, cloneDeep} from 'lodash-es';
|
||||
import {clear} from 'size-sensor'
|
||||
import {valueFormatter} from '../../../utils/formatter'
|
||||
|
||||
export default {
|
||||
@ -176,7 +174,7 @@ export default {
|
||||
}
|
||||
},
|
||||
created() {
|
||||
!this.$chartmix && (this.$chartmix = Mix)
|
||||
!this.$chartmix && (this.$chartmix = this.$Mix)
|
||||
},
|
||||
mounted() {
|
||||
this.preDraw()
|
||||
@ -1153,7 +1151,7 @@ export default {
|
||||
beforeDestroy() {
|
||||
if (this.myChart.container) {
|
||||
if (typeof this.myChart.container.getAttribute === 'function') {
|
||||
clear(this.myChart.container)
|
||||
this.$G2SizeSensorClear(this.myChart.container)
|
||||
}
|
||||
}
|
||||
if (this.myChart) {
|
||||
|
Loading…
Reference in New Issue
Block a user