mirror of
https://github.com/fastapiadmin/FastapiAdmin.git
synced 2026-10-06 09:41:53 +00:00
refactor: 重构路由与部署脚本,更新静态资源路径
This commit is contained in:
@@ -15,7 +15,7 @@ import { RouterView, useRoute } from "vue-router";
|
||||
/** 首页 / 仪表盘父级 meta(侧栏、静态子路由共用) */
|
||||
export const HOME_MENU_META: RouteMeta = {
|
||||
title: "menus.home.title",
|
||||
icon: "ri:presentation-line",
|
||||
icon: "ri:home-smile-2-line",
|
||||
keepAlive: true,
|
||||
};
|
||||
|
||||
@@ -149,21 +149,10 @@ export const dashboardLayoutChildren: AppRouteRecordRaw[] = [
|
||||
component: () => import("@views/dashboard/workplace/index.vue"),
|
||||
meta: {
|
||||
title: "menus.workplace.title",
|
||||
icon: "ri:layout-grid-line",
|
||||
icon: "ri:bar-chart-box-line",
|
||||
keepAlive: true,
|
||||
},
|
||||
},
|
||||
{
|
||||
path: "console",
|
||||
name: "DashboardConsole",
|
||||
component: () => import("@views/dashboard/console/index.vue"),
|
||||
meta: {
|
||||
title: "menus.dashboard.console",
|
||||
icon: "ri:home-smile-2-line",
|
||||
keepAlive: false,
|
||||
fixedTab: true,
|
||||
},
|
||||
},
|
||||
{
|
||||
path: "analysis",
|
||||
name: "DashboardAnalysis",
|
||||
@@ -174,73 +163,6 @@ export const dashboardLayoutChildren: AppRouteRecordRaw[] = [
|
||||
keepAlive: false,
|
||||
},
|
||||
},
|
||||
{
|
||||
path: "ecommerce",
|
||||
name: "DashboardEcommerce",
|
||||
component: () => import("@views/dashboard/ecommerce/index.vue"),
|
||||
meta: {
|
||||
title: "menus.dashboard.ecommerce",
|
||||
icon: "ri:bar-chart-box-line",
|
||||
keepAlive: false,
|
||||
},
|
||||
},
|
||||
{
|
||||
path: "map",
|
||||
name: "DashboardMap",
|
||||
component: () => import("@views/dashboard/map/index.vue"),
|
||||
meta: {
|
||||
title: "menus.dashboard.map",
|
||||
icon: "ri:map-pin-line",
|
||||
keepAlive: true,
|
||||
},
|
||||
},
|
||||
{
|
||||
path: "pricing",
|
||||
name: "DashboardPricing",
|
||||
component: () => import("@views/dashboard/pricing/index.vue"),
|
||||
meta: {
|
||||
title: "menus.dashboard.pricing",
|
||||
icon: "ri:money-cny-box-line",
|
||||
keepAlive: true,
|
||||
},
|
||||
},
|
||||
{
|
||||
path: "article",
|
||||
name: "DashboardArticle",
|
||||
component: NestedRouterParent,
|
||||
meta: {
|
||||
title: "menus.article.title",
|
||||
icon: "ri:book-2-line",
|
||||
alwaysShow: true,
|
||||
roles: ["R_SUPER", "R_ADMIN"],
|
||||
},
|
||||
children: [
|
||||
{
|
||||
path: "article-list",
|
||||
name: "ArticleList",
|
||||
component: () => import("@views/dashboard/article/list/index.vue"),
|
||||
meta: {
|
||||
title: "menus.article.articleList",
|
||||
icon: "ri:article-line",
|
||||
keepAlive: true,
|
||||
authList: [
|
||||
{ title: "新增", authMark: "add" },
|
||||
{ title: "编辑", authMark: "edit" },
|
||||
],
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
path: "tutorial",
|
||||
name: "DashboardTutorial",
|
||||
component: () => import("@views/dashboard/tutorial/index.vue"),
|
||||
meta: {
|
||||
title: "menus.dashboard.tutorial",
|
||||
icon: "ri:book-2-line",
|
||||
keepAlive: true,
|
||||
},
|
||||
},
|
||||
];
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
@@ -432,27 +354,9 @@ export const staticRoutes: AppRouteRecordRaw[] = [
|
||||
{
|
||||
path: "home",
|
||||
name: HOME_ROUTE_NAME,
|
||||
component: () => import("@views/dashboard/index.vue"),
|
||||
component: () => import("@views/dashboard/home/index.vue"),
|
||||
meta: HOME_MENU_META,
|
||||
},
|
||||
{
|
||||
path: "profile",
|
||||
name: "Profile",
|
||||
meta: { title: "个人中心", icon: "ri:user-line", hidden: true },
|
||||
component: () => import("@views/current/profile.vue"),
|
||||
},
|
||||
/** 更新日志(mock 数据):侧栏隐藏,由顶栏头像下拉进入(routeName 供 fastEnter 等使用) */
|
||||
{
|
||||
path: "changelog",
|
||||
name: "ChangeLog",
|
||||
meta: {
|
||||
title: "menus.changelog.title",
|
||||
icon: "ri:draft-line",
|
||||
hidden: true,
|
||||
keepAlive: true,
|
||||
},
|
||||
component: () => import("@views/changelog/index.vue"),
|
||||
},
|
||||
/** 仪表盘子路由定义见同文件导出的 `dashboardLayoutChildren` */
|
||||
{
|
||||
path: "dashboard",
|
||||
@@ -462,6 +366,65 @@ export const staticRoutes: AppRouteRecordRaw[] = [
|
||||
meta: DASHBOARD_PARENT_META,
|
||||
children: dashboardLayoutChildren,
|
||||
},
|
||||
/** 快速链接:统一父级,不在菜单中展示,通过 URL 或 fastEnter 直接访问 */
|
||||
{
|
||||
path: "fastlink",
|
||||
name: "Fastlink",
|
||||
component: NestedRouterParent,
|
||||
meta: { hidden: true },
|
||||
children: [
|
||||
{
|
||||
path: "profile",
|
||||
name: "FastlinkProfile",
|
||||
meta: { title: "个人中心", icon: "ri:user-line", hidden: true },
|
||||
component: () => import("@views/fastlink/current/profile.vue"),
|
||||
},
|
||||
{
|
||||
path: "changelog",
|
||||
name: "FastlinkChangeLog",
|
||||
meta: {
|
||||
title: "menus.changelog.title",
|
||||
icon: "ri:draft-line",
|
||||
hidden: true,
|
||||
keepAlive: true,
|
||||
},
|
||||
component: () => import("@views/fastlink/changelog/index.vue"),
|
||||
},
|
||||
{
|
||||
path: "pricing",
|
||||
name: "FastlinkPricing",
|
||||
meta: {
|
||||
title: "menus.dashboard.pricing",
|
||||
icon: "ri:money-cny-box-line",
|
||||
hidden: true,
|
||||
keepAlive: true,
|
||||
},
|
||||
component: () => import("@views/fastlink/pricing/index.vue"),
|
||||
},
|
||||
{
|
||||
path: "article/list",
|
||||
name: "FastlinkArticleList",
|
||||
meta: {
|
||||
title: "menus.article.articleList",
|
||||
icon: "ri:article-line",
|
||||
hidden: true,
|
||||
keepAlive: true,
|
||||
},
|
||||
component: () => import("@views/fastlink/article/index.vue"),
|
||||
},
|
||||
{
|
||||
path: "tutorial",
|
||||
name: "FastlinkTutorial",
|
||||
meta: {
|
||||
title: "menus.dashboard.tutorial",
|
||||
icon: "ri:book-2-line",
|
||||
hidden: true,
|
||||
keepAlive: true,
|
||||
},
|
||||
component: () => import("@views/fastlink/tutorial/index.vue"),
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user