|
@@ -0,0 +1,69 @@
|
|
|
+<template>
|
|
|
+ <GeoTeleport
|
|
|
+ :menus="menus"
|
|
|
+ class="geo-teleport-use"
|
|
|
+ v-if="!hideTypes.includes(geo.type) && !hideTypes.includes(geo.category)"
|
|
|
+ />
|
|
|
+</template>
|
|
|
+
|
|
|
+<script setup lang="ts">
|
|
|
+import GeoTeleport from "@/views/graphic/geos/geo-teleport.vue";
|
|
|
+import {drawRef, FocusVector, VectorType} from '@/hook/useGraphic'
|
|
|
+import GeoActions from "@/graphic/enum/GeoActions"
|
|
|
+import VectorCategory from "@/graphic/enum/VectorCategory";
|
|
|
+
|
|
|
+const props = defineProps<{geo: FocusVector}>()
|
|
|
+const hideTypes = [
|
|
|
+ VectorType.RoadPoint,
|
|
|
+ VectorType.CurveRoadPoint,
|
|
|
+ VectorCategory.Point.NormalPoint
|
|
|
+]
|
|
|
+console.log(props)
|
|
|
+const menus = [
|
|
|
+ {
|
|
|
+ key: 'copy',
|
|
|
+ icon: 'copy',
|
|
|
+ text: "复制",
|
|
|
+ onClick: () => {
|
|
|
+ drawRef.value.uiControl.handleGeo(GeoActions.CopyAction)
|
|
|
+ }
|
|
|
+ },
|
|
|
+ {
|
|
|
+ key: 'del',
|
|
|
+ text: "删除",
|
|
|
+ icon: 'del',
|
|
|
+ onClick: () => {
|
|
|
+ drawRef.value.uiControl.handleGeo(GeoActions.DeleteAction)
|
|
|
+ }
|
|
|
+ }
|
|
|
+]
|
|
|
+</script>
|
|
|
+
|
|
|
+<style scoped lang="scss">
|
|
|
+.color {
|
|
|
+ width: 18px;
|
|
|
+ height: 18px;
|
|
|
+ border: 2px solid #fff;
|
|
|
+ border-radius: 50%;
|
|
|
+}
|
|
|
+
|
|
|
+.icon {
|
|
|
+ font-size: 16px;
|
|
|
+}
|
|
|
+
|
|
|
+.geo-input {
|
|
|
+ position: absolute;
|
|
|
+ left: 0;
|
|
|
+ right: 0;
|
|
|
+ top: 0;
|
|
|
+ bottom: 0;
|
|
|
+ z-index: 1;
|
|
|
+ opacity: 0;
|
|
|
+}
|
|
|
+</style>
|
|
|
+
|
|
|
+<style lang="scss">
|
|
|
+.select-floating.select-float.dire-top {
|
|
|
+ margin-top: -10px;
|
|
|
+}
|
|
|
+</style>
|