提交 7f1712f8 authored 作者: wangjiahao's avatar wangjiahao

refactor: 画布内存使用优化

上级 202539a6
...@@ -1018,11 +1018,9 @@ import ValueFormatterEdit from '@/views/chart/components/value-formatter/ValueFo ...@@ -1018,11 +1018,9 @@ import ValueFormatterEdit from '@/views/chart/components/value-formatter/ValueFo
import ChartStyle from '@/views/chart/view/ChartStyle' import ChartStyle from '@/views/chart/view/ChartStyle'
import CustomSortEdit from '@/views/chart/components/compare/CustomSortEdit' import CustomSortEdit from '@/views/chart/components/compare/CustomSortEdit'
import { TYPE_CONFIGS } from '@/views/chart/chart/util' import { TYPE_CONFIGS } from '@/views/chart/chart/util'
import ChartStyleBack from '@/views/chart/view/ChartStyleBack'
export default { export default {
name: 'ChartEdit', name: 'ChartEdit',
components: { components: {
ChartStyleBack,
CustomSortEdit, CustomSortEdit,
ChartStyle, ChartStyle,
ValueFormatterEdit, ValueFormatterEdit,
...@@ -1062,6 +1060,11 @@ export default { ...@@ -1062,6 +1060,11 @@ export default {
type: String, type: String,
required: false, required: false,
default: 'view' default: 'view'
},
editStatue: {
type: Boolean,
required: false,
default: false
} }
}, },
data() { data() {
...@@ -1196,10 +1199,17 @@ export default { ...@@ -1196,10 +1199,17 @@ export default {
} */ } */
}, },
watch: { watch: {
'editStatue': function(val) {
if (val && this.param.id !== this.preChartId) {
this.preChartId = this.param.id
this.chartInit()
// console.log('fromwatch:' + JSON.stringify(val))
}
},
'param': function(val) { 'param': function(val) {
if (this.param.optType === 'new') { if (this.param.optType === 'new') {
// //
} else if (this.param.id !== this.preChartId) { } else if (this.param.id !== this.preChartId && this.editStatue) {
this.preChartId = this.param.id this.preChartId = this.param.id
this.chartInit() this.chartInit()
// console.log('fromwatch:' + JSON.stringify(val)) // console.log('fromwatch:' + JSON.stringify(val))
......
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
</el-header> </el-header>
<de-container> <de-container>
<de-aside-container class="ms-aside-container"> <de-aside-container class="ms-aside-container">
<div v-if="showAside" style="width: 60px; left: 0px; top: 0px; bottom: 0px; position: absolute"> <div v-show="showAside" style="width: 60px; left: 0px; top: 0px; bottom: 0px; position: absolute">
<div <div
style="width: 60px;height: 100%;overflow: hidden auto;position: relative;margin: 0px auto; font-size: 14px" style="width: 60px;height: 100%;overflow: hidden auto;position: relative;margin: 0px auto; font-size: 14px"
> >
...@@ -228,7 +228,7 @@ ...@@ -228,7 +228,7 @@
<div v-show="!mobileLayoutStatus&&rightDrawOpen" class="tools-window-main"> <div v-show="!mobileLayoutStatus&&rightDrawOpen" class="tools-window-main">
<div v-show="showViewToolsAside"> <div v-show="showViewToolsAside">
<chart-edit ref="chartEditRef" :edit-from="'panel'" :param="chartEditParam" /> <chart-edit ref="chartEditRef" :edit-statue="showViewToolsAside&&!mobileLayoutStatus&&rightDrawOpen" :edit-from="'panel'" :param="chartEditParam" />
</div> </div>
<div v-show="showBatchViewToolsAside"> <div v-show="showBatchViewToolsAside">
<chart-style-batch-set /> <chart-style-batch-set />
...@@ -305,7 +305,7 @@ ...@@ -305,7 +305,7 @@
> >
<!--矩形样式组件--> <!--矩形样式组件-->
<TextAttr v-if="showAttr" :scroll-left="scrollLeft" :scroll-top="scrollTop" /> <TextAttr v-show="showAttr" :scroll-left="scrollLeft" :scroll-top="scrollTop" />
<!--复用ChartGroup组件 不做显示--> <!--复用ChartGroup组件 不做显示-->
<ChartGroup <ChartGroup
ref="chartGroup" ref="chartGroup"
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论