简单处理下登录
All checks were successful
Build / build (push) Successful in 58s

This commit is contained in:
Twilight 2024-08-09 00:50:08 +08:00
parent e7291f03d0
commit 3695ce820f

View File

@ -1,6 +1,20 @@
<template>
<h2>欢迎使用 Leaflow Amber</h2>
<p>Amber 是一个临时代号这个为 demo 版本</p>
<p>在使用前你需要先登录</p>
<div v-if="!userStore.logined">
<v-btn color="primary" @click="toLogin()">登录</v-btn>
</div>
</template>
<script lang="ts" setup></script>
<script lang="ts" setup>
import router from "@/router";
import { useUserStore } from "@/stores/user";
const userStore = useUserStore();
const toLogin = () => {
router.push("/auth/login");
};
</script>