|
@@ -27,7 +27,10 @@ const vector = computed(() => dataService.getGeo(props.geo.type, props.geo.vecto
|
|
|
const style = ref(vector.value.style || VectorStyle.SingleSolidLine);
|
|
|
|
|
|
const clickHandlerFactory = (key) => {
|
|
|
- return () => drawRef.value.uiControl.updateVectorForSelectUI(key);
|
|
|
+ return () => {
|
|
|
+ showChange.value = false;
|
|
|
+ drawRef.value.uiControl.updateVectorForSelectUI(key);
|
|
|
+ };
|
|
|
};
|
|
|
|
|
|
const showChange = ref(false);
|
|
@@ -96,6 +99,7 @@ const lineWidthMenu = reactive([
|
|
|
desc: 0,
|
|
|
onClick: () => {
|
|
|
showChange.value = !showChange.value;
|
|
|
+ childMenus.value = null;
|
|
|
},
|
|
|
},
|
|
|
]);
|
|
@@ -106,6 +110,7 @@ const menus = ref([
|
|
|
text: computed(() => lineTypeMenu.find((item) => item.key === style.value).text),
|
|
|
icon: computed(() => lineTypeMenu.find((item) => item.key === style.value).icon),
|
|
|
onClick() {
|
|
|
+ showChange.value = false;
|
|
|
childMenus.value = toRaw(childMenus.value) === lineTypeMenu ? null : lineTypeMenu;
|
|
|
},
|
|
|
},
|
|
@@ -126,13 +131,13 @@ watchEffect(() => {
|
|
|
}
|
|
|
});
|
|
|
|
|
|
-const active = computed(() =>
|
|
|
- toRaw(childMenus.value) === lineTypeMenu
|
|
|
+const active = computed(() => {
|
|
|
+ return toRaw(childMenus.value) === lineTypeMenu
|
|
|
? menus.value[0]
|
|
|
: toRaw(childMenus.value) === lineWidthMenu
|
|
|
? menus.value[1]
|
|
|
- : null
|
|
|
-);
|
|
|
+ : null;
|
|
|
+});
|
|
|
</script>
|
|
|
|
|
|
<style scoped lang="scss">
|