diff --git a/core/core-frontend/src/components/dashboard/DashboardHiddenComponent.vue b/core/core-frontend/src/components/dashboard/DashboardHiddenComponent.vue index 6bd380f045..c97e6b8fc3 100644 --- a/core/core-frontend/src/components/dashboard/DashboardHiddenComponent.vue +++ b/core/core-frontend/src/components/dashboard/DashboardHiddenComponent.vue @@ -5,6 +5,7 @@ import { dvMainStoreWithOut } from '@/store/modules/data-visualization/dvMain' import dvHidden from '@/assets/svg/dv-hidden.svg' import { computed } from 'vue' import Icon from '../icon-custom/src/Icon.vue' +import EmptyBackground from '../empty-background/src/EmptyBackground.vue' const dvMainStore = dvMainStoreWithOut() const { componentData, canvasStyleData, canvasViewInfo, dvInfo } = storeToRefs(dvMainStore) const emit = defineEmits(['cancelHidden']) @@ -21,32 +22,42 @@ const addToDashboard = item => { diff --git a/core/core-frontend/src/components/data-visualization/canvas/DePreview.vue b/core/core-frontend/src/components/data-visualization/canvas/DePreview.vue index edd8e8c530..77bf211333 100644 --- a/core/core-frontend/src/components/data-visualization/canvas/DePreview.vue +++ b/core/core-frontend/src/components/data-visualization/canvas/DePreview.vue @@ -21,6 +21,7 @@ import DeFullscreen from '@/components/visualization/common/DeFullscreen.vue' import EmptyBackground from '../../empty-background/src/EmptyBackground.vue' import LinkOptBar from '@/components/data-visualization/canvas/LinkOptBar.vue' import { isDesktop } from '@/utils/ModelUtil' +import { isMobile } from '@/utils/utils' const dvMainStore = dvMainStoreWithOut() const { pcMatrixCount, curComponent, mobileInPc, canvasState, inMobile } = storeToRefs(dvMainStore) const openHandler = ref(null) @@ -144,13 +145,19 @@ const isReport = computed(() => { const popComponentData = computed(() => componentData.value.filter( - ele => ele.category && ele.category === 'hidden' && !ele?.dashboardHidden + ele => + ele.category && + ele.category === 'hidden' && + (!ele?.dashboardHidden || (ele?.dashboardHidden && isMobile())) ) ) const baseComponentData = computed(() => componentData.value.filter( - ele => ele?.category !== 'hidden' && ele.component !== 'GroupArea' && !ele?.dashboardHidden + ele => + ele?.category !== 'hidden' && + ele.component !== 'GroupArea' && + (!ele?.dashboardHidden || (ele?.dashboardHidden && isMobile())) ) ) const canvasStyle = computed(() => { diff --git a/core/core-frontend/src/components/visualization/ComponentEditBar.vue b/core/core-frontend/src/components/visualization/ComponentEditBar.vue index 706e96b993..0889ccc832 100644 --- a/core/core-frontend/src/components/visualization/ComponentEditBar.vue +++ b/core/core-frontend/src/components/visualization/ComponentEditBar.vue @@ -507,6 +507,7 @@ const hiddenComponent = () => { if (curComponent.value) { curComponent.value.dashboardHidden = true eventBus.emit('removeMatrixItemPosition-' + canvasId.value, curComponent.value) + dvMainStore.setHiddenListStatus(true) } snapshotStore.recordSnapshotCache('hide') } diff --git a/core/core-frontend/src/locales/en.ts b/core/core-frontend/src/locales/en.ts index f8bf4b3280..5d7bbf5cbc 100644 --- a/core/core-frontend/src/locales/en.ts +++ b/core/core-frontend/src/locales/en.ts @@ -2814,6 +2814,7 @@ Scatter chart (bubble) chart: {a} (series name), {b} (data name), {c} (value arr column_name: 'Field name' }, visualization: { + no_hidden_components: 'No Hidden Components', hidden_components: 'Hidden Components', dashboard_adaptor: 'Zoom Mode', scale_keep_height_and_width: 'Canvas Ratio', diff --git a/core/core-frontend/src/locales/tw.ts b/core/core-frontend/src/locales/tw.ts index 1455df1a54..07f8d14ca7 100644 --- a/core/core-frontend/src/locales/tw.ts +++ b/core/core-frontend/src/locales/tw.ts @@ -2742,6 +2742,7 @@ export default { column_name: '欄位名稱' }, visualization: { + no_hidden_components: '當前無隱藏組件', hidden_components: '已隱藏的組件', dashboard_adaptor: '縮放模式', scale_keep_height_and_width: '按畫布比例縮放', diff --git a/core/core-frontend/src/locales/zh-CN.ts b/core/core-frontend/src/locales/zh-CN.ts index 208252e505..362489291c 100644 --- a/core/core-frontend/src/locales/zh-CN.ts +++ b/core/core-frontend/src/locales/zh-CN.ts @@ -2744,6 +2744,7 @@ export default { column_name: '字段名称' }, visualization: { + no_hidden_components: '当前无隐藏组件', hidden_components: '已隐藏的组件', dashboard_adaptor: '缩放模式', scale_keep_height_and_width: '按画布比例缩放',