From 6ea655f36d1e47650ddfbca748403936ec0761db Mon Sep 17 00:00:00 2001 From: fit2cloud-chenyw Date: Mon, 1 Aug 2022 13:37:52 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E4=BB=AA=E8=A1=A8=E6=9D=BF-=E8=BF=87?= =?UTF-8?q?=E6=BB=A4=E7=BB=84=E4=BB=B6):=20=E5=A4=8D=E5=88=B6=E8=A7=86?= =?UTF-8?q?=E5=9B=BE=E5=90=8E=E8=BF=87=E6=BB=A4=E7=BB=84=E4=BB=B6=E5=AF=B9?= =?UTF-8?q?=E5=8E=9F=E8=A7=86=E5=9B=BE=E5=92=8C=E7=9B=AE=E6=A0=87=E8=A7=86?= =?UTF-8?q?=E5=9B=BE=E4=BD=9C=E7=94=A8=E6=95=88=E6=9E=9C=E4=B8=8D=E4=B8=80?= =?UTF-8?q?=E8=87=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/components/canvas/store/copy.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/frontend/src/components/canvas/store/copy.js b/frontend/src/components/canvas/store/copy.js index 4eba66bfef..d483731abb 100644 --- a/frontend/src/components/canvas/store/copy.js +++ b/frontend/src/components/canvas/store/copy.js @@ -100,6 +100,10 @@ export default { const newView = deepCopy(data) newView.id = uuid.v1() newView.propValue.viewId = res.data + if (newView.filters && newView.filters.length) { + newView.filters = [] + } + store.commit('addComponent', { component: newView }) }) } else if (data.type === 'de-tabs') { @@ -111,6 +115,9 @@ export default { const newViewId = uuid.v1() sourceAndTargetIds[item.content.propValue.viewId] = newViewId item.content.propValue.viewId = newViewId + if (item.content.filters && item.content.filters.length) { + item.content.filters = [] + } } }) chartBatchCopy({ 'sourceAndTargetIds': sourceAndTargetIds }, state.panel.panelInfo.id).then((rsp) => {