feat: 添加Loading效果

This commit is contained in:
LOG1997
2025-10-12 22:30:54 +08:00
parent ebbed65253
commit 27fd0768c1
11 changed files with 266 additions and 155 deletions

View File

@@ -1,12 +1,12 @@
<script setup lang="ts">
import ToTop from '@/components/ToTop/index.vue'
import { useScroll } from '@vueuse/core'
// import Header from './Header/index.vue';
// import Footer from './Footer/index.vue';
import { ref } from 'vue'
import { Loading } from '@/components/Loading'
import ToTop from '@/components/ToTop/index.vue'
const mainContainer = ref<HTMLElement | null>(null)
const { y } = useScroll(mainContainer)
function scrollToTop() {
@@ -19,6 +19,7 @@ function scrollToTop() {
<!-- <header class="shadow-2xl head-container h-14">
<Header></Header>
</header> -->
<Loading />
<ToTop v-if="y > 400" @click="scrollToTop" />
<main ref="mainContainer" class="box-content w-screen h-screen overflow-x-hidden overflow-y-auto main-container">
<router-view class="h-full main-container-content" />