เพิ่มลงเวลากรณีพิเศษ (USER) #32
This commit is contained in:
parent
2dea65c4df
commit
0ec7e83d0d
8 changed files with 196 additions and 80 deletions
|
|
@ -1,5 +1,6 @@
|
|||
<script setup lang="ts">
|
||||
import { ref, watch } from 'vue'
|
||||
|
||||
import HeaderPopup from '@/components/HeaderPopup.vue'
|
||||
import FormTime from '@/components/FormTime.vue'
|
||||
|
||||
|
|
@ -20,24 +21,33 @@ const props = defineProps({
|
|||
type: Object,
|
||||
default: null,
|
||||
},
|
||||
fetcthDataTable: {
|
||||
type: Function,
|
||||
require: true,
|
||||
},
|
||||
})
|
||||
|
||||
// -ข้อมูล
|
||||
const data = ref<any>()
|
||||
function clickClosePopup() {
|
||||
props.clickClose()
|
||||
}
|
||||
watch(props, () => {
|
||||
if (props.modal === true) {
|
||||
data.value = props.dataById
|
||||
|
||||
watch(
|
||||
() => props.modal,
|
||||
() => {
|
||||
data.value = props.modal ? props.dataById : null
|
||||
}
|
||||
})
|
||||
)
|
||||
</script>
|
||||
<template>
|
||||
<q-dialog v-model="props.modal">
|
||||
<q-card class="column" style="width: 300px; min-height: 600px;">
|
||||
<q-card class="column" style="width: 300px; min-height: 600px">
|
||||
<HeaderPopup :title="props.title" :clickClose="clickClosePopup" />
|
||||
<FormTime :dataById="data" :closePopup="clickClosePopup" />
|
||||
<FormTime
|
||||
:dataById="data"
|
||||
:closePopup="clickClosePopup"
|
||||
:fetcthDataTable="props.fetcthDataTable"
|
||||
/>
|
||||
</q-card>
|
||||
</q-dialog>
|
||||
</template>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue