feat: nuxt-claude 프로젝트 초기 커밋
Some checks failed
ci / ci (22, ubuntu-latest) (push) Failing after 25m52s
Some checks failed
ci / ci (22, ubuntu-latest) (push) Failing after 25m52s
Made-with: Cursor
This commit is contained in:
32
app/components/purchases/PurchaseModal.vue
Normal file
32
app/components/purchases/PurchaseModal.vue
Normal file
@@ -0,0 +1,32 @@
|
||||
<script setup lang="ts">
|
||||
import type { Purchase, PurchaseInsert } from '~/types/purchase'
|
||||
|
||||
const props = defineProps<{
|
||||
open: boolean
|
||||
initial?: Purchase
|
||||
}>()
|
||||
|
||||
const emit = defineEmits<{
|
||||
'update:open': [value: boolean]
|
||||
submit: [data: PurchaseInsert]
|
||||
}>()
|
||||
|
||||
const title = computed(() => props.initial ? '장비 수정' : '장비 추가')
|
||||
|
||||
function handleSubmit(data: PurchaseInsert) {
|
||||
emit('submit', data)
|
||||
emit('update:open', false)
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<UModal :open="open" :title="title" @update:open="emit('update:open', $event)">
|
||||
<template #body>
|
||||
<PurchasesPurchaseForm
|
||||
:initial="initial"
|
||||
@submit="handleSubmit"
|
||||
@cancel="emit('update:open', false)"
|
||||
/>
|
||||
</template>
|
||||
</UModal>
|
||||
</template>
|
||||
Reference in New Issue
Block a user