refactor: edit form use FormComponent (name, top, byType) instead
This commit is contained in:
parent
af986e0ae9
commit
ee66e825bb
5 changed files with 565 additions and 467 deletions
|
|
@ -1,5 +1,5 @@
|
|||
<script setup lang="ts">
|
||||
import { ref, onMounted, watch } from 'vue';
|
||||
import { ref, onMounted } from 'vue';
|
||||
import AppBox from 'components/app/AppBox.vue';
|
||||
|
||||
import { Province, District, SubDistrict } from 'stores/address';
|
||||
|
|
@ -22,9 +22,9 @@ const adrressStore = useAddressStore();
|
|||
const modal = defineModel('modal', { default: false });
|
||||
const address = defineModel('address', { default: '' });
|
||||
const addressEN = defineModel('addressEN', { default: '' });
|
||||
const provinceId = defineModel<string>('provinceId');
|
||||
const districtId = defineModel<string>('districtId');
|
||||
const subDistrictId = defineModel<string>('subDistrictId');
|
||||
const provinceId = defineModel<string | null | undefined>('provinceId');
|
||||
const districtId = defineModel<string | null | undefined>('districtId');
|
||||
const subDistrictId = defineModel<string | null | undefined>('subDistrictId');
|
||||
const zipCode = defineModel<string>('zipCode', { default: '' });
|
||||
|
||||
const addrOptions = ref<{
|
||||
|
|
@ -88,7 +88,7 @@ onMounted(async () => {
|
|||
});
|
||||
</script>
|
||||
<template>
|
||||
<q-dialog full-width v-model="modal">
|
||||
<q-dialog full-width v-model="modal" @hide="close">
|
||||
<AppBox style="padding: 0; border-radius: var(--radius-2); max-width: 80%">
|
||||
<q-form greedy @submit.prevent @validation-success="submit">
|
||||
<!-- header -->
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue