Compare commits

..

No commits in common. "d6e56afbe79237c881708422b27332e59712529d" and "602dca6ee67ca1f0ea1a287910c6261ecf5726a6" have entirely different histories.

View File

@ -2,7 +2,7 @@
import customHeader from "@/components/customHeader/index.vue";
import customFooter from "@/components/customFooter/index.vue";
import { NScrollbar } from "naive-ui";
import { computed, watch, ref } from "vue";
import { computed } from "vue";
import { useRoute } from "vue-router";
const route = useRoute();
@ -55,18 +55,12 @@ const currentBg = computed(() => {
//
return { background: value };
});
const scrollbarRef = ref(null);
watch(route, () => {
scrollbarRef.value?.scrollTo({ top: 0 });
})
</script>
<template>
<div class="flex flex-col h-screen">
<customHeader></customHeader>
<n-scrollbar
ref="scrollbarRef"
class="bg-cover bg-center bg-no-repeat flex-1"
style="background-size: 100% 100%; background-attachment: fixed"
:style="currentBg"