2026-04-02 11:36:05 +08:00
|
|
|
<template>
|
|
|
|
|
<div class="content">
|
2026-05-07 20:22:57 +08:00
|
|
|
<Operates v-show="url != '/login' && url != '/welcome' && url != '/writing/edit'" />
|
2026-04-02 11:36:05 +08:00
|
|
|
<RouterView />
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script setup lang="ts">
|
|
|
|
|
import { watch, ref } from "vue";
|
|
|
|
|
import { useRouter } from "vue-router";
|
|
|
|
|
import Operates from "@/components/Operates.vue";
|
|
|
|
|
const route = useRouter();
|
|
|
|
|
const url = ref("");
|
|
|
|
|
watch(
|
|
|
|
|
() => route.currentRoute.value, // 监听路由的 fullPath 属性
|
|
|
|
|
(newVal, oldVal) => {
|
|
|
|
|
url.value = newVal.path;
|
|
|
|
|
},
|
|
|
|
|
{ immediate: true } // 设置 immediate: true 以在组件挂载时立即触发一次
|
|
|
|
|
);
|
|
|
|
|
</script>
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
|
|
.content {
|
|
|
|
|
width: 100vw;
|
|
|
|
|
height: 100vh;
|
|
|
|
|
background-color: #edf2ffcc;
|
2026-04-08 17:24:51 +08:00
|
|
|
position: relative;
|
2026-04-02 11:36:05 +08:00
|
|
|
display: flex;
|
2026-04-08 17:24:51 +08:00
|
|
|
|
|
|
|
|
&::before {
|
|
|
|
|
content: '';
|
|
|
|
|
position: absolute;
|
|
|
|
|
top: 0;
|
|
|
|
|
left: 0;
|
|
|
|
|
right: 0;
|
|
|
|
|
bottom: 0;
|
|
|
|
|
background-image: url("./assets/images/chat/chatLogo.svg");
|
|
|
|
|
background-size: 45%;
|
|
|
|
|
background-position: right bottom;
|
|
|
|
|
background-repeat: no-repeat;
|
|
|
|
|
opacity: 0.04;
|
|
|
|
|
pointer-events: none;
|
|
|
|
|
z-index: 0;
|
|
|
|
|
}
|
2026-04-02 11:36:05 +08:00
|
|
|
.chatLogo {
|
|
|
|
|
width: 764px;
|
|
|
|
|
height: 700px;
|
|
|
|
|
position: absolute;
|
|
|
|
|
right: 0px;
|
|
|
|
|
bottom: 0px;
|
|
|
|
|
z-index: 0;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
</style>
|