mirror of
https://github.com/pure-admin/vue-pure-admin.git
synced 2025-10-10 12:14:50 +08:00
Merge branch 'main' into pages
This commit is contained in:
commit
cb3672ec1e
@ -80,9 +80,9 @@ menus:
|
|||||||
pureMarkdown: Markdown
|
pureMarkdown: Markdown
|
||||||
pureEditor: Editor
|
pureEditor: Editor
|
||||||
pureAbnormal: Abnormal Page
|
pureAbnormal: Abnormal Page
|
||||||
pureFourZeroFour: "404"
|
purePageNotFound: "404"
|
||||||
pureFourZeroOne: "403"
|
pureAccessDenied: "403"
|
||||||
pureFive: "500"
|
pureServerError: "500"
|
||||||
pureComponents: Components
|
pureComponents: Components
|
||||||
pureDialog: Dialog
|
pureDialog: Dialog
|
||||||
pureDrawer: Drawer
|
pureDrawer: Drawer
|
||||||
|
@ -80,9 +80,9 @@ menus:
|
|||||||
pureMarkdown: Markdown
|
pureMarkdown: Markdown
|
||||||
pureEditor: 编辑器
|
pureEditor: 编辑器
|
||||||
pureAbnormal: 异常页面
|
pureAbnormal: 异常页面
|
||||||
pureFourZeroFour: "404"
|
purePageNotFound: "404"
|
||||||
pureFourZeroOne: "403"
|
pureAccessDenied: "403"
|
||||||
pureFive: "500"
|
pureServerError: "500"
|
||||||
pureComponents: 组件
|
pureComponents: 组件
|
||||||
pureDialog: 函数式弹框
|
pureDialog: 函数式弹框
|
||||||
pureDrawer: 函数式抽屉
|
pureDrawer: 函数式抽屉
|
||||||
|
@ -16,7 +16,7 @@ export default {
|
|||||||
name: "403",
|
name: "403",
|
||||||
component: () => import("@/views/error/403.vue"),
|
component: () => import("@/views/error/403.vue"),
|
||||||
meta: {
|
meta: {
|
||||||
title: $t("menus.pureFourZeroOne")
|
title: $t("menus.pureAccessDenied")
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -24,7 +24,7 @@ export default {
|
|||||||
name: "404",
|
name: "404",
|
||||||
component: () => import("@/views/error/404.vue"),
|
component: () => import("@/views/error/404.vue"),
|
||||||
meta: {
|
meta: {
|
||||||
title: $t("menus.pureFourZeroFour")
|
title: $t("menus.purePageNotFound")
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -32,7 +32,7 @@ export default {
|
|||||||
name: "500",
|
name: "500",
|
||||||
component: () => import("@/views/error/500.vue"),
|
component: () => import("@/views/error/500.vue"),
|
||||||
meta: {
|
meta: {
|
||||||
title: $t("menus.pureFive")
|
title: $t("menus.pureServerError")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
@ -12,13 +12,46 @@ export default [
|
|||||||
rank: 101
|
rank: 101
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
// 全屏403(无权访问)页面
|
||||||
|
{
|
||||||
|
path: "/access-denied",
|
||||||
|
name: "AccessDenied",
|
||||||
|
component: () => import("@/views/error/403.vue"),
|
||||||
|
meta: {
|
||||||
|
title: $t("menus.pureAccessDenied"),
|
||||||
|
showLink: false,
|
||||||
|
rank: 102
|
||||||
|
}
|
||||||
|
},
|
||||||
|
// 全屏404(页面不存在)页面
|
||||||
|
{
|
||||||
|
path: "/:pathMatch(.*)*",
|
||||||
|
name: "PageNotFound",
|
||||||
|
component: () => import("@/views/error/404.vue"),
|
||||||
|
meta: {
|
||||||
|
title: $t("menus.purePageNotFound"),
|
||||||
|
showLink: false,
|
||||||
|
rank: 103
|
||||||
|
}
|
||||||
|
},
|
||||||
|
// 全屏500(服务器出错)页面
|
||||||
|
{
|
||||||
|
path: "/server-error",
|
||||||
|
name: "ServerError",
|
||||||
|
component: () => import("@/views/error/500.vue"),
|
||||||
|
meta: {
|
||||||
|
title: $t("menus.pureServerError"),
|
||||||
|
showLink: false,
|
||||||
|
rank: 104
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
path: "/redirect",
|
path: "/redirect",
|
||||||
component: Layout,
|
component: Layout,
|
||||||
meta: {
|
meta: {
|
||||||
title: $t("status.pureLoad"),
|
title: $t("status.pureLoad"),
|
||||||
showLink: false,
|
showLink: false,
|
||||||
rank: 102
|
rank: 105
|
||||||
},
|
},
|
||||||
children: [
|
children: [
|
||||||
{
|
{
|
||||||
@ -28,6 +61,16 @@ export default [
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
path: "/account-settings",
|
||||||
|
name: "AccountSettings",
|
||||||
|
component: () => import("@/views/account-settings/index.vue"),
|
||||||
|
meta: {
|
||||||
|
title: $t("buttons.pureAccountSettings"),
|
||||||
|
showLink: false,
|
||||||
|
rank: 106
|
||||||
|
}
|
||||||
|
},
|
||||||
// 下面是一个无layout菜单的例子(一个全屏空白页面),因为这种情况极少发生,所以只需要在前端配置即可(配置路径:src/router/modules/remaining.ts)
|
// 下面是一个无layout菜单的例子(一个全屏空白页面),因为这种情况极少发生,所以只需要在前端配置即可(配置路径:src/router/modules/remaining.ts)
|
||||||
{
|
{
|
||||||
path: "/empty",
|
path: "/empty",
|
||||||
@ -36,17 +79,7 @@ export default [
|
|||||||
meta: {
|
meta: {
|
||||||
title: $t("menus.pureEmpty"),
|
title: $t("menus.pureEmpty"),
|
||||||
showLink: false,
|
showLink: false,
|
||||||
rank: 103
|
rank: 107
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
path: "/account-settings",
|
|
||||||
name: "AccountSettings",
|
|
||||||
component: () => import("@/views/account-settings/index.vue"),
|
|
||||||
meta: {
|
|
||||||
title: $t("buttons.pureAccountSettings"),
|
|
||||||
showLink: false,
|
|
||||||
rank: 104
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
] satisfies Array<RouteConfigsTable>;
|
] satisfies Array<RouteConfigsTable>;
|
||||||
|
@ -139,16 +139,6 @@ function findRouteByPath(path: string, routes: RouteRecordRaw[]) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function addPathMatch() {
|
|
||||||
if (!router.hasRoute("pathMatch")) {
|
|
||||||
router.addRoute({
|
|
||||||
path: "/:pathMatch(.*)",
|
|
||||||
name: "pathMatch",
|
|
||||||
redirect: "/error/404"
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/** 处理动态路由(后端返回的路由) */
|
/** 处理动态路由(后端返回的路由) */
|
||||||
function handleAsyncRoutes(routeList) {
|
function handleAsyncRoutes(routeList) {
|
||||||
if (routeList.length === 0) {
|
if (routeList.length === 0) {
|
||||||
@ -188,7 +178,6 @@ function handleAsyncRoutes(routeList) {
|
|||||||
)
|
)
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
addPathMatch();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 初始化路由(`new Promise` 写法防止在异步请求中造成无限循环)*/
|
/** 初始化路由(`new Promise` 写法防止在异步请求中造成无限循环)*/
|
||||||
@ -397,7 +386,6 @@ export {
|
|||||||
filterTree,
|
filterTree,
|
||||||
initRouter,
|
initRouter,
|
||||||
getTopMenu,
|
getTopMenu,
|
||||||
addPathMatch,
|
|
||||||
isOneOfArray,
|
isOneOfArray,
|
||||||
getHistoryMode,
|
getHistoryMode,
|
||||||
addAsyncRoutes,
|
addAsyncRoutes,
|
||||||
|
@ -10,9 +10,11 @@ const router = useRouter();
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div class="flex justify-center items-center h-[640px]">
|
<div
|
||||||
|
class="flex flex-col md:flex-row justify-center items-center min-h-full w-full p-4 md:p-0"
|
||||||
|
>
|
||||||
<noAccess />
|
<noAccess />
|
||||||
<div class="ml-12">
|
<div class="mt-8 md:ml-12 md:mt-0 text-center md:text-left">
|
||||||
<p
|
<p
|
||||||
v-motion
|
v-motion
|
||||||
class="font-medium text-4xl mb-4! dark:text-white"
|
class="font-medium text-4xl mb-4! dark:text-white"
|
||||||
@ -32,7 +34,7 @@ const router = useRouter();
|
|||||||
</p>
|
</p>
|
||||||
<p
|
<p
|
||||||
v-motion
|
v-motion
|
||||||
class="mb-4! text-gray-500"
|
class="text-xl mb-4! text-gray-500"
|
||||||
:initial="{
|
:initial="{
|
||||||
opacity: 0,
|
opacity: 0,
|
||||||
y: 100
|
y: 100
|
||||||
@ -50,6 +52,7 @@ const router = useRouter();
|
|||||||
<el-button
|
<el-button
|
||||||
v-motion
|
v-motion
|
||||||
type="primary"
|
type="primary"
|
||||||
|
class="block mx-auto md:inline-block md:mx-0"
|
||||||
:initial="{
|
:initial="{
|
||||||
opacity: 0,
|
opacity: 0,
|
||||||
y: 100
|
y: 100
|
||||||
@ -68,3 +71,9 @@ const router = useRouter();
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
.main-content {
|
||||||
|
margin: 0 !important;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
@ -10,9 +10,11 @@ const router = useRouter();
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div class="flex justify-center items-center h-[640px]">
|
<div
|
||||||
|
class="flex flex-col md:flex-row justify-center items-center min-h-full w-full p-4 md:p-0"
|
||||||
|
>
|
||||||
<noExist />
|
<noExist />
|
||||||
<div class="ml-12">
|
<div class="mt-8 md:ml-12 md:mt-0 text-center md:text-left">
|
||||||
<p
|
<p
|
||||||
v-motion
|
v-motion
|
||||||
class="font-medium text-4xl mb-4! dark:text-white"
|
class="font-medium text-4xl mb-4! dark:text-white"
|
||||||
@ -32,7 +34,7 @@ const router = useRouter();
|
|||||||
</p>
|
</p>
|
||||||
<p
|
<p
|
||||||
v-motion
|
v-motion
|
||||||
class="mb-4! text-gray-500"
|
class="text-xl mb-4! text-gray-500"
|
||||||
:initial="{
|
:initial="{
|
||||||
opacity: 0,
|
opacity: 0,
|
||||||
y: 100
|
y: 100
|
||||||
@ -50,6 +52,7 @@ const router = useRouter();
|
|||||||
<el-button
|
<el-button
|
||||||
v-motion
|
v-motion
|
||||||
type="primary"
|
type="primary"
|
||||||
|
class="block mx-auto md:inline-block md:mx-0"
|
||||||
:initial="{
|
:initial="{
|
||||||
opacity: 0,
|
opacity: 0,
|
||||||
y: 100
|
y: 100
|
||||||
@ -68,3 +71,9 @@ const router = useRouter();
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
.main-content {
|
||||||
|
margin: 0 !important;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
@ -10,9 +10,11 @@ const router = useRouter();
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div class="flex justify-center items-center h-[640px]">
|
<div
|
||||||
|
class="flex flex-col md:flex-row justify-center items-center min-h-full w-full p-4 md:p-0"
|
||||||
|
>
|
||||||
<noServer />
|
<noServer />
|
||||||
<div class="ml-12">
|
<div class="mt-8 md:ml-12 md:mt-0 text-center md:text-left">
|
||||||
<p
|
<p
|
||||||
v-motion
|
v-motion
|
||||||
class="font-medium text-4xl mb-4! dark:text-white"
|
class="font-medium text-4xl mb-4! dark:text-white"
|
||||||
@ -32,7 +34,7 @@ const router = useRouter();
|
|||||||
</p>
|
</p>
|
||||||
<p
|
<p
|
||||||
v-motion
|
v-motion
|
||||||
class="mb-4! text-gray-500"
|
class="text-xl mb-4! text-gray-500"
|
||||||
:initial="{
|
:initial="{
|
||||||
opacity: 0,
|
opacity: 0,
|
||||||
y: 100
|
y: 100
|
||||||
@ -50,6 +52,7 @@ const router = useRouter();
|
|||||||
<el-button
|
<el-button
|
||||||
v-motion
|
v-motion
|
||||||
type="primary"
|
type="primary"
|
||||||
|
class="block mx-auto md:inline-block md:mx-0"
|
||||||
:initial="{
|
:initial="{
|
||||||
opacity: 0,
|
opacity: 0,
|
||||||
y: 100
|
y: 100
|
||||||
@ -68,3 +71,9 @@ const router = useRouter();
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
.main-content {
|
||||||
|
margin: 0 !important;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user