mirror of
https://github.com/yangjian102621/geekai.git
synced 2025-11-13 12:43:43 +08:00
refactor: refactor the frame layout of admin module
This commit is contained in:
@@ -1,21 +1,40 @@
|
||||
<template>
|
||||
<div>{{ title }}</div>
|
||||
<div class="home" :style="{ height: winHeight + 'px' }">
|
||||
<h1>{{ title }}</h1>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import {onMounted, ref} from "vue"
|
||||
import {isMobile} from "@/utils/libs";
|
||||
import {ref} from "vue"
|
||||
import {useRouter} from "vue-router"; // 导入useRouter函数
|
||||
|
||||
const title = ref("Loading page...");
|
||||
const title = ref("HI, ChatGPT PLUS!");
|
||||
const winHeight = ref(window.innerHeight)
|
||||
const router = useRouter();
|
||||
onMounted(() => {
|
||||
if (isMobile()) {
|
||||
router.push("mobile");
|
||||
} else {
|
||||
router.push("chat");
|
||||
}
|
||||
})
|
||||
// onMounted(() => {
|
||||
// if (isMobile()) {
|
||||
// router.push("mobile");
|
||||
// } else {
|
||||
// router.push("chat");
|
||||
// }
|
||||
// })
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
<style lang="stylus" scoped>
|
||||
.home {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
color: #202020;
|
||||
background-color: #282c34;
|
||||
|
||||
h1 {
|
||||
font-size: 300%;
|
||||
font-weight: bold;
|
||||
letter-spacing: 0.1em;
|
||||
text-shadow: -1px -1px 1px #111111, 2px 2px 1px #363636;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user