feat(for): for

This commit is contained in:
ex_zhangwenlei@exiot.cmcc
2024-01-09 01:03:42 +08:00
parent bea54865ea
commit f34e850ff0
26 changed files with 500 additions and 404 deletions

View File

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