fixed sctoll top per page change

This commit is contained in:
Mamalizz
2025-05-12 15:28:06 +03:30
parent 5f95373fb3
commit 4cb139ca03
5 changed files with 9 additions and 17 deletions
@@ -42,13 +42,8 @@ const { selectedVariant } = inject("productVariant") as ProductVariantProvideTyp
</span>
<ul class="list-disc w-full ps-5">
<li
v-for="detail in [
item.detail_text1,
item.detail_text2,
item.detail_text3,
item.detail_text4,
]"
class="text-slate-500 typo-p-md"
v-for="detail in item.texts"
class="text-slate-500 text-sm leading-[175%] mt-1.5"
>
{{ detail }}
</li>
-5
View File
@@ -1,5 +0,0 @@
export default defineNuxtRouteMiddleware((to, from) => {
if (to.path !== from.path && process.client) {
window.scrollTo(0, 0);
}
});
+1 -1
View File
@@ -239,7 +239,7 @@ const handleSubmit = (withValidation: boolean) => {
</DataField>
<DataField
id="personal-data-birth-date"
label="تاریsخ تولد"
label="تاریخ تولد"
:error="formValidator$.birth_date"
>
<Datepicker
+5
View File
@@ -0,0 +1,5 @@
export default defineNuxtPlugin((nuxtApp) => {
nuxtApp.hook("page:finish", () => {
window.scrollTo(0, 0);
});
});
+1 -4
View File
@@ -62,10 +62,7 @@ declare global {
type ProductDetailItem = {
id: number;
title: string;
detail_text1: string;
detail_text2: string;
detail_text3: string;
detail_text4: string;
texts: string[];
};
type ProductDetail = {