diff --git a/src/store/modules/chartEditStore/chartEditStore.ts b/src/store/modules/chartEditStore/chartEditStore.ts index 53f13c35..a74b4d43 100644 --- a/src/store/modules/chartEditStore/chartEditStore.ts +++ b/src/store/modules/chartEditStore/chartEditStore.ts @@ -605,10 +605,6 @@ export const useChartEditStore = defineStore({ // * 解除分组 setUnGroup() { const selectGroupIdArr = this.getTargetChart.selectId - if(selectGroupIdArr.length > 1) { - window['$message'].error('解除分组失败,请联系管理员!') - return - } // 解组 const unGroup = (targetIndex: number) => { diff --git a/src/views/chart/ContentEdit/components/EditGroup/index.ts b/src/views/chart/ContentEdit/components/EditGroup/index.ts new file mode 100644 index 00000000..4fd9d529 --- /dev/null +++ b/src/views/chart/ContentEdit/components/EditGroup/index.ts @@ -0,0 +1,3 @@ +import EditGroup from './index.vue' + +export { EditGroup } diff --git a/src/views/chart/ContentEdit/components/EditGroup/index.vue b/src/views/chart/ContentEdit/components/EditGroup/index.vue new file mode 100644 index 00000000..c20e0108 --- /dev/null +++ b/src/views/chart/ContentEdit/components/EditGroup/index.vue @@ -0,0 +1,78 @@ + + + diff --git a/src/views/chart/ContentEdit/index.vue b/src/views/chart/ContentEdit/index.vue index f08cb06c..f982920d 100644 --- a/src/views/chart/ContentEdit/index.vue +++ b/src/views/chart/ContentEdit/index.vue @@ -15,38 +15,43 @@ -
+ }" + > - - - +
+ + + + + +
@@ -79,6 +84,7 @@ import { dragHandle, dragoverHandle, useMouseHandle } from './hooks/useDrag.hook import { useComponentStyle, useSizeStyle } from './hooks/useStyle.hook' import { ContentBox } from '../ContentBox/index' +import { EditGroup } from './components/EditGroup' import { EditRange } from './components/EditRange' import { EditBottom } from './components/EditBottom' import { EditShapeBox } from './components/EditShapeBox' @@ -94,15 +100,21 @@ useLayout() const { mouseenterHandle, mouseleaveHandle, mousedownHandle, mouseClickHandle } = useMouseHandle() // 右键事件 -const optionsHandle = (targetList: MenuOptionsItemType[], allList: MenuOptionsItemType[], item: CreateComponentType | CreateComponentGroupType) => { +const optionsHandle = ( + targetList: MenuOptionsItemType[], + allList: MenuOptionsItemType[], + item: CreateComponentType +) => { // 多选处理 - if(chartEditStore.getTargetChart.selectId.length > 1) { + if (chartEditStore.getTargetChart.selectId.length > 1) { + const list: MenuOptionsItemType[] = [] targetList.forEach(item => { - if(item.key !== MenuEnum.GROUP) { - item.disabled = true + // 成组 + if (item.key === MenuEnum.GROUP) { + list.push(item) } }) - return targetList + return list } return targetList } diff --git a/src/views/chart/ContentLayers/index.vue b/src/views/chart/ContentLayers/index.vue index 13ec488f..13184805 100644 --- a/src/views/chart/ContentLayers/index.vue +++ b/src/views/chart/ContentLayers/index.vue @@ -20,16 +20,16 @@