File tree Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Original file line number Diff line number Diff 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
Original file line number Diff line number Diff line change 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 <!-- 通用属性 -->
5353 </Col >
5454 </Row >
5555 </div >
56- <!-- <Divider plain></Divider> -->
5756 </div >
5857</template >
5958
@@ -64,6 +63,7 @@ import InputNumber from '@/components/inputNumber';
6463const update = getCurrentInstance ();
6564const { mixinState , canvasEditor } = useSelect ();
6665
66+ const groupType = [' group' ];
6767// 属性值
6868const 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// 属性获取
149151const 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' ) || []);
You can’t perform that action at this time.
0 commit comments