เพิ่มลงเวลากรณีพิเศษ (USER) #32

This commit is contained in:
DESKTOP-1R2VSQH\Lenovo ThinkPad E490 2023-11-24 16:39:55 +07:00
parent 2dea65c4df
commit 0ec7e83d0d
8 changed files with 196 additions and 80 deletions

View file

@ -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>