diff --git a/src/components/PlaceBlock.vue b/src/components/PlaceBlock.vue index 88822af..8bc2819 100644 --- a/src/components/PlaceBlock.vue +++ b/src/components/PlaceBlock.vue @@ -17,7 +17,7 @@ import { NUploadDragger, type UploadFileInfo, } from 'naive-ui' -import { computed, type PropType, ref } from 'vue' +import { computed, ref } from 'vue' import type { Application, Door, Key, Place } from '@/api/generated/crabs/evening_detective_server' import type { EditableApplication } from '@/types/editor' @@ -30,31 +30,20 @@ type PlaceWithFileList = Place & { fileList?: UploadFileInfo[] } -const props = defineProps({ - newPlaceCode: { - type: String, +const props = withDefaults( + defineProps<{ + newPlaceCode?: string + newPlaceName?: string + newPlaceText?: string + place?: PlaceWithFileList + mode: string + mcp?: boolean + addAction?: (param: string) => void + }>(), + { + mcp: false, }, - newPlaceName: { - type: String, - }, - newPlaceText: { - type: String, - }, - place: { - type: Object as PropType, - }, - mode: { - type: String, - required: true, - }, - mcp: { - type: Boolean, - default: false, - }, - addAction: { - type: Function as PropType<(param: string) => void>, - }, -}) +) const emit = defineEmits<{ 'update:newPlaceCode': [value: string]