Files
gangyan/chat_web_front/src/App.vue

46 lines
1.2 KiB
Vue

<template>
<div class="content">
<Operates v-show="url != '/login' && url != '/writing/edit'" />
<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: linear-gradient(180deg, #edf2ff 0%, #f7f9ff 100%),
// url("./assets/images/chat/chatLogo.png") no-repeat;
background-color: #edf2ffcc;
background-image: url("./assets/images/chat/chatLogo.png");
background-size: 45%;
background-position: right bottom;
background-blend-mode: unset;
background-repeat: no-repeat;
// background-size: 45%;
// background-position: right bottom;
display: flex;
.chatLogo {
width: 764px;
height: 700px;
position: absolute;
right: 0px;
bottom: 0px;
z-index: 0;
}
}
</style>