|
@@ -87,7 +87,7 @@
|
|
|
:style="{ cursor: showSetting ? 'default' : 'pointer' }"
|
|
|
@click="clickTab3(item, index)"
|
|
|
>
|
|
|
- <div :class="menuActive3 === index ? 'checked2' : 'checked1'"></div>
|
|
|
+ <div v-show="!showSetting" :class="menuActive3 === index ? 'checked2' : 'checked1'"></div>
|
|
|
<img :src="getImageUrl(item.image)" class="icon" />
|
|
|
{{ item.name }}
|
|
|
<div v-if="!!showSetting" class="setting-btn" @click="handleShowSetting(item)" />
|
|
@@ -333,10 +333,12 @@ const clickTab = (value: number) => {
|
|
|
// 点击二级菜单
|
|
|
const clickTab2 = (value: number) => {
|
|
|
menuActive2.value = value;
|
|
|
+ handleExitMenuActive();
|
|
|
};
|
|
|
// 点击三级菜单
|
|
|
const clickTab3 = (item, index) => {
|
|
|
if (showSetting.value) return;
|
|
|
+ handleExitMenuActive(true);
|
|
|
const type = item.value;
|
|
|
if (mouseToolState.value.graphicsType !== type || (mouseToolState.value.graphicsType === 'marker' && mouseToolState.value.title !== item.name)) {
|
|
|
if (type === 'text') {
|
|
@@ -348,8 +350,8 @@ const clickTab3 = (item, index) => {
|
|
|
graphicsType: type,
|
|
|
lineWidth: mouseToolState.value.lineWidth,
|
|
|
color: mouseToolState.value.color,
|
|
|
- icon: getImageUrl(item.icon),
|
|
|
- iconName: item.icon,
|
|
|
+ icon: getImageUrl(item.image),
|
|
|
+ iconName: item.image,
|
|
|
size: item.size,
|
|
|
title: item.name
|
|
|
};
|
|
@@ -371,11 +373,19 @@ const clickTab3 = (item, index) => {
|
|
|
}
|
|
|
menuActive3.value = index;
|
|
|
} else {
|
|
|
- showTextEdit.value = false;
|
|
|
- drawing.value = false;
|
|
|
- mouseToolState.value.graphicsType = '';
|
|
|
+ handleExitMenuActive();
|
|
|
+ }
|
|
|
+};
|
|
|
+// 切换菜单、设置后退出菜单选中
|
|
|
+const handleExitMenuActive = (noClearActive?: boolean) => {
|
|
|
+ if (!noClearActive) {
|
|
|
menuActive3.value = '';
|
|
|
}
|
|
|
+ showTextEdit.value = false;
|
|
|
+ drawing.value = false;
|
|
|
+ mouseToolState.value.graphicsType = '';
|
|
|
+ const drawTool = getDrawTool();
|
|
|
+ drawTool.closeDraw();
|
|
|
};
|
|
|
const handleTextEdit = () => {
|
|
|
const drawTool = getDrawTool();
|
|
@@ -816,6 +826,7 @@ const handleShowDialog = () => {
|
|
|
let showSetting = ref(false);
|
|
|
const handleOpenSetting = () => {
|
|
|
showSetting.value = true;
|
|
|
+ handleExitMenuActive();
|
|
|
getTemplateTreeData();
|
|
|
};
|
|
|
const handleQuitSetting = () => {
|