This commit is contained in:
2026-07-20 22:36:30 +07:00
parent 34520a95d4
commit 301cfcd61b
17 changed files with 171 additions and 95 deletions
+5 -4
View File
@@ -1,9 +1,10 @@
<script setup lang="ts">
import type { Application, Door, Key, Place, Scenario } from '@/api/generated/crabs/evening_detective_server';
import { NCard, NModal, NInput, NSpace, NText, NUpload, NUploadDragger, NSwitch, NDynamicInput, NInputGroup } from 'naive-ui'
import { NDynamicInput, NInput, NInputGroup, NSpace, NSwitch } from 'naive-ui'
import type { PropType } from 'vue';
import type { Application, Door, Key, Place } from '@/api/generated/crabs/evening_detective_server';
const props = defineProps({
place: {
type: Object as PropType<Place>,
@@ -15,7 +16,7 @@ const props = defineProps({
}
})
const emit = defineEmits<{ 'update:mode': [value: String] }>()
const emit = defineEmits<{ 'update:mode': [value: string] }>()
const updateMode = (mode: string) => {
console.log(mode)
emit('update:mode', mode)
@@ -52,7 +53,7 @@ function onCreateKey(): Key {
<div v-if="mode == 'show-editor'" class="place-block show-editor-block" @click="updateMode('edit')">
<p>[{{ props.place.code }}] - {{ props.place.name }}</p>
<div class="message-content">{{ props.place.text }}</div>
<p v-for="application in props.place.applications">{{ application.name }}</p>
<p v-for="application in props.place.applications" v-bind:key="application.name">{{ application.name }}</p>
</div>
<div v-if="mode == 'edit'" class="place-block">