mirror of
https://github.com/fastapiadmin/FastapiAdmin.git
synced 2026-09-23 05:10:57 +00:00
refactor(layouts): 将布局组件从layouts目录迁移到components/layouts目录
重构项目结构,将原本位于src/layouts下的所有布局相关组件迁移到src/components/layouts目录中,包括: - 主布局容器index.vue - 设置面板相关组件 - 水平菜单组件 - 快速入口组件 - 全局组件 同时更新了相关路由配置和组件引用路径,确保功能不受影响。此重构旨在使项目结构更加清晰,遵循组件化开发规范。
This commit is contained in:
@@ -24,31 +24,31 @@ export const globalComponentsConfig: GlobalComponentConfig[] = [
|
||||
{
|
||||
name: "设置面板",
|
||||
key: "settings-panel",
|
||||
component: defineAsyncComponent(() => import("@/layouts/fa-settings-panel/index.vue")),
|
||||
component: defineAsyncComponent(() => import("@/components/layouts/fa-settings-panel/index.vue")),
|
||||
enabled: true,
|
||||
},
|
||||
{
|
||||
name: "全局搜索",
|
||||
key: "global-search",
|
||||
component: defineAsyncComponent(() => import("@/layouts/fa-global-search/index.vue")),
|
||||
component: defineAsyncComponent(() => import("@/components/layouts/fa-global-search/index.vue")),
|
||||
enabled: true,
|
||||
},
|
||||
{
|
||||
name: "锁屏",
|
||||
key: "screen-lock",
|
||||
component: defineAsyncComponent(() => import("@/layouts/fa-screen-lock/index.vue")),
|
||||
component: defineAsyncComponent(() => import("@/components/layouts/fa-screen-lock/index.vue")),
|
||||
enabled: true,
|
||||
},
|
||||
{
|
||||
name: "聊天窗口",
|
||||
key: "chat-window",
|
||||
component: defineAsyncComponent(() => import("@/layouts/fa-chat-window/index.vue")),
|
||||
component: defineAsyncComponent(() => import("@/components/layouts/fa-chat-window/index.vue")),
|
||||
enabled: true,
|
||||
},
|
||||
{
|
||||
name: "礼花效果",
|
||||
key: "fireworks-effect",
|
||||
component: defineAsyncComponent(() => import("@/layouts/fa-fireworks-effect/index.vue")),
|
||||
component: defineAsyncComponent(() => import("@/components/layouts/fa-fireworks-effect/index.vue")),
|
||||
enabled: true,
|
||||
},
|
||||
{
|
||||
|
||||
@@ -186,7 +186,7 @@ export class ComponentLoader {
|
||||
}
|
||||
|
||||
loadLayout(): () => Promise<any> {
|
||||
return () => import("@/layouts/index.vue");
|
||||
return () => import("@/components/layouts/index.vue");
|
||||
}
|
||||
|
||||
loadIframe(): () => Promise<any> {
|
||||
|
||||
@@ -95,7 +95,7 @@ export const ROUTE_PATH_LOGIN_ALT = "/auth/login";
|
||||
* 主框架布局:新版 art 体系(`src/layouts/index.vue` + `src/layouts/fa-*` 组件)。
|
||||
* 旧版 Left/Top/Mix 壳子仍在 `@/layouts/index.vue`,路由不再默认使用。
|
||||
*/
|
||||
export const Layout = () => import("@/layouts/index.vue");
|
||||
export const Layout = () => import("@/components/layouts/index.vue");
|
||||
|
||||
/** iframe 内跳页面:内联组件(无需 views/outside/Iframe.vue) */
|
||||
const IframeView = defineComponent({
|
||||
@@ -458,7 +458,7 @@ export const staticRoutes: AppRouteRecordRaw[] = [
|
||||
},
|
||||
{
|
||||
path: "/outside",
|
||||
component: () => import("@/layouts/index.vue"),
|
||||
component: () => import("@/components/layouts/index.vue"),
|
||||
name: "Outside",
|
||||
meta: { title: "menus.outside.title" },
|
||||
children: [
|
||||
|
||||
Reference in New Issue
Block a user