refactor: edit typo addressStore
This commit is contained in:
parent
fcb4c4a5f8
commit
d764650b63
1 changed files with 6 additions and 4 deletions
|
|
@ -34,7 +34,7 @@ defineProps<{
|
|||
useWorkPlace?: boolean;
|
||||
}>();
|
||||
|
||||
const adrressStore = useAddressStore();
|
||||
const addressStore = useAddressStore();
|
||||
const workplace = defineModel<string>('workplace', { default: '' });
|
||||
const workplaceEN = defineModel<string>('workplaceEn', { default: '' });
|
||||
const address = defineModel('address', { default: '' });
|
||||
|
|
@ -81,6 +81,8 @@ const addrOptions = reactive<{
|
|||
|
||||
const { t } = useI18n();
|
||||
|
||||
const area = computed(() => {});
|
||||
|
||||
const fullAddress = computed(() => {
|
||||
const province = provinceOptions.value.find((v) => v.id === provinceId.value);
|
||||
const district = districtOptions.value.find((v) => v.id === districtId.value);
|
||||
|
|
@ -135,7 +137,7 @@ const fullAddressEN = computed(() => {
|
|||
});
|
||||
|
||||
async function fetchProvince() {
|
||||
const result = await adrressStore.fetchProvince();
|
||||
const result = await addressStore.fetchProvince();
|
||||
|
||||
if (result) addrOptions.provinceOps = result;
|
||||
|
||||
|
|
@ -155,7 +157,7 @@ async function fetchProvince() {
|
|||
async function fetchDistrict() {
|
||||
if (!provinceId.value) return;
|
||||
|
||||
const result = await adrressStore.fetchDistrictByProvinceId(provinceId.value);
|
||||
const result = await addressStore.fetchDistrictByProvinceId(provinceId.value);
|
||||
if (result) addrOptions.districtOps = result;
|
||||
|
||||
districtFilter = selectFilterOptionRefMod(
|
||||
|
|
@ -173,7 +175,7 @@ async function fetchDistrict() {
|
|||
|
||||
async function fetchSubDistrict() {
|
||||
if (!districtId.value) return;
|
||||
const result = await adrressStore.fetchSubDistrictByProvinceId(
|
||||
const result = await addressStore.fetchSubDistrictByProvinceId(
|
||||
districtId.value,
|
||||
);
|
||||
if (result) addrOptions.subDistrictOps = result;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue