From af0e9433b0fbcd68cda8ea6ce0283d7951dbc22c Mon Sep 17 00:00:00 2001 From: dataeaseShu Date: Tue, 8 Apr 2025 15:24:46 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E6=95=B0=E6=8D=AE=E5=A4=A7=E5=B1=8F):=20?= =?UTF-8?q?=E5=9B=BE=E7=89=87=E7=BB=84=E4=BB=B6=E5=92=8C=E8=BE=B9=E6=A1=86?= =?UTF-8?q?=E7=BB=84=E4=BB=B6=EF=BC=8C=E5=9C=A8=E7=BC=96=E8=BE=91=E7=8A=B6?= =?UTF-8?q?=E6=80=81=E4=B8=8B=E6=9D=A5=E5=9B=9E=E7=82=B9=E5=87=BB=EF=BC=8C?= =?UTF-8?q?=E6=B5=8F=E8=A7=88=E5=99=A8=E4=BC=9A=E5=8F=8D=E5=BA=94=E5=8F=98?= =?UTF-8?q?=E6=85=A2=E7=9B=B4=E8=87=B3=E5=B4=A9=E6=BA=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/views/chart/components/editor/index.vue | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/core/core-frontend/src/views/chart/components/editor/index.vue b/core/core-frontend/src/views/chart/components/editor/index.vue index 6e03509dba..d675b25a55 100644 --- a/core/core-frontend/src/views/chart/components/editor/index.vue +++ b/core/core-frontend/src/views/chart/components/editor/index.vue @@ -55,13 +55,12 @@ import SortPriorityEdit from '@/views/chart/components/editor/drag-item/componen import { snapshotStoreWithOut } from '@/store/modules/data-visualization/snapshot' import CalcFieldEdit from '@/views/visualized/data/dataset/form/CalcFieldEdit.vue' import { getFieldName, guid } from '@/views/visualized/data/dataset/form/util' -import { cloneDeep, forEach, get } from 'lodash-es' +import { cloneDeep, forEach, get, debounce, set, concat, keys } from 'lodash-es' import { deleteField, saveField } from '@/api/dataset' import { getWorldTree, listCustomGeoArea } from '@/api/map' import chartViewManager from '@/views/chart/components/js/panel' import DatasetSelect from '@/views/chart/components/editor/dataset-select/DatasetSelect.vue' import { useDraggable } from '@vueuse/core' -import { set, concat, keys } from 'lodash-es' import { PluginComponent } from '@/components/plugin' import { Field, getFieldByDQ, copyChartField, deleteChartField } from '@/api/chart' import ChartTemplateInfo from '@/views/chart/components/editor/common/ChartTemplateInfo.vue' @@ -1726,14 +1725,14 @@ const { y, isDragging } = useDraggable(el, { draggingElement: elDrag }) const previewHeight = ref(0) -const calcEle = () => { +const calcEle = debounce(() => { nextTick(() => { previewHeight.value = (elDrag.value as HTMLDivElement).offsetHeight y.value = previewHeight.value / 2 + 200 }) -} +}, 500) -const setCacheId = () => { +const setCacheId = debounce(() => { nextTick(() => { // 富文本不使用cacheId if ( @@ -1745,7 +1744,7 @@ const setCacheId = () => { return view.value.tableId = cacheId as unknown as number }) -} +}, 500) watch( () => curComponent.value, val => {