mirror of
https://github.com/dataease/dataease.git
synced 2025-02-25 03:52:59 +08:00
fix: 编辑仪表盘时 卡顿导致视图大小不变的问题
This commit is contained in:
parent
0aff0ba5e2
commit
22248e521a
@ -40,6 +40,7 @@
|
||||
:prop-value="item.propValue"
|
||||
:element="item"
|
||||
:filter="filter"
|
||||
:out-style="item.style"
|
||||
/>
|
||||
<!-- <component
|
||||
:is="item.component"
|
||||
|
@ -18,6 +18,7 @@ import { viewData } from '@/api/panel/panel'
|
||||
import ChartComponent from '@/views/chart/components/ChartComponent.vue'
|
||||
import TableNormal from '@/views/chart/components/table/TableNormal'
|
||||
import LabelNormal from '../../../views/chart/components/normal/LabelNormal'
|
||||
import { uuid } from 'vue-uuid'
|
||||
|
||||
import { mapState } from 'vuex'
|
||||
|
||||
@ -48,6 +49,13 @@ export default {
|
||||
filter: []
|
||||
}
|
||||
}
|
||||
},
|
||||
outStyle: {
|
||||
type: Object,
|
||||
required: false,
|
||||
default: function() {
|
||||
return {}
|
||||
}
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
@ -65,13 +73,24 @@ export default {
|
||||
this.mergeStyle()
|
||||
},
|
||||
deep: true
|
||||
},
|
||||
// 监听外部的样式变化
|
||||
outStyle: {
|
||||
handler(newVal, oldVla) {
|
||||
this.$refs[this.element.propValue.id].chartResize()
|
||||
},
|
||||
deep: true
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.refId = uuid.v1
|
||||
},
|
||||
computed: mapState([
|
||||
'canvasStyleData'
|
||||
]),
|
||||
data() {
|
||||
return {
|
||||
refId: null,
|
||||
chart: {
|
||||
stylePriority: 'panel',
|
||||
xaxis: '[]',
|
||||
|
@ -49,11 +49,6 @@ export default {
|
||||
},
|
||||
mounted() {
|
||||
this.preDraw()
|
||||
|
||||
// 监听元素变动事件
|
||||
eventBus.$on('resizing', (componentId) => {
|
||||
this.chartResize()
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
preDraw() {
|
||||
|
Loading…
Reference in New Issue
Block a user