diff --git a/core/core-frontend/src/assets/svg/dv-expand-down.svg b/core/core-frontend/src/assets/svg/dv-expand-down.svg
new file mode 100644
index 0000000000..e0d1dfa7cd
--- /dev/null
+++ b/core/core-frontend/src/assets/svg/dv-expand-down.svg
@@ -0,0 +1,3 @@
+
diff --git a/core/core-frontend/src/assets/svg/dv-expand-right.svg b/core/core-frontend/src/assets/svg/dv-expand-right.svg
new file mode 100644
index 0000000000..99cffc3bef
--- /dev/null
+++ b/core/core-frontend/src/assets/svg/dv-expand-right.svg
@@ -0,0 +1,3 @@
+
diff --git a/core/core-frontend/src/components/data-visualization/RealTimeGroup.vue b/core/core-frontend/src/components/data-visualization/RealTimeGroup.vue
index 1e1ec7abf3..4505fa3416 100644
--- a/core/core-frontend/src/components/data-visualization/RealTimeGroup.vue
+++ b/core/core-frontend/src/components/data-visualization/RealTimeGroup.vue
@@ -5,12 +5,13 @@ import { layerStoreWithOut } from '@/store/modules/data-visualization/layer'
import { storeToRefs } from 'pinia'
import { ElIcon, ElRow } from 'element-plus-secondary'
import Icon from '../icon-custom/src/Icon.vue'
-import { computed, nextTick, ref } from 'vue'
+import { computed, nextTick, ref, toRefs } from 'vue'
import draggable from 'vuedraggable'
import { lockStoreWithOut } from '@/store/modules/data-visualization/lock'
import ContextMenuAsideDetails from '@/components/data-visualization/canvas/ContextMenuAsideDetails.vue'
import ComposeShow from '@/components/data-visualization/canvas/ComposeShow.vue'
import { composeStoreWithOut } from '@/store/modules/data-visualization/compose'
+import { propTypes } from '@/utils/propTypes'
const dropdownMore = ref(null)
const lockStore = lockStoreWithOut()
@@ -23,7 +24,11 @@ const { areaData, isCtrlOrCmdDown, isShiftDown, laterIndex } = storeToRefs(compo
const { curComponent, canvasViewInfo } = storeToRefs(dvMainStore)
-const componentData = computed(() => dvMainStore.componentData)
+const props = defineProps({
+ componentData: []
+})
+
+const { componentData } = toRefs(props)
const getComponent = index => {
return componentData.value[componentData.value.length - 1 - index]
@@ -312,7 +317,6 @@ const handleContextMenu = e => {
-
@@ -346,7 +350,7 @@ const handleContextMenu = e => {
align-items: center;
justify-content: flex-start;
font-size: 12px;
- padding: 0 2px 0 22px;
+ padding: 0 2px 0 44px;
user-select: none;
.component-icon {
diff --git a/core/core-frontend/src/components/data-visualization/RealTimeListTree.vue b/core/core-frontend/src/components/data-visualization/RealTimeListTree.vue
index 9871130722..654772cc68 100644
--- a/core/core-frontend/src/components/data-visualization/RealTimeListTree.vue
+++ b/core/core-frontend/src/components/data-visualization/RealTimeListTree.vue
@@ -90,6 +90,10 @@ const setCurComponent = index => {
dvMainStore.setCurComponent({ component: componentData.value[index], index })
}
+const expandClick = component => {
+ component['expand'] = !component['expand']
+}
+
let nameEdit = ref(false)
let editComponentId = ref('')
let inputName = ref('')
@@ -227,6 +231,24 @@ const handleContextMenu = e => {
}"
@click="onClick($event, transformIndex(index))"
>
+
+
+
+
+
+
@@ -314,6 +336,9 @@ const handleContextMenu = e => {
+
+
+
@@ -351,7 +376,7 @@ const handleContextMenu = e => {
align-items: center;
justify-content: flex-start;
font-size: 12px;
- padding: 0 2px 0 22px;
+ padding: 0 2px 0 0px;
user-select: none;
.component-icon {
@@ -394,7 +419,7 @@ const handleContextMenu = e => {
.component-base {
opacity: 1;
}
- width: 70px !important;
+ width: 66px !important;
}
}
@@ -431,6 +456,26 @@ const handleContextMenu = e => {
background: #303133 !important;
}
+.component-expand {
+ cursor: pointer;
+ height: 16px !important;
+ width: 16px !important;
+ border-radius: 2px;
+ padding: 0 2px;
+
+ .expand-icon {
+ font-size: 10px;
+ }
+
+ &:hover {
+ background: rgba(235, 235, 235, 0.1);
+ }
+
+ &:active {
+ background: rgba(235, 235, 235, 0.1);
+ }
+}
+
.component-base {
cursor: pointer;
height: 22px !important;
diff --git a/core/core-frontend/src/store/modules/data-visualization/compose.ts b/core/core-frontend/src/store/modules/data-visualization/compose.ts
index 9ef8219c0b..926bcda1a4 100644
--- a/core/core-frontend/src/store/modules/data-visualization/compose.ts
+++ b/core/core-frontend/src/store/modules/data-visualization/compose.ts
@@ -90,6 +90,7 @@ export const composeStore = defineStore('compose', {
name: '组合',
label: '组合',
icon: 'group',
+ expand: false,
commonBackground: {
...deepCopy(COMMON_COMPONENT_BACKGROUND_MAP[curOriginThemes.value]),
backgroundColorSelect: false,
diff --git a/core/core-frontend/src/utils/canvasUtils.ts b/core/core-frontend/src/utils/canvasUtils.ts
index 9ffce990ae..fc6cd7417b 100644
--- a/core/core-frontend/src/utils/canvasUtils.ts
+++ b/core/core-frontend/src/utils/canvasUtils.ts
@@ -95,6 +95,11 @@ export function initCanvasDataPrepare(dvId, busiFlag, callBack) {
const canvasDataResult = JSON.parse(canvasInfo.componentData)
const canvasStyleResult = JSON.parse(canvasInfo.canvasStyleData)
const canvasViewInfoPreview = canvasInfo.canvasViewInfo
+ canvasDataResult.forEach(componentItem => {
+ if (componentItem.component === 'Group') {
+ componentItem.expand = componentItem.expand || false
+ }
+ })
const curPreviewGap =
dvInfo.type === 'dashboard' && canvasStyleResult['dashboard'].gap === 'yes'
? canvasStyleResult['dashboard'].gapSize