From 025a69883fa4e32c938e76675198c5f75a0d60e1 Mon Sep 17 00:00:00 2001 From: pany <939630029@qq.com> Date: Thu, 6 Jul 2023 13:14:44 +0800 Subject: [PATCH] =?UTF-8?q?chore:=20=E5=B0=86=20layout=20=E9=87=8D?= =?UTF-8?q?=E5=91=BD=E5=90=8D=E4=B8=BA=20layouts?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 2 +- README.zh-CN.md | 2 +- .../{layout => layouts}/logo-text-1.png | Bin .../{layout => layouts}/logo-text-2.png | Bin src/assets/{layout => layouts}/logo.png | Bin src/config/{layout.ts => layouts.ts} | 0 src/{layout => layouts}/LeftMode.vue | 0 src/{layout => layouts}/LeftTopMode.vue | 0 .../components/AppMain.vue | 0 .../components/Breadcrumb/index.vue | 0 .../components/Hamburger/index.vue | 0 .../components/Logo/index.vue | 6 +++--- .../components/NavigationBar/index.vue | 0 .../components/RightPanel/index.vue | 0 .../components/Settings/index.vue | 0 .../components/Sidebar/SidebarItem.vue | 0 .../components/Sidebar/SidebarItemLink.vue | 0 .../components/Sidebar/index.vue | 0 .../components/TagsView/ScrollPane.vue | 0 .../components/TagsView/index.vue | 0 src/{layout => layouts}/components/index.ts | 0 src/{layout => layouts}/hooks/useResize.ts | 0 src/{layout => layouts}/index.vue | 0 src/router/index.ts | 18 +++++++++--------- src/store/modules/settings.ts | 2 +- src/styles/theme/core/index.scss | 2 +- .../theme/core/{layout.scss => layouts.scss} | 0 src/utils/cache/local-storage.ts | 2 +- src/views/login/index.vue | 2 +- 29 files changed, 18 insertions(+), 18 deletions(-) rename src/assets/{layout => layouts}/logo-text-1.png (100%) rename src/assets/{layout => layouts}/logo-text-2.png (100%) rename src/assets/{layout => layouts}/logo.png (100%) rename src/config/{layout.ts => layouts.ts} (100%) rename src/{layout => layouts}/LeftMode.vue (100%) rename src/{layout => layouts}/LeftTopMode.vue (100%) rename src/{layout => layouts}/components/AppMain.vue (100%) rename src/{layout => layouts}/components/Breadcrumb/index.vue (100%) rename src/{layout => layouts}/components/Hamburger/index.vue (100%) rename src/{layout => layouts}/components/Logo/index.vue (90%) rename src/{layout => layouts}/components/NavigationBar/index.vue (100%) rename src/{layout => layouts}/components/RightPanel/index.vue (100%) rename src/{layout => layouts}/components/Settings/index.vue (100%) rename src/{layout => layouts}/components/Sidebar/SidebarItem.vue (100%) rename src/{layout => layouts}/components/Sidebar/SidebarItemLink.vue (100%) rename src/{layout => layouts}/components/Sidebar/index.vue (100%) rename src/{layout => layouts}/components/TagsView/ScrollPane.vue (100%) rename src/{layout => layouts}/components/TagsView/index.vue (100%) rename src/{layout => layouts}/components/index.ts (100%) rename src/{layout => layouts}/hooks/useResize.ts (100%) rename src/{layout => layouts}/index.vue (100%) rename src/styles/theme/core/{layout.scss => layouts.scss} (100%) diff --git a/README.md b/README.md index 5946b1df..2eab8693 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@
- V3 Admin Vite Logo + V3 Admin Vite Logo

V3 Admin Vite

English | 中文
diff --git a/README.zh-CN.md b/README.zh-CN.md index 9bf54d79..5ce16ced 100644 --- a/README.zh-CN.md +++ b/README.zh-CN.md @@ -1,5 +1,5 @@
- V3 Admin Vite Logo + V3 Admin Vite Logo

V3 Admin Vite

English | 中文
diff --git a/src/assets/layout/logo-text-1.png b/src/assets/layouts/logo-text-1.png similarity index 100% rename from src/assets/layout/logo-text-1.png rename to src/assets/layouts/logo-text-1.png diff --git a/src/assets/layout/logo-text-2.png b/src/assets/layouts/logo-text-2.png similarity index 100% rename from src/assets/layout/logo-text-2.png rename to src/assets/layouts/logo-text-2.png diff --git a/src/assets/layout/logo.png b/src/assets/layouts/logo.png similarity index 100% rename from src/assets/layout/logo.png rename to src/assets/layouts/logo.png diff --git a/src/config/layout.ts b/src/config/layouts.ts similarity index 100% rename from src/config/layout.ts rename to src/config/layouts.ts diff --git a/src/layout/LeftMode.vue b/src/layouts/LeftMode.vue similarity index 100% rename from src/layout/LeftMode.vue rename to src/layouts/LeftMode.vue diff --git a/src/layout/LeftTopMode.vue b/src/layouts/LeftTopMode.vue similarity index 100% rename from src/layout/LeftTopMode.vue rename to src/layouts/LeftTopMode.vue diff --git a/src/layout/components/AppMain.vue b/src/layouts/components/AppMain.vue similarity index 100% rename from src/layout/components/AppMain.vue rename to src/layouts/components/AppMain.vue diff --git a/src/layout/components/Breadcrumb/index.vue b/src/layouts/components/Breadcrumb/index.vue similarity index 100% rename from src/layout/components/Breadcrumb/index.vue rename to src/layouts/components/Breadcrumb/index.vue diff --git a/src/layout/components/Hamburger/index.vue b/src/layouts/components/Hamburger/index.vue similarity index 100% rename from src/layout/components/Hamburger/index.vue rename to src/layouts/components/Hamburger/index.vue diff --git a/src/layout/components/Logo/index.vue b/src/layouts/components/Logo/index.vue similarity index 90% rename from src/layout/components/Logo/index.vue rename to src/layouts/components/Logo/index.vue index 9426dbbb..19ebb3e8 100644 --- a/src/layout/components/Logo/index.vue +++ b/src/layouts/components/Logo/index.vue @@ -3,9 +3,9 @@ import { computed } from "vue" import { storeToRefs } from "pinia" import { useSettingsStore } from "@/store/modules/settings" import { getCssVariableValue } from "@/utils" -import logo from "@/assets/layout/logo.png?url" -import logoText1 from "@/assets/layout/logo-text-1.png?url" -import logoText2 from "@/assets/layout/logo-text-2.png?url" +import logo from "@/assets/layouts/logo.png?url" +import logoText1 from "@/assets/layouts/logo-text-1.png?url" +import logoText2 from "@/assets/layouts/logo-text-2.png?url" interface Props { collapse?: boolean diff --git a/src/layout/components/NavigationBar/index.vue b/src/layouts/components/NavigationBar/index.vue similarity index 100% rename from src/layout/components/NavigationBar/index.vue rename to src/layouts/components/NavigationBar/index.vue diff --git a/src/layout/components/RightPanel/index.vue b/src/layouts/components/RightPanel/index.vue similarity index 100% rename from src/layout/components/RightPanel/index.vue rename to src/layouts/components/RightPanel/index.vue diff --git a/src/layout/components/Settings/index.vue b/src/layouts/components/Settings/index.vue similarity index 100% rename from src/layout/components/Settings/index.vue rename to src/layouts/components/Settings/index.vue diff --git a/src/layout/components/Sidebar/SidebarItem.vue b/src/layouts/components/Sidebar/SidebarItem.vue similarity index 100% rename from src/layout/components/Sidebar/SidebarItem.vue rename to src/layouts/components/Sidebar/SidebarItem.vue diff --git a/src/layout/components/Sidebar/SidebarItemLink.vue b/src/layouts/components/Sidebar/SidebarItemLink.vue similarity index 100% rename from src/layout/components/Sidebar/SidebarItemLink.vue rename to src/layouts/components/Sidebar/SidebarItemLink.vue diff --git a/src/layout/components/Sidebar/index.vue b/src/layouts/components/Sidebar/index.vue similarity index 100% rename from src/layout/components/Sidebar/index.vue rename to src/layouts/components/Sidebar/index.vue diff --git a/src/layout/components/TagsView/ScrollPane.vue b/src/layouts/components/TagsView/ScrollPane.vue similarity index 100% rename from src/layout/components/TagsView/ScrollPane.vue rename to src/layouts/components/TagsView/ScrollPane.vue diff --git a/src/layout/components/TagsView/index.vue b/src/layouts/components/TagsView/index.vue similarity index 100% rename from src/layout/components/TagsView/index.vue rename to src/layouts/components/TagsView/index.vue diff --git a/src/layout/components/index.ts b/src/layouts/components/index.ts similarity index 100% rename from src/layout/components/index.ts rename to src/layouts/components/index.ts diff --git a/src/layout/hooks/useResize.ts b/src/layouts/hooks/useResize.ts similarity index 100% rename from src/layout/hooks/useResize.ts rename to src/layouts/hooks/useResize.ts diff --git a/src/layout/index.vue b/src/layouts/index.vue similarity index 100% rename from src/layout/index.vue rename to src/layouts/index.vue diff --git a/src/router/index.ts b/src/router/index.ts index 2ee500a2..b732a0fd 100644 --- a/src/router/index.ts +++ b/src/router/index.ts @@ -1,12 +1,12 @@ import { type RouteRecordRaw, createRouter, createWebHashHistory, createWebHistory } from "vue-router" -const Layout = () => import("@/layout/index.vue") +const Layouts = () => import("@/layouts/index.vue") /** 常驻路由 */ export const constantRoutes: RouteRecordRaw[] = [ { path: "/redirect", - component: Layout, + component: Layouts, meta: { hidden: true }, @@ -41,7 +41,7 @@ export const constantRoutes: RouteRecordRaw[] = [ }, { path: "/", - component: Layout, + component: Layouts, redirect: "/dashboard", children: [ { @@ -58,7 +58,7 @@ export const constantRoutes: RouteRecordRaw[] = [ }, { path: "/unocss", - component: Layout, + component: Layouts, redirect: "/unocss/index", children: [ { @@ -74,7 +74,7 @@ export const constantRoutes: RouteRecordRaw[] = [ }, { path: "/link", - component: Layout, + component: Layouts, children: [ { path: "https://juejin.cn/post/7089377403717287972", @@ -89,7 +89,7 @@ export const constantRoutes: RouteRecordRaw[] = [ }, { path: "/table", - component: Layout, + component: Layouts, redirect: "/table/element-plus", name: "Table", meta: { @@ -119,7 +119,7 @@ export const constantRoutes: RouteRecordRaw[] = [ }, { path: "/menu", - component: Layout, + component: Layouts, redirect: "/menu/menu1", name: "Menu", meta: { @@ -193,7 +193,7 @@ export const constantRoutes: RouteRecordRaw[] = [ }, { path: "/hook-demo", - component: Layout, + component: Layouts, redirect: "/hook-demo/use-fetch-select", name: "HookDemo", meta: { @@ -230,7 +230,7 @@ export const constantRoutes: RouteRecordRaw[] = [ export const asyncRoutes: RouteRecordRaw[] = [ { path: "/permission", - component: Layout, + component: Layouts, redirect: "/permission/page", name: "Permission", meta: { diff --git a/src/store/modules/settings.ts b/src/store/modules/settings.ts index f04d989e..0a1641f7 100644 --- a/src/store/modules/settings.ts +++ b/src/store/modules/settings.ts @@ -1,6 +1,6 @@ import { type Ref, ref, watch } from "vue" import { defineStore } from "pinia" -import { type LayoutSettings, layoutSettings } from "@/config/layout" +import { type LayoutSettings, layoutSettings } from "@/config/layouts" import { setConfigLayout } from "@/utils/cache/local-storage" type SettingsStore = { diff --git a/src/styles/theme/core/index.scss b/src/styles/theme/core/index.scss index e33087ec..5ae838b9 100644 --- a/src/styles/theme/core/index.scss +++ b/src/styles/theme/core/index.scss @@ -1,5 +1,5 @@ .#{$theme-name} { - @import "./layout.scss"; + @import "./layouts.scss"; @import "./login.scss"; @import "./error-page.scss"; @import "./element-plus.scss"; diff --git a/src/styles/theme/core/layout.scss b/src/styles/theme/core/layouts.scss similarity index 100% rename from src/styles/theme/core/layout.scss rename to src/styles/theme/core/layouts.scss diff --git a/src/utils/cache/local-storage.ts b/src/utils/cache/local-storage.ts index 847a695d..f57ed73b 100644 --- a/src/utils/cache/local-storage.ts +++ b/src/utils/cache/local-storage.ts @@ -4,7 +4,7 @@ import CacheKey from "@/constants/cache-key" import { type SidebarOpened, type SidebarClosed } from "@/constants/app-key" import { type ThemeName } from "@/hooks/useTheme" import { type TagView } from "@/store/modules/tags-view" -import { type LayoutSettings } from "@/config/layout" +import { type LayoutSettings } from "@/config/layouts" //#region 系统布局配置 export const getConfigLayout = () => { diff --git a/src/views/login/index.vue b/src/views/login/index.vue index f078a47a..4a63465f 100644 --- a/src/views/login/index.vue +++ b/src/views/login/index.vue @@ -74,7 +74,7 @@ createCode()
- +