feat: 添加页面切换动画

This commit is contained in:
2026-05-23 23:08:00 +08:00
parent fc71e924e7
commit bc785ac1ce
7 changed files with 106 additions and 4 deletions
+5 -1
View File
@@ -5,7 +5,11 @@ import QaRecordsTable from "@/components/dashboard/QaRecordsTable.vue";
import StatsOverview from "@/components/dashboard/StatsOverview.vue";
import { useAnswerStore } from "@/stores/answer";
definePageMeta({ middleware: "auth" });
definePageMeta({
middleware: "auth",
pageOrder: 2,
pageTransition: { name: "slide-left" }
});
const answerStore = useAnswerStore();
+5
View File
@@ -4,6 +4,11 @@ import AnswerForm from "@/components/home/AnswerForm.vue";
import AnswerResult from "@/components/home/AnswerResult.vue";
import OcsConfigCard from "@/components/home/OcsConfigCard.vue";
definePageMeta({
pageOrder: 1,
pageTransition: { name: "slide-left" }
});
useHead({
title: "OCS AI 答题服务"
});
+11 -2
View File
@@ -15,6 +15,11 @@ import {
import { Input } from "@/components/ui/input";
import { useAuthStore } from "@/stores/auth";
definePageMeta({
pageOrder: 3,
pageTransition: { name: "slide-left" }
});
useHead({ title: "登录 - OCS AI 答题服务" });
const authStore = useAuthStore();
@@ -30,7 +35,9 @@ const formSchema = toTypedSchema(
.string({ required_error: "邮箱不能为空" })
.min(1, "邮箱不能为空")
.email("请输入有效的邮箱地址"),
password: z.string({ required_error: "密码不能为空" }).min(1, "密码不能为空")
password: z
.string({ required_error: "密码不能为空" })
.min(1, "密码不能为空")
})
);
@@ -91,7 +98,9 @@ const onSubmit = handleSubmit(async (values) => {
<Button
type="submit"
:disabled="isSubmitting || authStore.loading || !authStore.initialized"
:disabled="
isSubmitting || authStore.loading || !authStore.initialized
"
class="w-full"
>
{{ authStore.loading ? "登录中..." : "登录" }}
+8 -1
View File
@@ -15,6 +15,11 @@ import {
import { Input } from "@/components/ui/input";
import { useAuthStore } from "@/stores/auth";
definePageMeta({
pageOrder: 4,
pageTransition: { name: "slide-left" }
});
useHead({ title: "注册 - OCS AI 答题服务" });
const authStore = useAuthStore();
@@ -115,7 +120,9 @@ const onSubmit = handleSubmit(async (values) => {
<Button
type="submit"
:disabled="isSubmitting || authStore.loading || !authStore.initialized"
:disabled="
isSubmitting || authStore.loading || !authStore.initialized
"
class="w-full"
>
{{ authStore.loading ? "注册中..." : "注册" }}