diff --git a/frontend/src/components/canvas/components/Editor/Preview.vue b/frontend/src/components/canvas/components/Editor/Preview.vue index cf2618a374..2e40f650d6 100644 --- a/frontend/src/components/canvas/components/Editor/Preview.vue +++ b/frontend/src/components/canvas/components/Editor/Preview.vue @@ -75,7 +75,7 @@ import { mapState } from 'vuex' import ComponentWrapper from './ComponentWrapper' import { changeStyleWithScale } from '@/components/canvas/utils/translate' import { uuid } from 'vue-uuid' -import {deepCopy, imgUrlTrans} from '@/components/canvas/utils/utils' +import { deepCopy, imgUrlTrans } from '@/components/canvas/utils/utils' import eventBus from '@/components/canvas/utils/eventBus' import elementResizeDetectorMaker from 'element-resize-detector' import UserViewDialog from '@/components/canvas/custom-component/UserViewDialog' @@ -330,6 +330,13 @@ export default { if (component.type === 'view' && this.buttonFilterMap[component.propValue.viewId]) { component.filters = this.buttonFilterMap[component.propValue.viewId] } + if (component.type === 'de-tabs') { + for (let idx = 0; idx < component.options.tabList.length; idx++) { + const ele = component.options.tabList[idx].content + if (!ele.type || ele.type !== 'view') continue + ele.filters = this.buttonFilterMap[ele.propValue.viewId] + } + } }) }, buildButtonFilterMap(panelItems, isClear = false) { diff --git a/frontend/src/components/canvas/components/Editor/index.vue b/frontend/src/components/canvas/components/Editor/index.vue index 189782501b..df535a5241 100644 --- a/frontend/src/components/canvas/components/Editor/index.vue +++ b/frontend/src/components/canvas/components/Editor/index.vue @@ -189,7 +189,7 @@ import DeDrag from '@/components/DeDrag' // eslint-disable-next-line no-unused-vars import { getStyle, getComponentRotatedStyle } from '@/components/canvas/utils/style' -import {_$, imgUrlTrans} from '@/components/canvas/utils/utils' +import { _$, imgUrlTrans } from '@/components/canvas/utils/utils' import ContextMenu from './ContextMenu' import MarkLine from './MarkLine' import Area from './Area' @@ -1133,6 +1133,13 @@ export default { if (component.type === 'view' && this.buttonFilterMap[component.propValue.viewId]) { component.filters = this.buttonFilterMap[component.propValue.viewId] } + if (component.type === 'de-tabs') { + for (let idx = 0; idx < component.options.tabList.length; idx++) { + const ele = component.options.tabList[idx].content + if (!ele.type || ele.type !== 'view') continue + ele.filters = this.buttonFilterMap[ele.propValue.viewId] + } + } }) }, buildButtonFilterMap(panelItems, isClear = false) {