diff --git a/src/assets/style/global-variables.scss b/src/assets/style/global-variables.scss
index baae072..7a16833 100644
--- a/src/assets/style/global-variables.scss
+++ b/src/assets/style/global-variables.scss
@@ -12,6 +12,6 @@ $subMenuBg: #1f2d3d; // 子菜单背景颜色
$subMenuHover: #001528; // 鼠标经过子菜单时的背景颜色
$collapseMenuActiveBg: #1f2d3d; // 菜单宽度折叠后,已选中菜单的背景颜色
$collapseMenuActiveColor: $menuTextColor; // 菜单宽度折叠后,已选中菜单的文字颜色
-$collapseMenuActiveBorderBg: $mainColor; // 菜单宽度折叠后,已选中菜单的边框颜色
+$collapseMenuActiveBorderColor: $mainColor; // 菜单宽度折叠后,已选中菜单的边框颜色
$collapseMenuActiveBorderWidth: 2px; // 菜单宽度折叠后,已选中菜单的边框宽度
$arrowColor: #909399; // 展开/收起箭头颜色
diff --git a/src/assets/error-icons/403.svg b/src/assets/svg/error-icons/403.svg
similarity index 100%
rename from src/assets/error-icons/403.svg
rename to src/assets/svg/error-icons/403.svg
diff --git a/src/assets/error-icons/404.svg b/src/assets/svg/error-icons/404.svg
similarity index 100%
rename from src/assets/error-icons/404.svg
rename to src/assets/svg/error-icons/404.svg
diff --git a/src/assets/error-icons/500.svg b/src/assets/svg/error-icons/500.svg
similarity index 100%
rename from src/assets/error-icons/500.svg
rename to src/assets/svg/error-icons/500.svg
diff --git a/src/layout/components/Content/index.vue b/src/layout/components/Content/index.vue
new file mode 100644
index 0000000..562b2b4
--- /dev/null
+++ b/src/layout/components/Content/index.vue
@@ -0,0 +1,42 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/layout/components/Sidebar/Menus.vue b/src/layout/components/Sidebar/Menus.vue
index 5b7973a..10cf648 100644
--- a/src/layout/components/Sidebar/Menus.vue
+++ b/src/layout/components/Sidebar/Menus.vue
@@ -92,7 +92,7 @@ export default defineComponent({
top: 0;
width: $collapseMenuActiveBorderWidth;
height: 100%;
- background-color: $collapseMenuActiveBorderBg;
+ background-color: $collapseMenuActiveBorderColor;
}
}
}
diff --git a/src/layout/components/Tabsbar/index.vue b/src/layout/components/Tabsbar/index.vue
deleted file mode 100644
index a8f967c..0000000
--- a/src/layout/components/Tabsbar/index.vue
+++ /dev/null
@@ -1,9 +0,0 @@
-
-
-
-
\ No newline at end of file
diff --git a/src/layout/components/Tagsbar/ScrollBar.vue b/src/layout/components/Tagsbar/ScrollBar.vue
new file mode 100644
index 0000000..cce70f6
--- /dev/null
+++ b/src/layout/components/Tagsbar/ScrollBar.vue
@@ -0,0 +1,26 @@
+
+
+
+
+
+
+
+
diff --git a/src/layout/components/Tagsbar/index.vue b/src/layout/components/Tagsbar/index.vue
new file mode 100644
index 0000000..d3ea1e1
--- /dev/null
+++ b/src/layout/components/Tagsbar/index.vue
@@ -0,0 +1,327 @@
+
+
+
+
+ {{ tag.title }}
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/layout/components/Topbar/Breadcrumbs.vue b/src/layout/components/Topbar/Breadcrumbs.vue
index e33ce16..4203a7c 100644
--- a/src/layout/components/Topbar/Breadcrumbs.vue
+++ b/src/layout/components/Topbar/Breadcrumbs.vue
@@ -14,18 +14,13 @@
@@ -39,12 +39,6 @@ export default defineComponent({
.top {
background: #fff;
}
- .main {
- flex: 1;
- background: #f0f2f5;
- padding: 16px;
- overflow: auto;
- }
}
}
\ No newline at end of file
diff --git a/src/router/index.js b/src/router/index.js
index 845ba64..bd376f3 100644
--- a/src/router/index.js
+++ b/src/router/index.js
@@ -7,7 +7,7 @@ import home from './modules/home'
import test from './modules/test'
-// 左侧菜单(左侧菜单请配置在此,否则无法显示)
+// 左侧菜单
export const allMenus = [
...home,
...test,
diff --git a/src/store/index.js b/src/store/index.js
index 43e9992..0eef3aa 100644
--- a/src/store/index.js
+++ b/src/store/index.js
@@ -3,11 +3,13 @@ import { createStore } from "vuex";
import app from "./modules/app";
import account from "./modules/account";
import menu from "./modules/menu";
+import tags from "./modules/tags";
export default createStore({
modules: {
app,
account,
- menu
+ menu,
+ tags
},
});
\ No newline at end of file
diff --git a/src/store/modules/tags.js b/src/store/modules/tags.js
new file mode 100644
index 0000000..413e6c1
--- /dev/null
+++ b/src/store/modules/tags.js
@@ -0,0 +1,153 @@
+const state = {
+ tagList: [],
+ cacheList: [],
+ activePosition: 0
+}
+
+const mutations = {
+ ADD_TAG_LIST: (state, tag) => {
+ if (state.tagList.some(v => v.path === tag.path)) return;
+ state.tagList.splice(
+ state.activePosition + 1,
+ 0,
+ Object.assign({}, tag, {
+ title: tag.meta.title || 'no-name'
+ })
+ )
+
+ },
+ ADD_CACHE_LIST: (state, tag) => {
+ if (state.cacheList.includes(tag.name)) return
+ if (!tag.meta.noCache) {
+ state.cacheList.push(tag.name)
+ }
+ },
+
+ DEL_TAG_LIST: (state, tag) => {
+ state.tagList = state.tagList.filter(v => v.path !== tag.path)
+ },
+ DEL_CACHE_LIST: (state, tag) => {
+ state.cacheList = state.cacheList.filter(v => v !== tag.name)
+ },
+
+ DEL_OTHER_TAG_LIST: (state, tag) => {
+ state.tagList = state.tagList.filter(v => !!v.meta.affix || v.path === tag.path)
+ },
+ DEL_OTHER_CACHE_LIST: (state, tag) => {
+ state.cacheList = state.cacheList.filter(v => v === tag.name)
+ },
+
+ DEL_ALL_TAG_LIST: state => {
+ state.tagList = state.tagList.filter(v => !!v.meta.affix)
+ },
+ DEL_ALL_CACHE_LIST: state => {
+ state.cacheList = []
+ },
+
+ UPDATE_TAG_LIST: (state, tag) => {
+ const index = state.tagList.findIndex(v => v.path === tag.path);
+ if (index > -1) {
+ state.tagList[index] = Object.assign({}, tag)
+ }
+ },
+
+ SAVE_ACTIVE_POSITION: (state, index) => {
+ state.activePosition = index
+ },
+}
+
+const actions = {
+ saveActivePosition ({ commit }, index) {
+ commit('SAVE_ACTIVE_POSITION', index)
+ },
+ addTag ({ dispatch }, tag) {
+ dispatch('addTagList', tag)
+ dispatch('addCacheList', tag)
+ },
+ addTagList ({ commit }, tag) {
+ commit('ADD_TAG_LIST', tag)
+ },
+ addCacheList ({ commit }, tag) {
+ commit('ADD_CACHE_LIST', tag)
+ },
+
+ delTag ({ dispatch, state }, tag) {
+ return new Promise(resolve => {
+ dispatch('delTagList', tag)
+ dispatch('delCacheList', tag)
+ resolve({
+ tagList: [...state.tagList],
+ cacheList: [...state.cacheList]
+ })
+ })
+ },
+ delTagList ({ commit, state }, tag) {
+ return new Promise(resolve => {
+ commit('DEL_TAG_LIST', tag)
+ resolve([...state.tagList])
+ })
+ },
+ delCacheList ({ commit, state }, tag) {
+ return new Promise(resolve => {
+ commit('DEL_CACHE_LIST', tag)
+ resolve([...state.cacheList])
+ })
+ },
+
+ delOtherTags ({ dispatch, state }, tag) {
+ return new Promise(resolve => {
+ dispatch('delOtherTagList', tag)
+ dispatch('delOtherCacheList', tag)
+ resolve({
+ tagList: [...state.tagList],
+ cacheList: [...state.cacheList]
+ })
+ })
+ },
+ delOtherTagList ({ commit, state }, tag) {
+ return new Promise(resolve => {
+ commit('DEL_OTHER_TAG_LIST', tag)
+ resolve([...state.tagList])
+ })
+ },
+ delOtherCacheList ({ commit, state }, tag) {
+ return new Promise(resolve => {
+ commit('DEL_OTHER_CACHE_LIST', tag)
+ resolve([...state.cacheList])
+ })
+ },
+
+ delAllTags ({ dispatch, state }) {
+ return new Promise(resolve => {
+ dispatch('delAllTagList')
+ dispatch('delAllCacheList')
+ resolve({
+ tagList: [...state.tagList],
+ cacheList: [...state.cacheList]
+ })
+ })
+ },
+ delAllTagList ({ commit, state }) {
+ return new Promise(resolve => {
+ commit('DEL_ALL_TAG_LIST')
+ resolve([...state.tagList])
+ })
+ },
+ delAllCacheList ({ commit, state }) {
+ return new Promise(resolve => {
+ commit('DEL_ALL_CACHE_LIST')
+ resolve([...state.cacheList])
+ })
+ },
+
+ updateTagList ({ commit }, tag) {
+ commit('UPDATE_TAG_LIST', tag)
+ }
+}
+
+export default {
+ namespaced: true,
+ state,
+ mutations,
+ actions
+}
diff --git a/src/views/error/index.vue b/src/views/error/index.vue
index 3473c9b..516aab5 100644
--- a/src/views/error/index.vue
+++ b/src/views/error/index.vue
@@ -2,27 +2,24 @@