diff --git a/src/components/editor-toolbar.vue b/src/components/editor-toolbar.vue index 4beffe6..efdea3c 100644 --- a/src/components/editor-toolbar.vue +++ b/src/components/editor-toolbar.vue @@ -3,6 +3,7 @@ import { MapAreaType } from '@api/map'; import { saveSceneByGroupId, saveSceneById } from '@api/scene'; import type { EditorService } from '@core/editor.service'; import { isEmpty } from 'lodash-es'; +import { computed } from 'vue'; import { inject, type InjectionKey, ref, type ShallowRef, watch } from 'vue'; type Props = { @@ -34,6 +35,8 @@ watch(editor.value.mouseBrush, (v) => { editor.value.addArea(p1, p2, mode.value); mode.value = undefined; }); + +const canDelete = computed(() => editor.value.current.value?.name === 'area');