Skip to content

Commit 4136b68

Browse files
AliceLannisteQiu-Jun
authored andcommitted
fix: 隐藏border选项
1 parent 5250a3e commit 4136b68

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

packages/core/plugin/GroupPlugin.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ class GroupPlugin implements IPluginTempl {
4343
this.canvas.remove(object);
4444
});
4545
this.canvas.add(newgroup);
46+
this.canvas.setActiveObject(newgroup);
4647
});
4748
}
4849

src/components/attributeBorder.vue

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* @Description: 边框
77
-->
88
<template>
9-
<div class="box attr-item-box" v-if="mixinState.mSelectMode === 'one'">
9+
<div class="box attr-item-box" v-if="mixinState.mSelectMode === 'one' && !isGroup">
1010
<!-- <h3>边框</h3> -->
1111
<Divider plain orientation="left"><h4>边框</h4></Divider>
1212
<!-- 通用属性 -->
@@ -53,7 +53,6 @@
5353
</Col>
5454
</Row>
5555
</div>
56-
<!-- <Divider plain></Divider> -->
5756
</div>
5857
</template>
5958

@@ -64,6 +63,7 @@ import InputNumber from '@/components/inputNumber';
6463
const update = getCurrentInstance();
6564
const { mixinState, canvasEditor } = useSelect();
6665
66+
const groupType = ['group'];
6767
// 属性值
6868
const baseAttr = reactive({
6969
stroke: '#fff',
@@ -145,12 +145,15 @@ const strokeDashList = [
145145
label: 'Dash-8',
146146
},
147147
];
148+
149+
const isGroup = computed(() => groupType.includes(mixinState.mSelectOneType));
148150
// 属性获取
149151
const getObjectAttr = (e) => {
150152
const activeObject = canvasEditor.canvas.getActiveObject();
153+
151154
// 不是当前obj,跳过
152155
if (e && e.target && e.target !== activeObject) return;
153-
if (activeObject) {
156+
if (activeObject && !groupType.includes(activeObject.type)) {
154157
baseAttr.stroke = activeObject.get('stroke');
155158
baseAttr.strokeWidth = activeObject.get('strokeWidth');
156159
const strokeDashArray = JSON.stringify(activeObject.get('strokeDashArray') || []);

0 commit comments

Comments
 (0)