From a313f90c3925a7f86281ca0e25b4eafd7c5cbc47 Mon Sep 17 00:00:00 2001
From: sakuya <81883387@qq.com>
Date: Fri, 23 Apr 2021 00:19:54 +0800
Subject: [PATCH] up
---
public/json/user.json | 46 +++++++++++++++++++++++--------
src/App.vue | 4 ++-
src/layout/components/NavMenu.vue | 4 +--
src/layout/components/head.vue | 2 +-
src/layout/components/side.vue | 2 +-
src/layout/components/tags.vue | 5 +++-
src/layout/index.vue | 3 +-
src/router/index.js | 13 ++++++---
src/store/index.js | 4 +--
src/store/modules/keepAlive.js | 21 ++++++++++++++
src/store/modules/tagsView.js | 24 ----------------
src/views/home.vue | 12 ++++++--
src/views/list.vue | 9 ++++++
src/views/other/empty.vue | 19 ++++++++++++-
src/views/show.vue | 6 ++--
15 files changed, 120 insertions(+), 54 deletions(-)
create mode 100644 src/store/modules/keepAlive.js
delete mode 100644 src/store/modules/tagsView.js
diff --git a/public/json/user.json b/public/json/user.json
index e55af129..0af42750 100644
--- a/public/json/user.json
+++ b/public/json/user.json
@@ -6,37 +6,44 @@
"userName": "Administrator"
},
"menuList": [{
- "name": "组件",
+ "name": "vab",
"path": "/vab",
"meta": {
+ "title": "组件",
"icon": "el-icon-takeaway-box"
},
"children": []
},
{
- "name": "布局",
+ "name": "layout2",
"path": "/layout",
"meta": {
+ "title": "组件",
"icon": "el-icon-files"
},
"children": [{
"path": "/layout/list",
- "name": "列表",
- "meta": {},
+ "name": "list",
+ "meta": {
+ "title": "列表"
+ },
"component": "list"
},
{
"path": "/layout/show",
- "name": "详情",
- "meta": {},
+ "name": "show",
+ "meta": {
+ "title": "详情"
+ },
"component": "show"
}
]
},
{
- "name": "其他",
+ "name": "other",
"path": "/other",
"meta": {
+ "title": "其他",
"icon": "el-icon-more"
},
"children": [
@@ -44,6 +51,7 @@
"path": "/link",
"name": "外部链接",
"meta": {
+ "title": "外部链接",
"icon": "el-icon-link"
},
"children": [
@@ -51,6 +59,7 @@
"path": "https://baidu.com",
"name": "百度",
"meta": {
+ "title": "百度",
"target": "_blank"
}
},
@@ -58,6 +67,7 @@
"path": "https://www.google.cn",
"name": "谷歌",
"meta": {
+ "title": "谷歌",
"target": "_blank"
}
}
@@ -67,24 +77,33 @@
"path": "/iframe",
"name": "Iframe",
"meta": {
+ "title": "Iframe",
"icon": "el-icon-position"
},
"children": [
{
"path": "https://vue3js.cn/docs/zh/",
- "name": "VUE 3"
+ "name": "VUE 3",
+ "meta": {
+ "title": "VUE 3"
+ }
},
{
"path": "https://element-plus.org?id=1",
- "name": "Element Plus"
+ "name": "Element Plus",
+ "meta": {
+ "title": "Element Plus"
+ }
}
]
},
{
"path": "/other/lala",
"name": "404",
- "meta": {},
- "component": "lala"
+ "component": "lala",
+ "meta": {
+ "title": "模拟404"
+ }
}
]
},
@@ -92,12 +111,15 @@
"name": "配置",
"path": "/setting",
"meta": {
+ "title": "配置",
"icon": "el-icon-setting"
},
"children": [{
"path": "/setting/1",
"name": "setting1",
- "meta": {},
+ "meta": {
+ "title": "系统设置"
+ },
"component": "lala"
}]
}
diff --git a/src/App.vue b/src/App.vue
index 01a43446..92596380 100644
--- a/src/App.vue
+++ b/src/App.vue
@@ -5,7 +5,9 @@
diff --git a/src/layout/components/NavMenu.vue b/src/layout/components/NavMenu.vue
index 1d92b1ea..df91c969 100644
--- a/src/layout/components/NavMenu.vue
+++ b/src/layout/components/NavMenu.vue
@@ -6,12 +6,12 @@
{{ item.name }}
+{{ item.meta.title }}