diff --git a/frontend/src/components/canvas/components/editor/ComponentWrapper.vue b/frontend/src/components/canvas/components/editor/ComponentWrapper.vue index 639bb5f740..4b8d60a606 100644 --- a/frontend/src/components/canvas/components/editor/ComponentWrapper.vue +++ b/frontend/src/components/canvas/components/editor/ComponentWrapper.vue @@ -312,9 +312,14 @@ export default { } }, clearHandler() { - if (this.$refs.deOutWidget && this.$refs.deOutWidget.clearHandler) { + if (this.$refs.deOutWidget?.clearHandler) { this.$refs.deOutWidget.clearHandler() } + }, + responseResetButton() { + if (this.$refs.wrapperChild?.responseResetButton) { + this.$refs.wrapperChild.responseResetButton() + } } } } diff --git a/frontend/src/components/canvas/components/editor/DeEditor.vue b/frontend/src/components/canvas/components/editor/DeEditor.vue index fec084e0b4..6b5c72af68 100644 --- a/frontend/src/components/canvas/components/editor/DeEditor.vue +++ b/frontend/src/components/canvas/components/editor/DeEditor.vue @@ -1106,6 +1106,11 @@ export default { }, triggerResetButton() { this.triggerSearchButton(true) + this.$refs['wrapperChild']?.forEach(item => { + if (item?.['responseResetButton']) { + item.responseResetButton() + } + }) }, refreshButtonInfo(isClear = false) { const result = this.buildButtonFilterMap(this.componentData, isClear) diff --git a/frontend/src/components/canvas/components/editor/Preview.vue b/frontend/src/components/canvas/components/editor/Preview.vue index 9c27ac73e7..63dbe117eb 100644 --- a/frontend/src/components/canvas/components/editor/Preview.vue +++ b/frontend/src/components/canvas/components/editor/Preview.vue @@ -410,6 +410,11 @@ export default { }, triggerResetButton() { this.triggerSearchButton(true) + this.$refs['viewWrapperChild']?.forEach(item => { + if (item?.responseResetButton) { + item.responseResetButton() + } + }) }, triggerSearchButton(isClear = false) { const result = this.buildButtonFilterMap(this.componentData, isClear) diff --git a/frontend/src/components/canvas/customComponent/UserView.vue b/frontend/src/components/canvas/customComponent/UserView.vue index a6cd3f3a8c..7cfa271f49 100644 --- a/frontend/src/components/canvas/customComponent/UserView.vue +++ b/frontend/src/components/canvas/customComponent/UserView.vue @@ -469,7 +469,7 @@ export default { }, 'cfilters': { handler: function(val1, val2) { - if ((isChange(val1, val2) || isChange(val1, this.filters)) && !this.isFirstLoad) { + if (isChange(val1, val2) && !this.isFirstLoad) { this.getData(this.element.propValue.viewId) } }, @@ -555,6 +555,11 @@ export default { } }, methods: { + responseResetButton() { + if (!this.cfilters?.length) { + this.getData(this.element.propValue.viewId, false) + } + }, exportExcel() { this.$refs['userViewDialog'].exportExcel() },