fix: form dialog tab & address
This commit is contained in:
parent
8f232fa1de
commit
0633f68a58
3 changed files with 9 additions and 5 deletions
|
|
@ -86,6 +86,7 @@ watch(districtId, fetchSubDistrict);
|
||||||
style="border-radius: var(--radius-3)"
|
style="border-radius: var(--radius-3)"
|
||||||
>
|
>
|
||||||
<span
|
<span
|
||||||
|
id="same"
|
||||||
class="q-px-sm q-mr-lg rounded cursor-pointer"
|
class="q-px-sm q-mr-lg rounded cursor-pointer"
|
||||||
:class="{
|
:class="{
|
||||||
dark: $q.dark.isActive,
|
dark: $q.dark.isActive,
|
||||||
|
|
@ -97,6 +98,7 @@ watch(districtId, fetchSubDistrict);
|
||||||
{{ $t('formDialogToggleSameAddress') }}
|
{{ $t('formDialogToggleSameAddress') }}
|
||||||
</span>
|
</span>
|
||||||
<span
|
<span
|
||||||
|
id="custom"
|
||||||
class="q-px-sm rounded cursor-pointer"
|
class="q-px-sm rounded cursor-pointer"
|
||||||
:class="{
|
:class="{
|
||||||
dark: $q.dark.isActive,
|
dark: $q.dark.isActive,
|
||||||
|
|
|
||||||
|
|
@ -16,6 +16,7 @@ defineProps<{
|
||||||
noAppBox?: boolean;
|
noAppBox?: boolean;
|
||||||
noPaddingTab?: boolean;
|
noPaddingTab?: boolean;
|
||||||
maxWidth?: number;
|
maxWidth?: number;
|
||||||
|
width?: number;
|
||||||
employee?: boolean;
|
employee?: boolean;
|
||||||
noAddress?: boolean;
|
noAddress?: boolean;
|
||||||
disabledRule?: boolean;
|
disabledRule?: boolean;
|
||||||
|
|
@ -38,14 +39,15 @@ const districtId = defineModel<string | null | undefined>('districtId');
|
||||||
const subDistrictId = defineModel<string | null | undefined>('subDistrictId');
|
const subDistrictId = defineModel<string | null | undefined>('subDistrictId');
|
||||||
const zipCode = defineModel<string>('zipCode', { default: '' });
|
const zipCode = defineModel<string>('zipCode', { default: '' });
|
||||||
const sameWithEmployer = defineModel<boolean>('sameWithEmployer');
|
const sameWithEmployer = defineModel<boolean>('sameWithEmployer');
|
||||||
const employeeTab = defineModel<string>('employeeTab');
|
|
||||||
|
const currentTab = defineModel<string>('currentTab');
|
||||||
const tabsList = defineModel<{ name: string; label: string }[]>('tabsList');
|
const tabsList = defineModel<{ name: string; label: string }[]>('tabsList');
|
||||||
</script>
|
</script>
|
||||||
<template>
|
<template>
|
||||||
<q-dialog v-model="modal" @hide="close">
|
<q-dialog v-model="modal" @hide="close">
|
||||||
<AppBox
|
<AppBox
|
||||||
style="padding: 0; border-radius: var(--radius-2); max-height: 100%"
|
style="padding: 0; border-radius: var(--radius-2); max-height: 100%"
|
||||||
:style="`max-width:${maxWidth ? maxWidth : '85'}%`"
|
:style="`max-width:${maxWidth ? maxWidth : '85%'}; width: ${width ? width : '85%'}`"
|
||||||
>
|
>
|
||||||
<q-form greedy @submit.prevent @validation-success="submit">
|
<q-form greedy @submit.prevent @validation-success="submit">
|
||||||
<!-- header -->
|
<!-- header -->
|
||||||
|
|
@ -145,7 +147,7 @@ const tabsList = defineModel<{ name: string; label: string }[]>('tabsList');
|
||||||
<q-tabs
|
<q-tabs
|
||||||
dense
|
dense
|
||||||
class="app-text-muted cancel-overflow"
|
class="app-text-muted cancel-overflow"
|
||||||
v-model="employeeTab"
|
v-model="currentTab"
|
||||||
active-class="active-tab"
|
active-class="active-tab"
|
||||||
indicator-color="transparent"
|
indicator-color="transparent"
|
||||||
>
|
>
|
||||||
|
|
@ -165,7 +167,7 @@ const tabsList = defineModel<{ name: string; label: string }[]>('tabsList');
|
||||||
:class="{
|
:class="{
|
||||||
dark: $q.dark.isActive,
|
dark: $q.dark.isActive,
|
||||||
'surface-2': !employee,
|
'surface-2': !employee,
|
||||||
'surface-tab': employee,
|
'surface-tab': employee || tabsList,
|
||||||
}"
|
}"
|
||||||
:style="
|
:style="
|
||||||
$q.screen.gt.sm
|
$q.screen.gt.sm
|
||||||
|
|
|
||||||
|
|
@ -1784,7 +1784,7 @@ watch(currentStatus, async () => {
|
||||||
formDataEmployeeTab === 'workHistory'
|
formDataEmployeeTab === 'workHistory'
|
||||||
"
|
"
|
||||||
v-model:tabs-list="employeeTab"
|
v-model:tabs-list="employeeTab"
|
||||||
v-model:employee-tab="formDataEmployeeTab"
|
v-model:current-tab="formDataEmployeeTab"
|
||||||
v-model:same-with-employer="formDataEmployeeSameAddr"
|
v-model:same-with-employer="formDataEmployeeSameAddr"
|
||||||
v-model:address="formDataEmployee.address"
|
v-model:address="formDataEmployee.address"
|
||||||
v-model:addressEN="formDataEmployee.addressEN"
|
v-model:addressEN="formDataEmployee.addressEN"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue