chore: 构建大小写问题
This commit is contained in:
@@ -1,83 +1,83 @@
|
||||
<template>
|
||||
<div class="common-layout">
|
||||
<el-container class="common-container">
|
||||
<el-header
|
||||
class="common-header"
|
||||
ref="header"
|
||||
:class="[isFixed ? 'fixed' : '']"
|
||||
>
|
||||
<AppHeader />
|
||||
</el-header>
|
||||
<el-main class="common-main">
|
||||
<SignBody />
|
||||
</el-main>
|
||||
</el-container>
|
||||
</div>
|
||||
</template>
|
||||
<script setup>
|
||||
import { ref, onMounted } from "vue";
|
||||
import AppHeader from "../AppHeader.vue";
|
||||
import SignBody from "./components/signBody.vue";
|
||||
|
||||
const header = ref(null);
|
||||
const isFixed = ref(false);
|
||||
|
||||
onMounted(() => {
|
||||
window.addEventListener("scroll", handleScroll);
|
||||
});
|
||||
|
||||
const handleScroll = () => {
|
||||
const scrollTop =
|
||||
window.scrollY ||
|
||||
document.documentElement.scrollTop ||
|
||||
document.body.scrollTop;
|
||||
const currentEle = header.value.$el;
|
||||
if (scrollTop > currentEle.offsetTop) {
|
||||
isFixed.value = true;
|
||||
} else {
|
||||
isFixed.value = false;
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.common {
|
||||
&-layout {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
&-container {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
&-header {
|
||||
width: 100%;
|
||||
background-color: #fff;
|
||||
box-shadow: rgba(0, 0, 0, 0.1) -4px 9px 25px -6px;
|
||||
height: 60px;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
}
|
||||
&-main {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
width: 100%;
|
||||
height: calc(100% - 50px);
|
||||
}
|
||||
}
|
||||
|
||||
.el-main {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
min-height: 10rem;
|
||||
background-color: #f0f2f5;
|
||||
}
|
||||
|
||||
.fixed {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
z-index: 99999;
|
||||
}
|
||||
</style>
|
||||
<template>
|
||||
<div class="common-layout">
|
||||
<el-container class="common-container">
|
||||
<el-header
|
||||
class="common-header"
|
||||
ref="header"
|
||||
:class="[isFixed ? 'fixed' : '']"
|
||||
>
|
||||
<AppHeader />
|
||||
</el-header>
|
||||
<el-main class="common-main">
|
||||
<ActivityBody />
|
||||
</el-main>
|
||||
</el-container>
|
||||
</div>
|
||||
</template>
|
||||
<script setup>
|
||||
import { ref, onMounted } from "vue";
|
||||
import AppHeader from "../AppHeader.vue";
|
||||
import ActivityBody from "./components/ActivityBody.vue";
|
||||
|
||||
const header = ref(null);
|
||||
const isFixed = ref(false);
|
||||
|
||||
onMounted(() => {
|
||||
window.addEventListener("scroll", handleScroll);
|
||||
});
|
||||
|
||||
const handleScroll = () => {
|
||||
const scrollTop =
|
||||
window.scrollY ||
|
||||
document.documentElement.scrollTop ||
|
||||
document.body.scrollTop;
|
||||
const currentEle = header.value.$el;
|
||||
if (scrollTop > currentEle.offsetTop) {
|
||||
isFixed.value = true;
|
||||
} else {
|
||||
isFixed.value = false;
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.common {
|
||||
&-layout {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
&-container {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
&-header {
|
||||
width: 100%;
|
||||
background-color: #fff;
|
||||
box-shadow: rgba(0, 0, 0, 0.1) -4px 9px 25px -6px;
|
||||
height: 60px;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
}
|
||||
&-main {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
width: 100%;
|
||||
height: calc(100% - 50px);
|
||||
}
|
||||
}
|
||||
|
||||
.el-main {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
min-height: 10rem;
|
||||
background-color: #f0f2f5;
|
||||
}
|
||||
|
||||
.fixed {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
z-index: 99999;
|
||||
}
|
||||
</style>
|
||||
@@ -1,32 +1,36 @@
|
||||
<template>
|
||||
<div class="sign-box">
|
||||
<div class="menuList">菜单栏</div>
|
||||
<div class="page">
|
||||
<RouterView />
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup></script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.sign-box {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
width: 1300px;
|
||||
height: 100%;
|
||||
padding: 20px 0 10px;
|
||||
.menuList {
|
||||
width: 25%;
|
||||
height: 100%;
|
||||
background-color: #fff;
|
||||
border-radius: 5px;
|
||||
}
|
||||
.page {
|
||||
width: 70%;
|
||||
height: 100%;
|
||||
background-color: #fff;
|
||||
border-radius: 5px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
<template>
|
||||
<div class="sign-box">
|
||||
<div class="menuList">
|
||||
<ActivityNav/>
|
||||
</div>
|
||||
<div class="page">
|
||||
<RouterView />
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import ActivityNav from './ActivityNav.vue'
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.sign-box {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
width: 1300px;
|
||||
height: 100%;
|
||||
padding: 20px 0 10px;
|
||||
.menuList {
|
||||
width: 20%;
|
||||
height: 100%;
|
||||
background-color: #fff;
|
||||
border-radius: 5px;
|
||||
}
|
||||
.page {
|
||||
width: 75%;
|
||||
height: 100%;
|
||||
background-color: #fff;
|
||||
border-radius: 5px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
44
Yi.Bbs.Vue3/src/layout/activity/components/ActivityNav.vue
Normal file
44
Yi.Bbs.Vue3/src/layout/activity/components/ActivityNav.vue
Normal file
@@ -0,0 +1,44 @@
|
||||
<template>
|
||||
<el-menu
|
||||
default-active="1"
|
||||
class="el-menu-vertical-demo"
|
||||
@open="handleOpen"
|
||||
@close="handleClose"
|
||||
>
|
||||
<el-menu-item index="1">
|
||||
<el-icon><Present /></el-icon>
|
||||
<span>每日签到</span>
|
||||
</el-menu-item>
|
||||
<el-menu-item index="2">
|
||||
<el-icon><Memo /></el-icon>
|
||||
<span>任务列表</span>
|
||||
</el-menu-item>
|
||||
<el-menu-item index="3">
|
||||
<el-icon><HelpFilled /></el-icon>
|
||||
<span>大转盘</span>
|
||||
</el-menu-item>
|
||||
<el-menu-item index="4">
|
||||
<el-icon><Sunrise /></el-icon>
|
||||
<span>娱乐城</span>
|
||||
</el-menu-item>
|
||||
</el-menu>
|
||||
|
||||
</template>
|
||||
<script setup>
|
||||
const handleOpen = (key, keyPath) => {
|
||||
console.log(key, keyPath)
|
||||
}
|
||||
const handleClose = (key, keyPath) => {
|
||||
console.log(key, keyPath)
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.el-menu-item
|
||||
{
|
||||
justify-content: center;
|
||||
}
|
||||
.el-menu{
|
||||
border-right-width: 0px !important;
|
||||
|
||||
}
|
||||
</style>
|
||||
@@ -2,7 +2,7 @@ import { createRouter, createWebHistory } from "vue-router";
|
||||
import Layout from "../layout/Index.vue";
|
||||
import NotFound from "../views/error/404.vue";
|
||||
import LoginLayout from "../layout/LoginLayout.vue";
|
||||
import SignInLayout from "../layout/signIn/index.vue";
|
||||
import ActivityLayout from "../layout/activity/Index.vue";
|
||||
const router = createRouter({
|
||||
history: createWebHistory(import.meta.env.BASE_URL),
|
||||
scrollBehavior(to, from, savedPosition) {
|
||||
@@ -100,15 +100,15 @@ const router = createRouter({
|
||||
],
|
||||
},
|
||||
{
|
||||
path: "/sign",
|
||||
name: "signInLayout",
|
||||
component: SignInLayout,
|
||||
redirect: "/sign/everyday",
|
||||
path: "/activity",
|
||||
name: "activityLayout",
|
||||
component: ActivityLayout,
|
||||
redirect: "/activity/sign",
|
||||
children: [
|
||||
{
|
||||
name: "everyday",
|
||||
path: "everyday",
|
||||
component: () => import("../views/signIn/index.vue"),
|
||||
name: "sign",
|
||||
path: "sign",
|
||||
component: () => import("../views/signIn/Index.vue"),
|
||||
meta: {
|
||||
title: "每日签到",
|
||||
},
|
||||
|
||||
@@ -296,7 +296,7 @@ const statisOptions = computed(() => {
|
||||
});
|
||||
|
||||
const handleToSign = () => {
|
||||
router.push("/sign");
|
||||
router.push("/activity/sign");
|
||||
};
|
||||
|
||||
// 推送的实时人数获取
|
||||
|
||||
Reference in New Issue
Block a user