mirror of
https://github.com/fastapiadmin/FastapiAdmin.git
synced 2026-10-01 00:05:17 +00:00
- 重构工作流模块目录结构,迁移代码文件 - 修复类型断言空值安全问题,添加 ! 操作符 - 优化样式类名,替换 flex-cc 为标准 flex 工具类 - 更新路由标签简化文案,移除冗余注释 - 调整 ruff 配置,放宽行长度限制 - 更新 README 与多语言文案,优化项目描述 - 修复表单、图表组件的类型与样式问题 - 简化搜索表单、数据卡片的布局代码
56 lines
1.3 KiB
Vue
56 lines
1.3 KiB
Vue
<template>
|
|
<div class="page-content border-0! bg-transparent! min-h-screen flex items-center justify-center">
|
|
<div class="flex items-center justify-center max-md:block! max-md:text-center">
|
|
<FaThemeSvg :src="data.imgUrl" size="100%" class="w-100!" />
|
|
<div class="ml-15 w-75 max-md:mx-auto max-md:mt-10 max-md:w-full max-md:text-center">
|
|
<p class="text-xl leading-7 text-g-600 max-md:text-lg">{{ data.desc }}</p>
|
|
<ElButton type="primary" size="large" @click="backHome" v-ripple class="mt-5">
|
|
{{ data.btnText }}
|
|
</ElButton>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
|
|
<script setup lang="ts">
|
|
import { useCommon } from "@/hooks/core/useCommon";
|
|
import { useUserStore } from "@stores";
|
|
|
|
const router = useRouter();
|
|
const userStore = useUserStore();
|
|
|
|
interface ExceptionData {
|
|
/** 标题 */
|
|
title: string;
|
|
/** 描述 */
|
|
desc: string;
|
|
/** 按钮文本 */
|
|
btnText: string;
|
|
/** 图片地址 */
|
|
imgUrl: string;
|
|
}
|
|
|
|
withDefaults(
|
|
defineProps<{
|
|
data: ExceptionData;
|
|
}>(),
|
|
{}
|
|
);
|
|
|
|
const { homePath } = useCommon();
|
|
|
|
const backHome = () => {
|
|
const targetHomePath = homePath.value || "/";
|
|
|
|
if (!userStore.isLogin) {
|
|
router.push({
|
|
name: "Login",
|
|
query: { redirect: targetHomePath },
|
|
});
|
|
return;
|
|
}
|
|
|
|
router.push(targetHomePath);
|
|
};
|
|
</script>
|