แก้ router

This commit is contained in:
Tanyalak 2023-12-20 10:20:27 +07:00
parent 6a699e0004
commit feb0070f95
3 changed files with 3 additions and 7 deletions

View file

@ -2,7 +2,6 @@
import { ref} from "vue";
import { useRouter } from "vue-router";
import { useQuasar } from "quasar";
const router = useRouter();
const $q = useQuasar();
@ -61,7 +60,7 @@ const clickMain = (val: string) => {
tab.value=val
};
const clickTab= (val2: string,el: any ) => {
const clickTab= (val2: string) => {
router.push(val2)
window.scrollTo({ top: 0, left: 0, behavior: 'smooth' });
};
@ -87,8 +86,7 @@ const onScroll = (info: any) => { scrollInfo.value = info}
</script>
<!-- โครงเว -->
<template>
<q-layout view="hHh LpR fFr" @scroll="onScroll" >
<q-layout view="hHh LpR fFr" @scroll="onScroll" >
<!-- header -->
<q-header flat :class="scrollInfo.position >= 10 ? 'text-dark col-12 bgHeader': 'text-dark col-12 bg-transparent'" height-hint="7">
<q-toolbar class="items-center" :style="$q.screen.gt.xs ? 'padding: 1% 2%;': 'padding: 1% 4%;'">