-
+
+
+
-
+
+
+
diff --git a/src/components/Sider/Item.vue b/src/components/Sider/Item.vue
index 0931df7..5aafe37 100644
--- a/src/components/Sider/Item.vue
+++ b/src/components/Sider/Item.vue
@@ -1,11 +1,9 @@
-
-
-
-
- {{ title }}
-
-
+
+
+
+ {{ title }}
+
diff --git a/src/components/Sider/SiderItem.vue b/src/components/Sider/SiderItem.vue
index 35716c0..7a1b5cd 100644
--- a/src/components/Sider/SiderItem.vue
+++ b/src/components/Sider/SiderItem.vue
@@ -2,9 +2,9 @@
-
+
- {{ onlyOneChild.meta.title }}
+ {{ onlyOneChild.meta.title }}
@@ -30,10 +30,9 @@ import type { RouteRecordRaw } from 'vue-router'
import path from 'path'
import { isExternal } from '@/utils/validate'
import Item from './Item.vue'
-import AppLink from './Link.vue'
export default defineComponent({
name: 'SiderItem',
- components: { Item, AppLink },
+ components: { Item },
props: {
// route object
item: {
diff --git a/src/components/Sider/index.vue b/src/components/Sider/index.vue
index 6c9a3fb..85f1934 100644
--- a/src/components/Sider/index.vue
+++ b/src/components/Sider/index.vue
@@ -1,27 +1,25 @@
-
-
-
-
-
+
+
+
diff --git a/src/components/TagsView/index.vue b/src/components/TagsView/index.vue
new file mode 100644
index 0000000..83de165
--- /dev/null
+++ b/src/components/TagsView/index.vue
@@ -0,0 +1,363 @@
+
+
+
+
+
+
+
diff --git a/src/components/UserInfo/index.vue b/src/components/UserInfo/index.vue
new file mode 100644
index 0000000..9f047e4
--- /dev/null
+++ b/src/components/UserInfo/index.vue
@@ -0,0 +1,71 @@
+
+
+
+
+
![]()
+
管理员
+
+
+
+
+
+ 首页
+
+
+ 退出登录
+
+
+
+
+
+
+
+
+
diff --git a/src/pages/index/App.vue b/src/pages/index/App.vue
index 2acb922..9e967b6 100644
--- a/src/pages/index/App.vue
+++ b/src/pages/index/App.vue
@@ -22,5 +22,6 @@ html,body {
}
#app {
.size;
+ background: @appBg;
}
diff --git a/src/pages/index/layout/components/UserInfo.vue b/src/pages/index/layout/components/UserInfo.vue
index a0d8ce4..613c75d 100644
--- a/src/pages/index/layout/components/UserInfo.vue
+++ b/src/pages/index/layout/components/UserInfo.vue
@@ -1,24 +1,24 @@
-
+
管理员
-
-
-
+
+
+
首页
-
-
+
+
退出登录
-
-
+
+
-
+
diff --git a/src/pages/index/router/index.ts b/src/pages/index/router/index.ts
index 0ef4c09..2f165f0 100644
--- a/src/pages/index/router/index.ts
+++ b/src/pages/index/router/index.ts
@@ -59,7 +59,8 @@ export const constantRouterMap: AppRouteRecordRaw[] = [
name: 'Login',
meta: {
hidden: true,
- title: '登录'
+ title: '登录',
+ noTagsView: true
}
},
{
diff --git a/src/pages/index/store/modules/app.ts b/src/pages/index/store/modules/app.ts
index ab571ef..1787c48 100644
--- a/src/pages/index/store/modules/app.ts
+++ b/src/pages/index/store/modules/app.ts
@@ -9,63 +9,115 @@ export interface AppState {
fixedTags: boolean
fixedNavbar: boolean
layout: string
+ showBreadcrumb: boolean
+ showHamburger: boolean
+ showScreenfull: boolean
+ showUserInfo: boolean
}
@Module({ dynamic: true, namespaced: true, store, name: 'app' })
class App extends VuexModule implements AppState {
public collapsed = false // 菜单栏是否栏缩收
- public showLogo = false // 是否显示logo
+ public showLogo = true // 是否显示logo
public showTags = true // 是否显示标签栏
public showNavbar = true // 是否显示navbar
public fixedTags = true // 是否固定标签栏
public fixedNavbar = true // 是否固定navbar
public layout = 'Classic' // layout布局
+ public showBreadcrumb = true // 是否显示面包屑
+ public showHamburger = true // 是否显示侧边栏缩收按钮
+ public showScreenfull = true // 是否全屏按钮
+ public showUserInfo = true // 是否显示用户头像
@Mutation
private SET_COLLAPSED(collapsed: boolean): void {
this.collapsed = collapsed
}
+ @Mutation
private SET_SHOWLOGO(showLogo: boolean): void {
this.showLogo = showLogo
}
+ @Mutation
private SET_SHOWTAGS(showTags: boolean): void {
this.showTags = showTags
}
+ @Mutation
private SET_NAVBAR(showNavbar: boolean): void {
this.showNavbar = showNavbar
}
+ @Mutation
private SET_FIXEDTAGS(fixedTags: boolean): void {
this.fixedTags = fixedTags
}
+ @Mutation
private SET_FIXEDNAVBAR(fixedNavbar: boolean): void {
this.fixedNavbar = fixedNavbar
}
+ @Mutation
private SET_LAYOUT(layout: 'Classic' | 'LeftTop' | 'Top' | 'Test'): void {
this.layout = layout
}
+ @Mutation
+ private SET_BREADCRUMB(showBreadcrumb: boolean): void {
+ this.showBreadcrumb = showBreadcrumb
+ }
+ @Mutation
+ private SET_HAMBURGER(showHamburger: boolean): void {
+ this.showHamburger = showHamburger
+ }
+ @Mutation
+ private SET_SCREENFULL(showScreenfull: boolean): void {
+ this.showScreenfull = showScreenfull
+ }
+ @Mutation
+ private SET_USERINFO(showUserInfo: boolean): void {
+ this.showUserInfo = showUserInfo
+ }
@Action
public SetCollapsed(collapsed: boolean): void {
this.SET_COLLAPSED(collapsed)
}
+ @Action
public SetShowLogo(showLogo: boolean): void {
this.SET_SHOWLOGO(showLogo)
}
+ @Action
public SetShowTags(showTags: boolean): void {
this.SET_SHOWTAGS(showTags)
}
+ @Action
public SetShowNavbar(showNavbar: boolean): void {
this.SET_NAVBAR(showNavbar)
}
+ @Action
public SetFixedTags(fixedTags: boolean): void {
this.SET_FIXEDTAGS(fixedTags)
}
+ @Action
public SetFixedNavbar(fixedNavbar: boolean): void {
this.SET_FIXEDNAVBAR(fixedNavbar)
}
+ @Action
public SetLayout(layout: 'Classic' | 'LeftTop' | 'Top' | 'Test'): void {
this.SET_LAYOUT(layout)
}
+ @Action
+ public SetBreadcrumb(showBreadcrumb: boolean): void {
+ this.SET_BREADCRUMB(showBreadcrumb)
+ }
+ @Action
+ public SetHamburger(showHamburger: boolean): void {
+ this.SET_HAMBURGER(showHamburger)
+ }
+ @Action
+ public SetScreenfull(showScreenfull: boolean): void {
+ this.SET_SCREENFULL(showScreenfull)
+ }
+ @Action
+ public SetUserInfo(showUserInfo: boolean): void {
+ this.SET_USERINFO(showUserInfo)
+ }
}
export const appStore = getModule(App)
diff --git a/src/pages/index/store/modules/tagsView.ts b/src/pages/index/store/modules/tagsView.ts
index 31cfec7..c7fa120 100644
--- a/src/pages/index/store/modules/tagsView.ts
+++ b/src/pages/index/store/modules/tagsView.ts
@@ -19,6 +19,7 @@ class TagsView extends VuexModule implements TagsViewState {
@Mutation
private ADD_VISITED_VIEW(view: RouteLocationNormalizedLoaded): void {
if (this.visitedViews.some((v: RouteLocationNormalizedLoaded) => v.path === view.path)) return
+ if (view.meta?.noTagsView) return
this.visitedViews.push(
Object.assign({}, view, {
title: view.meta.title || 'no-name'
diff --git a/src/pages/index/views/dashboard/index.vue b/src/pages/index/views/dashboard/index.vue
index 9615cd9..49c65d1 100644
--- a/src/pages/index/views/dashboard/index.vue
+++ b/src/pages/index/views/dashboard/index.vue
@@ -16,6 +16,70 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+