This commit is contained in:
Parsa Nazer
2025-09-22 13:21:03 +03:30
5 changed files with 8 additions and 9 deletions
@@ -134,15 +134,14 @@ const handleSubmit = async () => {
}; };
watch( watch(
() => addressData.value.for_me, () => [addressData.value.for_me, isShow.value],
(newValue) => { ([newValue, newValue2]) => {
if (!isEditing.value) { if (!isEditing.value) {
addressData.value.phone = newValue == "بله" ? account.value!.phone : ""; addressData.value.phone = newValue == "بله" && newValue2 ? account.value?.phone ?? "" : "";
} }
}, },
{ {
immediate: true, immediate: true,
deep: true,
} }
); );
</script> </script>
@@ -178,7 +177,7 @@ watch(
<div class="grid w-full grid-cols-1 gap-6 md:grid-cols-2 lg:grid-cols-3"> <div class="grid w-full grid-cols-1 gap-6 md:grid-cols-2 lg:grid-cols-3">
<DataField <DataField
id="name" id="name"
label="نام پیش فرض" label="نام پیش فرض آدرس"
> >
<Input <Input
id="name" id="name"
@@ -252,7 +252,7 @@ watch(
mode="out-in" mode="out-in"
> >
<span class="flex-center gap-3"> <span class="flex-center gap-3">
ثبت فیلتر جدید ثبت فیلتر
<Icon <Icon
name="ci:plus" name="ci:plus"
size="20" size="20"
+1 -1
View File
@@ -96,7 +96,7 @@ const deliveryData = ref<DeliveryData>({
<AddressItem <AddressItem
v-for="(address, index) in addresses" v-for="(address, index) in addresses"
:key="index" :key="index"
:isSelected="address.id === cart?.address.id" :isSelected="address.id === cart?.address?.id"
:address="address" :address="address"
/> />
</div> </div>
+1 -1
View File
@@ -81,7 +81,7 @@ const hasCartItem = computed(() => !!cart.value && cart.value.items.length! > 0)
icon="bi:cart" icon="bi:cart"
> >
<template #actions> <template #actions>
<NuxtLink :to="{ name: 'products' }"> <NuxtLink :to="{ name: 'products-slug' }">
<Button <Button
class="rounded-full" class="rounded-full"
size="md" size="md"
+1 -1
View File
@@ -158,7 +158,7 @@ declare global {
}; };
type Address = { type Address = {
id: number | undefined; id: number;
province: string | undefined; province: string | undefined;
city: string | undefined; city: string | undefined;
postal_code: string | undefined; postal_code: string | undefined;