fixed sctoll top per page change
This commit is contained in:
@@ -42,13 +42,8 @@ const { selectedVariant } = inject("productVariant") as ProductVariantProvideTyp
|
|||||||
</span>
|
</span>
|
||||||
<ul class="list-disc w-full ps-5">
|
<ul class="list-disc w-full ps-5">
|
||||||
<li
|
<li
|
||||||
v-for="detail in [
|
v-for="detail in item.texts"
|
||||||
item.detail_text1,
|
class="text-slate-500 text-sm leading-[175%] mt-1.5"
|
||||||
item.detail_text2,
|
|
||||||
item.detail_text3,
|
|
||||||
item.detail_text4,
|
|
||||||
]"
|
|
||||||
class="text-slate-500 typo-p-md"
|
|
||||||
>
|
>
|
||||||
{{ detail }}
|
{{ detail }}
|
||||||
</li>
|
</li>
|
||||||
|
|||||||
@@ -1,5 +0,0 @@
|
|||||||
export default defineNuxtRouteMiddleware((to, from) => {
|
|
||||||
if (to.path !== from.path && process.client) {
|
|
||||||
window.scrollTo(0, 0);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
@@ -239,7 +239,7 @@ const handleSubmit = (withValidation: boolean) => {
|
|||||||
</DataField>
|
</DataField>
|
||||||
<DataField
|
<DataField
|
||||||
id="personal-data-birth-date"
|
id="personal-data-birth-date"
|
||||||
label="تاریsخ تولد"
|
label="تاریخ تولد"
|
||||||
:error="formValidator$.birth_date"
|
:error="formValidator$.birth_date"
|
||||||
>
|
>
|
||||||
<Datepicker
|
<Datepicker
|
||||||
|
|||||||
@@ -0,0 +1,5 @@
|
|||||||
|
export default defineNuxtPlugin((nuxtApp) => {
|
||||||
|
nuxtApp.hook("page:finish", () => {
|
||||||
|
window.scrollTo(0, 0);
|
||||||
|
});
|
||||||
|
});
|
||||||
Vendored
+1
-4
@@ -62,10 +62,7 @@ declare global {
|
|||||||
type ProductDetailItem = {
|
type ProductDetailItem = {
|
||||||
id: number;
|
id: number;
|
||||||
title: string;
|
title: string;
|
||||||
detail_text1: string;
|
texts: string[];
|
||||||
detail_text2: string;
|
|
||||||
detail_text3: string;
|
|
||||||
detail_text4: string;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
type ProductDetail = {
|
type ProductDetail = {
|
||||||
|
|||||||
Reference in New Issue
Block a user