diff --git a/src/router/modules/test.js b/src/router/modules/test.js
index 8010804..6192c45 100644
--- a/src/router/modules/test.js
+++ b/src/router/modules/test.js
@@ -3,7 +3,7 @@
* @version:
* @Date: 2021-04-21 09:18:32
* @LastEditors: huzhushan@126.com
- * @LastEditTime: 2021-04-23 10:49:35
+ * @LastEditTime: 2021-04-28 16:49:53
* @Author: huzhushan@126.com
* @HomePage: https://huzhushan.gitee.io/vue3-element-admin
* @Github: https://github.com/huzhushan/vue3-element-admin
@@ -12,6 +12,7 @@
const Layout = () => import('@/layout/index.vue')
const List = () => import('@/views/test/index.vue')
const Add = () => import('@/views/test/Add.vue')
+const Edit = () => import('@/views/test/Edit.vue')
const Auth = () => import('@/views/test/Auth.vue')
const NoAuth = () => import('@/views/test/NoAuth.vue')
const Nest = () => import('@/views/test/Nest.vue')
@@ -51,6 +52,16 @@ export default [
},
hidden: true, // 不在菜单中显示
},
+ {
+ path: 'edit/:id',
+ name: 'testEdit',
+ component: Edit,
+ meta: {
+ title: '编辑',
+ roles: ['admin', 'visitor'],
+ },
+ hidden: true, // 不在菜单中显示
+ },
{
path: 'auth',
name: 'testAuth',
diff --git a/src/store/modules/tags.js b/src/store/modules/tags.js
index ef90188..c461334 100644
--- a/src/store/modules/tags.js
+++ b/src/store/modules/tags.js
@@ -3,7 +3,7 @@
* @version:
* @Date: 2021-04-20 11:06:21
* @LastEditors: huzhushan@126.com
- * @LastEditTime: 2021-04-21 09:34:20
+ * @LastEditTime: 2021-04-28 17:40:11
* @Author: huzhushan@126.com
* @HomePage: https://huzhushan.gitee.io/vue3-element-admin
* @Github: https://github.com/huzhushan/vue3-element-admin
@@ -20,7 +20,7 @@ const state = {
}
const mutations = {
- ADD_TAG_LIST: (state, { path, fullPath, name, meta }) => {
+ ADD_TAG_LIST: (state, { path, fullPath, name, meta, params, query }) => {
if (state.tagList.some(v => v.path === path)) return false
state.tagList.splice(
@@ -28,7 +28,7 @@ const mutations = {
0,
Object.assign(
{},
- { path, fullPath, name, meta },
+ { path, fullPath, name, meta, params, query },
{
title: meta.title || '未命名',
fullPath: fullPath || path,
@@ -156,8 +156,8 @@ const actions = {
commit('DEL_ALL_CACHE_LIST')
},
- updateTagList({ commit }, tag) {
- commit('UPDATE_TAG_LIST', tag)
+ updateTagList({ commit }, { path, fullPath, name, meta, params, query }) {
+ commit('UPDATE_TAG_LIST', { path, fullPath, name, meta, params, query })
},
}
diff --git a/src/views/test/Edit.vue b/src/views/test/Edit.vue
new file mode 100644
index 0000000..cc559d8
--- /dev/null
+++ b/src/views/test/Edit.vue
@@ -0,0 +1,39 @@
+
+
+
+ 编辑页面 id:{{ $route.params.id }}
+
diff --git a/src/views/test/index.vue b/src/views/test/index.vue
index 393dd38..c331dee 100644
--- a/src/views/test/index.vue
+++ b/src/views/test/index.vue
@@ -25,7 +25,13 @@
- 编辑
+
+ 编辑
+
删除