ปรับขนาด popup

This commit is contained in:
Warunee Tamkoo 2023-11-14 18:01:22 +07:00
parent 85d163fb64
commit d47ea34dd9
3 changed files with 11 additions and 9 deletions

View file

@ -23,7 +23,7 @@ const props = defineProps({
}, },
}) })
const dataById = ref<any>([]) const dataByIdVal = ref<any>([])
const date = ref<Date | null>(null) const date = ref<Date | null>(null)
const checkboxIn = ref<boolean>(false) const checkboxIn = ref<boolean>(false)
const checkboxOut = ref<boolean>(false) const checkboxOut = ref<boolean>(false)
@ -32,8 +32,8 @@ const statusAction = ref<boolean>(false)
onMounted(() => { onMounted(() => {
updateClock() updateClock()
dataById.value = props.dataById dataByIdVal.value = props.dataById
if (dataById.value == null) { if (dataByIdVal.value == null) {
statusAction.value = true statusAction.value = true
} }
}) })
@ -159,7 +159,7 @@ watch(
<div class="col-1"> <div class="col-1">
<q-icon color="grey-5" name="calendar_today" /> <q-icon color="grey-5" name="calendar_today" />
</div> </div>
<div class="col">{{ covertDateObject(dataById.date) }}</div> <div class="col">{{ covertDateObject(dataByIdVal.date) }}</div>
</div> </div>
</q-card> </q-card>
@ -191,6 +191,7 @@ watch(
</div> </div>
</div> </div>
</q-card> </q-card>
<div <div
v-if="checkstatusBox" v-if="checkstatusBox"
class="text-red-9 q-pa-sm" class="text-red-9 q-pa-sm"
@ -198,6 +199,7 @@ watch(
> >
กรณาเลอก กรณาเลอก
</div> </div>
<q-card flat bordered class="q-pa-sm col-12 q-mt-sm"> <q-card flat bordered class="q-pa-sm col-12 q-mt-sm">
<q-input <q-input
ref="reasonRef" ref="reasonRef"
@ -206,7 +208,7 @@ watch(
v-model="reason" v-model="reason"
label="เหตุผล" label="เหตุผล"
type="textarea" type="textarea"
:rows="$q.screen.gt.xs ? '5' : '1'" :rows="4"
label-color="grey-5" label-color="grey-5"
:rules="[(val) => !!val || 'กรุณากรอกเหตุผล']" :rules="[(val) => !!val || 'กรุณากรอกเหตุผล']"
lazy-rules lazy-rules

View file

@ -34,8 +34,8 @@ watch(props, () => {
}) })
</script> </script>
<template> <template>
<q-dialog v-model="props.modal" full-height> <q-dialog v-model="props.modal">
<q-card class="column full-height" style="width: 300px"> <q-card class="column" style="width: 300px; min-height: 600px;">
<HeaderPopup :title="props.title" :clickClose="clickClosePopup" /> <HeaderPopup :title="props.title" :clickClose="clickClosePopup" />
<FormTime :dataById="data" :closePopup="clickClosePopup" /> <FormTime :dataById="data" :closePopup="clickClosePopup" />
</q-card> </q-card>

View file

@ -5,7 +5,7 @@ import Popup from '@/components/PopUp.vue'
// import HeaderPopup from "@/components/HeaderPopup.vue"; // import HeaderPopup from "@/components/HeaderPopup.vue";
// import FormTime from "@/components/FormTime.vue"; // import FormTime from "@/components/FormTime.vue";
const filterYear = ref<string>('') const filterYear = ref<number>(new Date().getFullYear() + 543)
const yearOption = ref<DataOption[]>([{ id: '2566', name: '2566' }]) const yearOption = ref<DataOption[]>([{ id: '2566', name: '2566' }])
const titleName = ref<string>('เพิ่มรายการลงเวลากรณีพิเศษ') const titleName = ref<string>('เพิ่มรายการลงเวลากรณีพิเศษ')
@ -24,7 +24,7 @@ function onClickClose() {
dense dense
outlined outlined
style="width: 180px" style="width: 180px"
label="ปีประวัติลงเวลา" label="ปีงบประมาณ"
v-model="filterYear" v-model="filterYear"
:options="yearOption" :options="yearOption"
option-label="name" option-label="name"