เพิ่ม form สร้าง schedule
This commit is contained in:
parent
f86a0d70ca
commit
04dc730adc
2 changed files with 315 additions and 0 deletions
46
src/modules/04_system/components/formDialog.vue
Normal file
46
src/modules/04_system/components/formDialog.vue
Normal file
|
|
@ -0,0 +1,46 @@
|
|||
<script setup lang="ts">
|
||||
import DialogHeader from "@/components/DialogHeader.vue";
|
||||
|
||||
const openDialog = defineModel<boolean>("openDialog", {
|
||||
required: true,
|
||||
default: false,
|
||||
});
|
||||
|
||||
defineProps<{
|
||||
title: string;
|
||||
submit?: (...args: unknown[]) => void;
|
||||
close?: (...args: unknown[]) => void;
|
||||
}>();
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<q-dialog v-model="openDialog" class="dialog-content-top">
|
||||
<q-card style="width: 80%">
|
||||
<q-form
|
||||
greedy
|
||||
@submit.prevent
|
||||
@validation-success="submit"
|
||||
class="full-height"
|
||||
>
|
||||
<!-- header -->
|
||||
<DialogHeader :tittle="title" :close="close" />
|
||||
<q-separator />
|
||||
|
||||
<q-card-section> <slot /> </q-card-section>
|
||||
|
||||
<q-separator />
|
||||
<q-card-actions align="right">
|
||||
<q-btn label="บันทึก" color="secondary" type="submit"
|
||||
><q-tooltip>บันทึกข้อมูล</q-tooltip></q-btn
|
||||
>
|
||||
</q-card-actions>
|
||||
</q-form>
|
||||
</q-card>
|
||||
</q-dialog>
|
||||
</template>
|
||||
|
||||
<style lang="scss">
|
||||
.form-header {
|
||||
border-bottom: 1px solid $grey-2;
|
||||
}
|
||||
</style>
|
||||
Loading…
Add table
Add a link
Reference in a new issue