|
@@ -1,9 +1,9 @@
|
|
|
<template>
|
|
|
- <GeoTeleport :menus="menus" class="geo-teleport-use" :active="active"/>
|
|
|
- <GeoTeleport :menus="childMenus" v-if="childMenus" class="type-geo"/>
|
|
|
+ <GeoTeleport :active="active" :menus="menus" class="geo-teleport-use"/>
|
|
|
+ <GeoTeleport v-if="childMenus" :menus="childMenus" class="type-geo"/>
|
|
|
</template>
|
|
|
|
|
|
-<script setup lang="ts">
|
|
|
+<script lang="ts" setup>
|
|
|
import GeoTeleport from "@/views/graphic/geos/geo-teleport.vue";
|
|
|
import {drawRef, FocusVector, VectorType} from '@/hook/useGraphic'
|
|
|
import {computed, ref, toRaw, UnwrapRef} from "vue";
|
|
@@ -49,7 +49,12 @@ const lineTypeMenu = [
|
|
|
text: "双虚线",
|
|
|
onClick: clickHandlerFactory(VectorStyle.DoubleDashedLine)
|
|
|
},
|
|
|
- {key: VectorStyle.BrokenLine, icon: "line_broken", text: "折线", onClick: clickHandlerFactory(VectorStyle.BrokenLine)},
|
|
|
+ {
|
|
|
+ key: VectorStyle.BrokenLine,
|
|
|
+ icon: "line_broken",
|
|
|
+ text: "折线",
|
|
|
+ onClick: clickHandlerFactory(VectorStyle.BrokenLine)
|
|
|
+ },
|
|
|
{
|
|
|
key: VectorStyle.PointDrawLine,
|
|
|
icon: "line_dot",
|
|
@@ -79,7 +84,7 @@ const lineWidthMenu = [
|
|
|
},
|
|
|
]
|
|
|
|
|
|
-const appendMenus = props.geo.category === VectorCategory.Line.NormalLine
|
|
|
+const appendMenus = (props.geo.category === VectorCategory.Line.NormalLine || props.geo.type === VectorType.CurveLine)
|
|
|
? [
|
|
|
{
|
|
|
key: VectorEvents.AddCrossPoint,
|
|
@@ -87,24 +92,24 @@ const appendMenus = props.geo.category === VectorCategory.Line.NormalLine
|
|
|
text: "加控制点",
|
|
|
onClick: clickHandlerFactory(VectorEvents.AddCrossPoint)
|
|
|
},
|
|
|
- {
|
|
|
- key: VectorEvents.MinusCrossPoint,
|
|
|
- icon: "control_d",
|
|
|
- text: "减控制点",
|
|
|
- onClick: clickHandlerFactory(VectorEvents.MinusCrossPoint)
|
|
|
- },
|
|
|
+ // {
|
|
|
+ // key: VectorEvents.MinusCrossPoint,
|
|
|
+ // icon: "control_d",
|
|
|
+ // text: "减控制点",
|
|
|
+ // onClick: clickHandlerFactory(VectorEvents.MinusCrossPoint)
|
|
|
+ // },
|
|
|
]
|
|
|
: []
|
|
|
const childMenus = ref<UnwrapRef<typeof menus>>()
|
|
|
const menus = ref([
|
|
|
- {
|
|
|
+ ...(props.geo.type !== VectorType.CurveLine ? [{
|
|
|
key: UITypeExtend.lineType,
|
|
|
text: "单实线",
|
|
|
icon: "line",
|
|
|
onClick() {
|
|
|
childMenus.value = toRaw(childMenus.value) === lineTypeMenu ? null : lineTypeMenu
|
|
|
}
|
|
|
- },
|
|
|
+ }] : []),
|
|
|
vector.value?.weight === VectorWeight.Bold ? lineWidthMenu[0] : lineWidthMenu[1],
|
|
|
...appendMenus,
|
|
|
{
|
|
@@ -132,7 +137,7 @@ const active = computed(() =>
|
|
|
|
|
|
</script>
|
|
|
|
|
|
-<style scoped lang="scss">
|
|
|
+<style lang="scss" scoped>
|
|
|
.color {
|
|
|
width: 18px;
|
|
|
height: 18px;
|