fix: eslint and lint fixed
This commit is contained in:
@@ -7,4 +7,4 @@ export const footerList = {
|
||||
icon: 'github',
|
||||
},
|
||||
],
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,19 +1,21 @@
|
||||
<script setup lang="ts">
|
||||
import { footerList } from './config';
|
||||
const skip = (url: string) => {
|
||||
window.open(url);
|
||||
};
|
||||
import { footerList } from './config'
|
||||
|
||||
function skip(url: string) {
|
||||
window.open(url)
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="footer-container">
|
||||
<ul class="flex justify-center">
|
||||
<li
|
||||
v-for="item in footerList.data"
|
||||
:key="item.id"
|
||||
@click="skip(item.url)"
|
||||
class="flex items-center gap-1 cursor-pointer"
|
||||
@click="skip(item.url)"
|
||||
>
|
||||
<svg-icon :name="item.icon"></svg-icon>
|
||||
<svg-icon :name="item.icon" />
|
||||
<p>{{ item.name }}</p>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
@@ -1,17 +1,17 @@
|
||||
export const navList = [
|
||||
{
|
||||
id: 0,
|
||||
name: '首页',
|
||||
url: 'home',
|
||||
},
|
||||
{
|
||||
id: 1,
|
||||
name: '项目',
|
||||
url: 'project',
|
||||
},
|
||||
{
|
||||
id: 2,
|
||||
name: '关于',
|
||||
url: 'about',
|
||||
},
|
||||
{
|
||||
id: 0,
|
||||
name: '首页',
|
||||
url: 'home',
|
||||
},
|
||||
{
|
||||
id: 1,
|
||||
name: '项目',
|
||||
url: 'project',
|
||||
},
|
||||
{
|
||||
id: 2,
|
||||
name: '关于',
|
||||
url: 'about',
|
||||
},
|
||||
]
|
||||
|
||||
@@ -1,41 +1,52 @@
|
||||
<script setup lang="ts">
|
||||
import { navList } from './config';
|
||||
const skip = (url: string) => {
|
||||
window.open(url, '_self');
|
||||
};
|
||||
import { navList } from './config'
|
||||
|
||||
function skip(url: string) {
|
||||
window.open(url, '_self')
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="h-full header-container">
|
||||
<div class="p-0 navbar bg-base-100">
|
||||
<div class="navbar-start max-lg:w-full">
|
||||
<div class="dropdown">
|
||||
<label tabindex="0" class="btn btn-ghost lg:hidden">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" class="w-5 h-5" fill="none" viewBox="0 0 24 24"
|
||||
stroke="currentColor">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2"
|
||||
d="M4 6h16M4 12h8m-8 6h16" />
|
||||
</svg>
|
||||
</label>
|
||||
<ul tabindex="0"
|
||||
class="menu menu-sm dropdown-content mt-3 z-[1] p-2 shadow bg-base-100 rounded-box w-52 text-lg flex flex-col gap-2">
|
||||
<li class="cursor-pointer hover:text-gray-100 hover:bg-base-200" v-for="item in navList" :key="item.id" @click="skip(item.url)">{{ item.name }}</li>
|
||||
</ul>
|
||||
</div>
|
||||
<a class="text-xl lg:pl-12 max-lg:mx-auto" href="https://vitejs.dev" target="_blank">
|
||||
<img src="/vite.svg" class="logo" alt="Vite logo" />
|
||||
</a>
|
||||
</div>
|
||||
<div class="hidden navbar-center lg:flex">
|
||||
<ul class="flex gap-10 px-1 text-lg cursor-pointer menu menu-horizontal">
|
||||
<li class="hover:text-gray-100" v-for="item in navList" :key="item.id" @click="skip(item.url)">{{ item.name }}</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="navbar-end max-lg:w-0">
|
||||
<a class="btn">Button</a>
|
||||
<div class="h-full header-container">
|
||||
<div class="p-0 navbar bg-base-100">
|
||||
<div class="navbar-start max-lg:w-full">
|
||||
<div class="dropdown">
|
||||
<label tabindex="0" class="btn btn-ghost lg:hidden">
|
||||
<svg
|
||||
xmlns="http://www.w3.org/2000/svg" class="w-5 h-5" fill="none" viewBox="0 0 24 24"
|
||||
stroke="currentColor"
|
||||
>
|
||||
<path
|
||||
stroke-linecap="round" stroke-linejoin="round" stroke-width="2"
|
||||
d="M4 6h16M4 12h8m-8 6h16"
|
||||
/>
|
||||
</svg>
|
||||
</label>
|
||||
<ul
|
||||
tabindex="0"
|
||||
class="menu menu-sm dropdown-content mt-3 z-[1] p-2 shadow bg-base-100 rounded-box w-52 text-lg flex flex-col gap-2"
|
||||
>
|
||||
<li v-for="item in navList" :key="item.id" class="cursor-pointer hover:text-gray-100 hover:bg-base-200" @click="skip(item.url)">
|
||||
{{ item.name }}
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<a class="text-xl lg:pl-12 max-lg:mx-auto" href="https://vitejs.dev" target="_blank">
|
||||
<img src="/vite.svg" class="logo" alt="Vite logo">
|
||||
</a>
|
||||
</div>
|
||||
<div class="hidden navbar-center lg:flex">
|
||||
<ul class="flex gap-10 px-1 text-lg cursor-pointer menu menu-horizontal">
|
||||
<li v-for="item in navList" :key="item.id" class="hover:text-gray-100" @click="skip(item.url)">
|
||||
{{ item.name }}
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="navbar-end max-lg:w-0">
|
||||
<a class="btn">Button</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<style scoped lang="scss"></style>
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
<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'
|
||||
// import Header from './Header/index.vue';
|
||||
// import Footer from './Footer/index.vue';
|
||||
import { ref } from 'vue'
|
||||
|
||||
const mainContainer = ref<HTMLElement | null>(null)
|
||||
|
||||
const { y} = useScroll(mainContainer)
|
||||
const { y } = useScroll(mainContainer)
|
||||
|
||||
const scrollToTop=()=>{
|
||||
y.value=0
|
||||
function scrollToTop() {
|
||||
y.value = 0
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -19,16 +19,16 @@ const scrollToTop=()=>{
|
||||
<!-- <header class="shadow-2xl head-container h-14">
|
||||
<Header></Header>
|
||||
</header> -->
|
||||
<ToTop @click="scrollToTop" v-if="y>400"></ToTop>
|
||||
<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"></router-view>
|
||||
|
||||
<router-view class="h-full main-container-content" />
|
||||
</main>
|
||||
<!-- <footer class="w-screen footer-container">
|
||||
<Footer></Footer>
|
||||
</footer> -->
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<style scoped lang="scss">
|
||||
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user