From 1311dad06c9937cdea87e84ea4d90025b018d1c9 Mon Sep 17 00:00:00 2001 From: liyang <1711467488@qq.com> Date: Mon, 10 Sep 2018 22:34:40 +0800 Subject: [PATCH 1/9] no message Former-commit-id: 24534d6af6654b2919707338b0b00d2cf0d1bc97 [formerly 24534d6af6654b2919707338b0b00d2cf0d1bc97 [formerly 24534d6af6654b2919707338b0b00d2cf0d1bc97 [formerly 24534d6af6654b2919707338b0b00d2cf0d1bc97 [formerly 6cb5cffb04fe395808a4b7d38ba02c341c84988a [formerly a45637117357eab3eb2fa06e608a6fa83982f8c4]]]]] Former-commit-id: 90aaf8e3734a7012f53896b593f6c08dc3933a3a Former-commit-id: ac32b3de49cf8abaf10297db4872d8d8cc8c10aa Former-commit-id: 841736e373457db9d073b177a79bb63372ce29e5 [formerly 08e36bbd9f97cf60f3020f8f3c5c0118981a5c5f] Former-commit-id: cd38d7659226970c9d1457e9cf8ab4d88ca385f4 Former-commit-id: e022fce2911b7788cd1d213b1253ac16fbfab98f Former-commit-id: 592cde32504d9a16295b1dc7bdedd7c92a41eef2 Former-commit-id: 2b43ff56af3e0184ec7ceb96956e3c0d61100b95 Former-commit-id: 43db9b889c7bc4694e70ce4f84ef320d419e8903 --- README.md | 2 ++ doc/CH.md | 16 ++++++++++++++++ 2 files changed, 18 insertions(+) diff --git a/README.md b/README.md index 403eb42d..1e2f03b2 100644 --- a/README.md +++ b/README.md @@ -112,6 +112,8 @@ ``` +同时您可以将您的项目汇报给我们,优秀项目我们会放置在 D2Admin 相关位置并帮助您宣传。 + ## 加入我们 D2Admin 是完全开源免费的项目,旨在帮助开发者更方便地进行管理系统开发,同时也提供 2000 人的 QQ 交流群和微信群,前后端的朋友可以相互答疑,项目组成员全部在内,所有 D2 相关项目使用问题欢迎在群内提问。 diff --git a/doc/CH.md b/doc/CH.md index 369932cf..1e2f03b2 100644 --- a/doc/CH.md +++ b/doc/CH.md @@ -98,6 +98,22 @@ | D2 CRUD | [Github](https://github.com/d2-projects/d2-crud) | [预览](https://d2-projects.github.io/d2-admin/#/demo/d2-crud/index) | 表格常用操作封装 | | D2 Ribbons | [Github](https://github.com/d2-projects/d2-ribbons) | [预览](https://github.com/d2-projects/d2-ribbons) | 开源项目徽标库 | +## 徽章 + +如果您的开源项目基于 D2Admin 开发,请在您的 README 添加下面的徽章: + + + + + +复制下面代码加入到 README 中即可: + +``` html + +``` + +同时您可以将您的项目汇报给我们,优秀项目我们会放置在 D2Admin 相关位置并帮助您宣传。 + ## 加入我们 D2Admin 是完全开源免费的项目,旨在帮助开发者更方便地进行管理系统开发,同时也提供 2000 人的 QQ 交流群和微信群,前后端的朋友可以相互答疑,项目组成员全部在内,所有 D2 相关项目使用问题欢迎在群内提问。 From 30f67d7fa5ab853db5f1f4abe414a084e71bc167 Mon Sep 17 00:00:00 2001 From: liyang <1711467488@qq.com> Date: Tue, 11 Sep 2018 08:50:18 +0800 Subject: [PATCH 2/9] =?UTF-8?q?=E5=9C=A8=E7=BC=93=E5=AD=98=E8=AE=BE?= =?UTF-8?q?=E7=BD=AE=E4=B8=AD=E5=88=A0=E9=99=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Former-commit-id: d2e6d45be9e79abb643958480f65ffd56db429b1 [formerly d2e6d45be9e79abb643958480f65ffd56db429b1 [formerly d2e6d45be9e79abb643958480f65ffd56db429b1 [formerly d2e6d45be9e79abb643958480f65ffd56db429b1 [formerly 5d1132f35914405de5fc84bb4cac0ee46a30cc9c [formerly 66566d20e8084089424b7b4ba41bc17d24988d46]]]]] Former-commit-id: b1ec14cfa928d8ce273ee8c4b3befccd4dfa4d04 Former-commit-id: 9f7dd61f9224e9c461221aa84e7d8bff6cf830c0 Former-commit-id: 4290a74559e2491b6a80588fd85b988afa77338c [formerly 80c69ce60678baea8d62269fbae23553b6b13677] Former-commit-id: a5abba411bb53cddaeb0746a60f382e1c973dd58 Former-commit-id: cd8040bde5092645b65451693bb9d912838da2e8 Former-commit-id: 0beca05b15e8742bf1b7c66e48e43a8d33ba4628 Former-commit-id: 08c13769901dd86cb5a2133a1edca815c742c8b7 Former-commit-id: ffab044bd3160bb6bda7ff8af39644d2d68b7c97 --- src/store/modules/d2admin/modules/page.js | 315 ------------------ .../d2admin/modules/page.js.REMOVED.git-id | 1 + 2 files changed, 1 insertion(+), 315 deletions(-) delete mode 100644 src/store/modules/d2admin/modules/page.js create mode 100644 src/store/modules/d2admin/modules/page.js.REMOVED.git-id diff --git a/src/store/modules/d2admin/modules/page.js b/src/store/modules/d2admin/modules/page.js deleted file mode 100644 index c2f51013..00000000 --- a/src/store/modules/d2admin/modules/page.js +++ /dev/null @@ -1,315 +0,0 @@ -// 设置文件 -import setting from '@/setting.js' - -export default { - namespaced: true, - state: { - // 可以在多页 tab 模式下显示的页面 - pool: [], - // 当前显示的多页面列表 - opened: setting.page.opened, - // 当前页面 - current: '', - // 需要缓存的页面 name - keepAlive: [] - }, - mutations: { - /** - * @class keepAlive - * @description 从已经打开的页面记录中更新需要缓存的页面记录 - * @param {Object} state vuex state - */ - updateKeepAliveFromOpened (state) { - state.keepAlive = state.opened.filter(item => { - if (item.meta) { - if (item.meta.notCache) { - return false - } - } - return true - }).map(e => e.name) - }, - /** - * @class current - * @description 打开一个新的页面 - * @param {Object} state vuex state - * @param {Object} param { name, params, query } 路由信息 - */ - open (state, { name, params, query }) { - // 已经打开的页面 - let opened = state.opened - // 判断此页面是否已经打开 并且记录位置 - let pageOpendIndex = 0 - const pageOpend = opened.find((page, index) => { - const same = page.name === name - pageOpendIndex = same ? index : pageOpendIndex - return same - }) - if (pageOpend) { - // 页面以前打开过 但是新的页面可能 name 一样,参数不一样 - this.commit('d2admin/page/openedUpdate', { - index: pageOpendIndex, - params, - query - }) - } else { - // 页面以前没有打开过 - let page = state.pool.find(t => t.name === name) - if (page) { - this.commit('d2admin/page/add', { - tag: page, - params, - query - }) - } - } - this.commit('d2admin/page/currentSet', name) - }, - /** - * @class current - * @description 设置当前激活的页面 name - * @param {Object} state vuex state - * @param {String} name new name - */ - currentSet (state, name) { - state.current = name - }, - /** - * @class opened - * @description 更新页面列表上的某一项 - * @param {Object} state vuex state - * @param {Object} param { index, params, query } 路由信息 - */ - openedUpdate (state, { index, params, query }) { - // 更新页面列表某一项 - let page = state.opened[index] - page.params = params || page.params - page.query = query || page.query - state.opened.splice(index, 1, page) - // 持久化 - this.commit('d2admin/page/opend2db') - }, - /** - * 将 opened 属性赋值并持久化 在这之前请先确保已经更新了 state.opened - * @param {Object} state vuex state - */ - opend2db (state) { - this.dispatch('d2admin/db/set', { - dbName: 'sys', - path: 'page.opened', - value: state.opened, - user: true - }) - }, - /** - * @class opened - * @description 从持久化数据载入分页列表 - * @param {Object} state vuex state - */ - async openedLoad (state) { - // store 赋值 - const value = await this.dispatch('d2admin/db/get', { - dbName: 'sys', - path: 'page.opened', - defaultValue: setting.page.opened, - user: true - }) - // 在处理函数中进行数据优化 过滤掉现在已经失效的页签或者已经改变了信息的页签 - // 以 name 字段为准 - // 如果页面过多的话可能需要优化算法 - // valid 有效列表 1, 1, 0, 1 => 有效, 有效, 失效, 有效 - const valid = [] - // 处理数据 - state.opened = value.map(opened => { - // 忽略首页 - if (opened.name === 'index') { - valid.push(1) - return opened - } - // 尝试在所有的支持多标签页的页面里找到 name 匹配的页面 - const find = state.pool.find(item => item.name === opened.name) - // 记录有效或无效信息 - valid.push(find ? 1 : 0) - // 返回合并后的数据 新的覆盖旧的 - // 新的数据中一般不会携带 params 和 query, 所以旧的参数会留存 - return Object.assign({}, opened, find) - }).filter((opened, index) => valid[index] === 1) - }, - /** - * @class opened - * @description 新增一个 tag (打开一个页面) - * @param {Object} state vuex state - * @param {Object} param new tag info - */ - add (state, { tag, params, query }) { - // 设置新的 tag 在新打开一个以前没打开过的页面时使用 - let newTag = tag - newTag.params = params || newTag.params - newTag.query = query || newTag.query - // 添加进当前显示的页面数组 - state.opened.push(newTag) - // 持久化 - this.commit('d2admin/page/opend2db') - }, - /** - * @class opened - * @description 关闭一个 tag (关闭一个页面) - * @param {Object} state vuex state - * @param {Object} param { tagName: 要关闭的标签名字, vm: vue } - */ - close (state, { tagName, vm }) { - // 下个新的页面 - let newPage = state.opened[0] - const isCurrent = state.current === tagName - // 如果关闭的页面就是当前显示的页面 - if (isCurrent) { - // 去找一个新的页面 - let len = state.opened.length - for (let i = 1; i < len; i++) { - if (state.opened[i].name === tagName) { - if (i < len - 1) { - newPage = state.opened[i + 1] - } else { - newPage = state.opened[i - 1] - } - break - } - } - } - // 找到这个页面在已经打开的数据里是第几个 - const index = state.opened.findIndex(page => page.name === tagName) - if (index >= 0) { - state.opened.splice(index, 1) - } - // 持久化 - this.commit('d2admin/page/opend2db') - // 最后需要判断是否需要跳到首页 - if (isCurrent) { - const { name = '', params = {}, query = {} } = newPage - let routerObj = { - name, - params, - query - } - vm.$router.push(routerObj) - } - }, - /** - * @class opened - * @description 关闭当前标签左边的标签 - * @param {Object} state vuex state - * @param {Object} param { pageSelect: 当前选中的tagName, vm: vue } - */ - closeLeft (state, { pageSelect, vm } = {}) { - const pageAim = pageSelect || state.current - let currentIndex = 0 - state.opened.forEach((page, index) => { - if (page.name === pageAim) { - currentIndex = index - } - }) - if (currentIndex > 0) { - state.opened.splice(1, currentIndex - 1) - } - state.current = pageAim - if (vm && vm.$route.name !== pageAim) { - vm.$router.push({ - name: pageAim - }) - } - // 持久化 - this.commit('d2admin/page/opend2db') - }, - /** - * @class opened - * @description 关闭当前标签右边的标签 - * @param {Object} state vuex state - * @param {Object} param { pageSelect: 当前选中的tagName, vm: vue } - */ - closeRight (state, { pageSelect, vm } = {}) { - const pageAim = pageSelect || state.current - let currentIndex = 0 - state.opened.forEach((page, index) => { - if (page.name === pageAim) { - currentIndex = index - } - }) - state.opened.splice(currentIndex + 1) - state.current = pageAim - if (vm && vm.$route.name !== pageAim) { - vm.$router.push({ - name: pageAim - }) - } - // 持久化 - this.commit('d2admin/page/opend2db') - }, - /** - * @class opened - * @description 关闭当前激活之外的 tag - * @param {Object} state vuex state - * @param {Object} param { pageSelect: 当前选中的tagName, vm: vue } - */ - closeOther (state, { pageSelect, vm } = {}) { - const pageAim = pageSelect || state.current - let currentIndex = 0 - state.opened.forEach((page, index) => { - if (page.name === pageAim) { - currentIndex = index - } - }) - if (currentIndex === 0) { - state.opened.splice(1) - } else { - state.opened.splice(currentIndex + 1) - state.opened.splice(1, currentIndex - 1) - } - state.current = pageAim - if (vm && vm.$route.name !== pageAim) { - vm.$router.push({ - name: pageAim - }) - } - // 持久化 - this.commit('d2admin/page/opend2db') - }, - /** - * @class opened - * @description 关闭所有 tag - * @param {Object} state vuex state - * @param {Object} vm vue - */ - closeAll (state, vm) { - state.opened.splice(1) - // 持久化 - this.commit('d2admin/page/opend2db') - // 关闭所有的标签页后需要判断一次现在是不是在首页 - if (vm.$route.name !== 'index') { - vm.$router.push({ - name: 'index' - }) - } - }, - /** - * @class pool - * @description 保存 pool (候选池) - * @param {Object} state vuex state - * @param {Array} routes routes - */ - init (state, routes) { - const pool = [] - const push = function (routes) { - routes.forEach(route => { - if (route.children) { - push(route.children) - } else { - const { meta, name, path } = route - pool.push({ meta, name, path }) - } - }) - } - push(routes) - state.pool = pool - } - } -} diff --git a/src/store/modules/d2admin/modules/page.js.REMOVED.git-id b/src/store/modules/d2admin/modules/page.js.REMOVED.git-id new file mode 100644 index 00000000..8b489c6a --- /dev/null +++ b/src/store/modules/d2admin/modules/page.js.REMOVED.git-id @@ -0,0 +1 @@ +3ea93a47151c1e74b0de50125934245e1917cb89 \ No newline at end of file From dcaca434aff74481c038fc42955150271f70c97b Mon Sep 17 00:00:00 2001 From: liyang <1711467488@qq.com> Date: Tue, 11 Sep 2018 10:28:47 +0800 Subject: [PATCH 3/9] =?UTF-8?q?=E6=9B=B4=E6=94=B9=E5=AD=97=E4=BD=93?= =?UTF-8?q?=E5=A4=A7=E5=B0=8F=E5=90=8E=E9=87=8D=E6=96=B0=E5=8A=A0=E8=BD=BD?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Former-commit-id: 8bd2181aebe2d5bb0031d3f14285d99dd71cd600 [formerly 51cfdcb33fea7ed230623e6af1c6fabf82f46385] [formerly 8bd2181aebe2d5bb0031d3f14285d99dd71cd600 [formerly 51cfdcb33fea7ed230623e6af1c6fabf82f46385] [formerly 8bd2181aebe2d5bb0031d3f14285d99dd71cd600 [formerly 51cfdcb33fea7ed230623e6af1c6fabf82f46385] [formerly 51cfdcb33fea7ed230623e6af1c6fabf82f46385 [formerly 3971f03675e8e0821dbd3f368256e16a994b6e51 [formerly 776505901685f2c95336c3c436d2534b31f398a8]]]]] Former-commit-id: 2f6323c1e76bde0b8ab10eba2a682e1002dbb5db Former-commit-id: f3022bef3c6cbc5a692597c92469bdac1949765b Former-commit-id: ff9779ffcd0a7249242431e09ac9dd1115282d4a [formerly 0ddfd187a6f0078ccb8f6c73b4486221c5a23a06] Former-commit-id: 753bce6ee4c53f6ae3d635d4756562ce75bf5ad1 Former-commit-id: 90faedc34e09c7caea4ab6c86835f19963121d45 Former-commit-id: e51610d40966f4b6ef460e6c350a61e51fbf52c9 Former-commit-id: ce9941f577755eae35b65f684bf2c937fd2aeaac Former-commit-id: dfc181c42686598941822acffe437e596550c01d --- .../components/header-size/index.vue | 24 ++++++++++++------- src/pages/redirect/index.vue | 12 ++++++++++ src/router/routes.js.REMOVED.git-id | 2 +- .../d2admin/modules/page.js.REMOVED.git-id | 2 +- 4 files changed, 29 insertions(+), 11 deletions(-) create mode 100755 src/pages/redirect/index.vue diff --git a/src/layout/header-aside/components/header-size/index.vue b/src/layout/header-aside/components/header-size/index.vue index b13b0783..140cca8d 100644 --- a/src/layout/header-aside/components/header-size/index.vue +++ b/src/layout/header-aside/components/header-size/index.vue @@ -4,7 +4,7 @@ - + 默认 @@ -35,20 +35,26 @@ export default { value: { handler (val) { this.$ELEMENT.size = val + this.$message({ + message: `设置尺寸成功 ${val}`, + type: 'success' + }) + this.pageKeepAliveClean() + const { path } = this.$route + this.$router.replace({ + path: '/redirect' + path + }) }, immediate: true } }, methods: { - ...mapMutations('d2admin/size', [ - 'set' - ]), + ...mapMutations({ + sizeSet: 'd2admin/size/set', + pageKeepAliveClean: 'd2admin/page/keepAliveClean' + }), handleChange (value) { - this.set(value) - this.$message({ - message: `设置尺寸成功 ${value}`, - type: 'success' - }) + this.sizeSet(value) }, iconName (name) { return name === this.value ? 'dot-circle-o' : 'circle-o' diff --git a/src/pages/redirect/index.vue b/src/pages/redirect/index.vue new file mode 100755 index 00000000..2a4d1d8c --- /dev/null +++ b/src/pages/redirect/index.vue @@ -0,0 +1,12 @@ + diff --git a/src/router/routes.js.REMOVED.git-id b/src/router/routes.js.REMOVED.git-id index 48b10bdb..aa1bca70 100644 --- a/src/router/routes.js.REMOVED.git-id +++ b/src/router/routes.js.REMOVED.git-id @@ -1 +1 @@ -e5f86ceea9da8ed5238a065835a8d86dfa3cf688 \ No newline at end of file +609c02412f8f0258da541f80d746a00b9a614d21 \ No newline at end of file diff --git a/src/store/modules/d2admin/modules/page.js.REMOVED.git-id b/src/store/modules/d2admin/modules/page.js.REMOVED.git-id index 8b489c6a..8f98bee1 100644 --- a/src/store/modules/d2admin/modules/page.js.REMOVED.git-id +++ b/src/store/modules/d2admin/modules/page.js.REMOVED.git-id @@ -1 +1 @@ -3ea93a47151c1e74b0de50125934245e1917cb89 \ No newline at end of file +d17c431357bf57bab4723efb614929a1f5187956 \ No newline at end of file From c4aefe50c2615edc6e75ac6d334c752ee1022203 Mon Sep 17 00:00:00 2001 From: liyang <1711467488@qq.com> Date: Tue, 11 Sep 2018 10:37:06 +0800 Subject: [PATCH 4/9] =?UTF-8?q?=E8=AE=BE=E7=BD=AE=E7=9B=B8=E5=90=8C?= =?UTF-8?q?=E5=88=99=E4=B8=8D=E6=9B=B4=E6=96=B0=E9=A1=B5=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Former-commit-id: 552d5a821af83274e1c396ae0108b10b1637ac31 [formerly 9d814d5494c25900c102e1c0cc3a13dd03998748] [formerly 552d5a821af83274e1c396ae0108b10b1637ac31 [formerly 9d814d5494c25900c102e1c0cc3a13dd03998748] [formerly 552d5a821af83274e1c396ae0108b10b1637ac31 [formerly 9d814d5494c25900c102e1c0cc3a13dd03998748] [formerly 9d814d5494c25900c102e1c0cc3a13dd03998748 [formerly 0beebaf44d8232a29651b3625f653d18ba2583a9 [formerly 20dcf114746fb2fd7ce4446e0ca4fd4a79bf655b]]]]] Former-commit-id: d5207fdf94e6bef43fa3d84514ad4c424084b63f Former-commit-id: 237829b7505f9fe5f24347b07f6dffd09a0608b4 Former-commit-id: 0b5561562259ea9991038cd2cf4e882546dc7729 [formerly 3d1eb948aa71bc628f8fd04a81ba8535c5954c3b] Former-commit-id: b7512d11b3c28a1128fb5eed942c84f455fd90fe Former-commit-id: 7effa5ab96743951cea8008ecb1468e8bd1cc8a7 Former-commit-id: d2bbdc487cc6b59da42617d489a255fd974ae9a2 Former-commit-id: 176d6d7bd7f727147079db3e9c89ae73e2fcf532 Former-commit-id: 0283f2ca3211a1aea57c7e0169497f7c0eb6269f --- .../components/header-size/index.vue | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/src/layout/header-aside/components/header-size/index.vue b/src/layout/header-aside/components/header-size/index.vue index 140cca8d..1d59304b 100644 --- a/src/layout/header-aside/components/header-size/index.vue +++ b/src/layout/header-aside/components/header-size/index.vue @@ -34,16 +34,14 @@ export default { // 因为需要访问 this.$ELEMENT 所以只能在这里使用这种方式 value: { handler (val) { - this.$ELEMENT.size = val - this.$message({ - message: `设置尺寸成功 ${val}`, - type: 'success' - }) - this.pageKeepAliveClean() - const { path } = this.$route - this.$router.replace({ - path: '/redirect' + path - }) + if (this.$ELEMENT.size !== val) { + this.$ELEMENT.size = val + this.pageKeepAliveClean() + const { path } = this.$route + this.$router.replace({ + path: '/redirect' + path + }) + } }, immediate: true } From b9d63f2fc2dbcd97d0b0643e5f8e422fc4b7eab2 Mon Sep 17 00:00:00 2001 From: liyang <1711467488@qq.com> Date: Tue, 11 Sep 2018 13:26:54 +0800 Subject: [PATCH 5/9] redirect Former-commit-id: c5c758a3e2b5e82f3e3f64b89b4fa3f82e7e18ca [formerly c5c758a3e2b5e82f3e3f64b89b4fa3f82e7e18ca [formerly c5c758a3e2b5e82f3e3f64b89b4fa3f82e7e18ca [formerly c5c758a3e2b5e82f3e3f64b89b4fa3f82e7e18ca [formerly 6f0f7f02f0824fbdb259814c067629459e23288f [formerly 758f016ea87157922f71ccce0e70ddf554bfe298]]]]] Former-commit-id: 2937c303eaf13793d17401d98873a54e2c2b7d1e Former-commit-id: c75e02b1ecd6494143a837518341bdc853363532 Former-commit-id: 0e6fc404cdfdfe4bdea4dc4183c653b7cfdf4e81 [formerly 3707dda6fe9b1e959fb83e85fec4ae89af6eebe1] Former-commit-id: 9adb43687549c659fd6f51e6167928431df4cb84 Former-commit-id: 97ab4d485b7ead419e0c75e208bd1674950e9b67 Former-commit-id: 243cef2a4e6077c855b60ca35403aa0d385a6bdd Former-commit-id: 2c0e1d3d49d4f7c8d7d7139b1402a93e3ab84878 Former-commit-id: f2425ec903b4aaabf3bfb11357111e9a25bcd83c --- src/layout/header-aside/components/header-size/index.vue | 7 +++++-- src/pages/redirect/index.vue | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/layout/header-aside/components/header-size/index.vue b/src/layout/header-aside/components/header-size/index.vue index 1d59304b..731e5c37 100644 --- a/src/layout/header-aside/components/header-size/index.vue +++ b/src/layout/header-aside/components/header-size/index.vue @@ -35,11 +35,14 @@ export default { value: { handler (val) { if (this.$ELEMENT.size !== val) { + // 设置 element 全局尺寸 this.$ELEMENT.size = val + // 清空缓存设置 this.pageKeepAliveClean() - const { path } = this.$route + // 刷新此页面 + const { path, query } = this.$route this.$router.replace({ - path: '/redirect' + path + path: '/redirect/' + JSON.stringify({ path, query }) }) } }, diff --git a/src/pages/redirect/index.vue b/src/pages/redirect/index.vue index 2a4d1d8c..c7aa86b8 100755 --- a/src/pages/redirect/index.vue +++ b/src/pages/redirect/index.vue @@ -3,7 +3,7 @@ export default { beforeCreate () { const path = this.$route.params.path - this.$router.replace('/' + path) + this.$router.replace(JSON.parse(path)) }, render: function (h) { return h() From 770144736bf41eab21c93bed9edfe474b7d3270f Mon Sep 17 00:00:00 2001 From: liyang <1711467488@qq.com> Date: Tue, 11 Sep 2018 13:47:06 +0800 Subject: [PATCH 6/9] router setting Former-commit-id: 3e4f06a60e4c92932122a3368605b4ac42899b6d [formerly 3e4f06a60e4c92932122a3368605b4ac42899b6d [formerly 3e4f06a60e4c92932122a3368605b4ac42899b6d [formerly 3e4f06a60e4c92932122a3368605b4ac42899b6d [formerly 16f37c7e5df70305e921f65cc6b321adba08b3e5 [formerly 5bf9057f2f0d5aa8c3f0ffbaf84b398677bbf71d]]]]] Former-commit-id: de05d584c4c7f9cdc62a4007d7372232affe1f84 Former-commit-id: 6d2d0ebf90c2a9d8dfab48bcdef10288901efd8a Former-commit-id: d5ef4f24d786a4ada844119f806b463ff276ee8a [formerly 634b5cf7531e1f54b3c77f7ca3e2db4e958c4854] Former-commit-id: 8928a2dd3ea5a21a731c3e61629d05aca5b0a506 Former-commit-id: ffd72f5298fbdddd424df60fcdca3d3e2be42efc Former-commit-id: cee597fdc644e10998a20be13788100e984315e2 Former-commit-id: 6e53a652ad79cb7b8dd094e2d44a5caec4bb4137 Former-commit-id: 2eab690a0ea75063860f9da2c8335e3d4ea326ba --- src/router/routes.js.REMOVED.git-id | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/router/routes.js.REMOVED.git-id b/src/router/routes.js.REMOVED.git-id index aa1bca70..6a61f620 100644 --- a/src/router/routes.js.REMOVED.git-id +++ b/src/router/routes.js.REMOVED.git-id @@ -1 +1 @@ -609c02412f8f0258da541f80d746a00b9a614d21 \ No newline at end of file +58069f63d26f33421df3d333c4aa58af52c87aaa \ No newline at end of file From 8cc625475802b167d17ec93c0490a3caf9b1c0d0 Mon Sep 17 00:00:00 2001 From: liyang <1711467488@qq.com> Date: Tue, 11 Sep 2018 14:38:03 +0800 Subject: [PATCH 7/9] keepAlivePush Former-commit-id: f9db4209516f7cb157a6a6e2ce7b411864bac50d [formerly 1cbe7fd07c092007b473a6c2d2147805feaff7a2] [formerly f9db4209516f7cb157a6a6e2ce7b411864bac50d [formerly 1cbe7fd07c092007b473a6c2d2147805feaff7a2] [formerly f9db4209516f7cb157a6a6e2ce7b411864bac50d [formerly 1cbe7fd07c092007b473a6c2d2147805feaff7a2] [formerly 1cbe7fd07c092007b473a6c2d2147805feaff7a2 [formerly 1608553a3e54546860763ca77ca022768b775edf [formerly f38ba4b88c48c23b79b5658b4e47e42dc214062e]]]]] Former-commit-id: 9a443bb71cafa820835d642f11ef1aab4033d50f Former-commit-id: 8f5c9516e135c75875b06bd0be886ca4c830bc7d Former-commit-id: 1ac322c60c70dda3e645638a6feccb3ed7ac61de [formerly 6ca02dc4595f8b4ae65727ef45a2777e207dde7e] Former-commit-id: 644c11b16d4d22f7cb8517db5bb5c655f7ebbdbb Former-commit-id: b265a95e2ec4c84cb8a876332ad61b4b7a0570ad Former-commit-id: 70fe217bf91aa2afe327e9197bb4c7fad28d4056 Former-commit-id: fdefd291a9822096cf04c7b92cc4278e0db04f64 Former-commit-id: 86dc904b03b44609498573f1408f1c90607296c5 --- src/store/modules/d2admin/modules/page.js.REMOVED.git-id | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/store/modules/d2admin/modules/page.js.REMOVED.git-id b/src/store/modules/d2admin/modules/page.js.REMOVED.git-id index 8f98bee1..eec5bd91 100644 --- a/src/store/modules/d2admin/modules/page.js.REMOVED.git-id +++ b/src/store/modules/d2admin/modules/page.js.REMOVED.git-id @@ -1 +1 @@ -d17c431357bf57bab4723efb614929a1f5187956 \ No newline at end of file +31ed5334d5eea9b2e874a0ed5dd311a39b494f79 \ No newline at end of file From 4240c8a7787d15b1a9b8190f3f121a3d6846ae24 Mon Sep 17 00:00:00 2001 From: liyang <1711467488@qq.com> Date: Tue, 11 Sep 2018 15:06:41 +0800 Subject: [PATCH 8/9] keepAliveRefresh Former-commit-id: 3338338a7b597f1440e6f482838ab5ed0a9cfe30 [formerly c0c80cbbf5d196d1870f3c2b1a3a23e17ced039c] [formerly 3338338a7b597f1440e6f482838ab5ed0a9cfe30 [formerly c0c80cbbf5d196d1870f3c2b1a3a23e17ced039c] [formerly 3338338a7b597f1440e6f482838ab5ed0a9cfe30 [formerly c0c80cbbf5d196d1870f3c2b1a3a23e17ced039c] [formerly c0c80cbbf5d196d1870f3c2b1a3a23e17ced039c [formerly 42c0248e4aef8466b792b40271447c0bc5759a24 [formerly 77bbaf7a214d5acf9447108aea49371d4b836811]]]]] Former-commit-id: 6076feac7bf820b21b9f2321867fa9f22c356a4d Former-commit-id: 8ce137aa6af24fd0a947f35eeb14c216915ccff0 Former-commit-id: 846957c13cce146c14e8769ad82e8fb0212c83e3 [formerly 91a9bf91cae1ff9964fe87ba8d781a9664a8f5db] Former-commit-id: 9c024f7c3c1264b7a241af19b02edce072b7bad5 Former-commit-id: 1cd7ba2f0a4ed24e4165cb3556b54eabef0120c3 Former-commit-id: f3264fba10389e8f01dac2fc8b0b7d860b554976 Former-commit-id: 7f4e9b1f10362be82ddd06b581ac2efcd2eb1078 Former-commit-id: 46e66facb4413c49220b5e64a4a54482b26dc657 --- src/store/modules/d2admin/modules/page.js.REMOVED.git-id | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/store/modules/d2admin/modules/page.js.REMOVED.git-id b/src/store/modules/d2admin/modules/page.js.REMOVED.git-id index eec5bd91..a85c9a13 100644 --- a/src/store/modules/d2admin/modules/page.js.REMOVED.git-id +++ b/src/store/modules/d2admin/modules/page.js.REMOVED.git-id @@ -1 +1 @@ -31ed5334d5eea9b2e874a0ed5dd311a39b494f79 \ No newline at end of file +9abf067fc9ee38d5c28f4b1450b9df450c2583bc \ No newline at end of file From 45c75515c1be168a061855cac0152487aff8dc6d Mon Sep 17 00:00:00 2001 From: liyang <1711467488@qq.com> Date: Tue, 11 Sep 2018 15:40:52 +0800 Subject: [PATCH 9/9] add sizeValue Former-commit-id: eb5f81780ca55e1d318f8535512e9dece0a00943 [formerly eb5f81780ca55e1d318f8535512e9dece0a00943 [formerly eb5f81780ca55e1d318f8535512e9dece0a00943 [formerly eb5f81780ca55e1d318f8535512e9dece0a00943 [formerly c771f8752885f773fd7b01e18704ada8f67e2262 [formerly 81d588de82e5a3465d0e657d077859b8626eb6b0]]]]] Former-commit-id: b64d15fa59efb23e167725a898f3d682e89f3464 Former-commit-id: 08b74710ff008f3b682bcf47e079c35dedeebb9f Former-commit-id: e43a9e882914f64e046941862eddffc79ee7ca7b [formerly 0efc0c8a390ffdaff309ab831af04c72ca8c0087] Former-commit-id: f8f1c20da16f9731aebde21ee58d3c8904d71b68 Former-commit-id: 6c1875d0aef4736b93b0c6ed24d5d5b86093c593 Former-commit-id: ec16a3b74e539c76f7ae7266493cc28202cf3d0a Former-commit-id: dd693ccdfd593420dc3fff0918223fb177680792 Former-commit-id: af439a23c6500b4bceb289313be9fa2d2333e2be --- src/pages/demo/playground/store/sys/index.vue | 22 +++++++++++++------ 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/src/pages/demo/playground/store/sys/index.vue b/src/pages/demo/playground/store/sys/index.vue index e532e4bd..a4846fbb 100644 --- a/src/pages/demo/playground/store/sys/index.vue +++ b/src/pages/demo/playground/store/sys/index.vue @@ -6,18 +6,18 @@ -
+
+ :options="{ rootObjectKey: 'menuHeader', maxDepth: 1 }"/>
-
+
- + - + - + + + + + {{sizeValue}} + + @@ -153,7 +159,9 @@ export default { // tag 池 pagePool: state => state.page.pool, pageCurrent: state => state.page.current, - pageopened: state => state.page.opened + pageopened: state => state.page.opened, + // 全局尺寸 + sizeValue: state => state.size.value }), ...mapGetters('d2admin', { keepAlive: 'page/keepAlive',