From 5cd91cc35dc09a875e28413a29bf6d149bfb13a3 Mon Sep 17 00:00:00 2001
From: liyang <1711467488@qq.com>
Date: Tue, 7 Aug 2018 23:50:45 +0800
Subject: [PATCH 01/31] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=96=87=E4=BB=B6?=
=?UTF-8?q?=E7=9B=AE=E5=BD=95=20=E4=B8=BA=E5=90=8E=E7=BB=AD=E6=A8=A1?=
=?UTF-8?q?=E5=9D=97=E5=8C=96=E5=81=9A=E5=87=86=E5=A4=87?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Former-commit-id: 7ac8ff67cfc714c7c5f3c1835c6a3585d2898cf5 [formerly 7ac8ff67cfc714c7c5f3c1835c6a3585d2898cf5 [formerly 7ac8ff67cfc714c7c5f3c1835c6a3585d2898cf5 [formerly 7ac8ff67cfc714c7c5f3c1835c6a3585d2898cf5 [formerly 585db786441b989eff439912ab47bf5f3c41a749 [formerly 1aa58fed969861d42b797dd3e06929132a3da912]]]]]
Former-commit-id: e277625851c94916eb9572636fb902666a88f808
Former-commit-id: ac4b8e1028d4647af2d3620bac6fc6caf1d01472
Former-commit-id: ddef88f77f257902e153d63300e5cc164ee741e6 [formerly e3c281ff3e3c4bfb39f93a8c778616e2408f53b1]
Former-commit-id: 53dcc046428da982a0a85367e0327c8a9d846619
Former-commit-id: db2d3dd5aa11586c35a7574c975005cf17e8cd35
Former-commit-id: 54ca2b1d019e0126cfffa847c751597f3137a3cd
Former-commit-id: 695755b41f0b2b7fe1961e20936da22e6a10b424
Former-commit-id: 459c83348032db43ef835634400897db180ac35c
---
src/store/modules/d2admin.js.REMOVED.git-id | 1 -
src/store/modules/d2admin/index.js.REMOVED.git-id | 1 +
2 files changed, 1 insertion(+), 1 deletion(-)
delete mode 100644 src/store/modules/d2admin.js.REMOVED.git-id
create mode 100644 src/store/modules/d2admin/index.js.REMOVED.git-id
diff --git a/src/store/modules/d2admin.js.REMOVED.git-id b/src/store/modules/d2admin.js.REMOVED.git-id
deleted file mode 100644
index b4b3064d..00000000
--- a/src/store/modules/d2admin.js.REMOVED.git-id
+++ /dev/null
@@ -1 +0,0 @@
-efda2b963ee9b9d9fe1b30d4fdfeac80d127bb31
\ No newline at end of file
diff --git a/src/store/modules/d2admin/index.js.REMOVED.git-id b/src/store/modules/d2admin/index.js.REMOVED.git-id
new file mode 100644
index 00000000..412de3df
--- /dev/null
+++ b/src/store/modules/d2admin/index.js.REMOVED.git-id
@@ -0,0 +1 @@
+fd12a77558dbfc4645076ab263171bba16fca77c
\ No newline at end of file
From 129732558f6b807dab66d8f42ca29f16434f927d Mon Sep 17 00:00:00 2001
From: liyang <1711467488@qq.com>
Date: Wed, 8 Aug 2018 07:59:52 +0800
Subject: [PATCH 02/31] =?UTF-8?q?=E5=8F=82=E6=95=B0=E5=90=8D=E6=89=B9?=
=?UTF-8?q?=E9=87=8F=E4=BF=AE=E6=94=B9?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Former-commit-id: 1a0c7d8b50fec573a7aadeceb45091d912bcc1ef [formerly 1a0c7d8b50fec573a7aadeceb45091d912bcc1ef [formerly 1a0c7d8b50fec573a7aadeceb45091d912bcc1ef [formerly 1a0c7d8b50fec573a7aadeceb45091d912bcc1ef [formerly c2fbf3841957c808ada8d1ac6ea5e99445b9a752 [formerly 5ab8ff3ab01480b7aacdc88c6580b45e48b96ee4]]]]]
Former-commit-id: 61174d35787e83c7c25ce01359d68a12ef17d7f7
Former-commit-id: da2d36e071a049cf6bb1f9091c80d5183d324ad1
Former-commit-id: 9cc4b408474b2152a4e33937fb1afef51eb3db73 [formerly 8a101ad6b9db7aec74971ff3572192d92be60245]
Former-commit-id: 3ff22e65803fc966799c30c11f8f9958a3317090
Former-commit-id: 4e74b514a1e3051c18daaa258d98e2c32e18b4c8
Former-commit-id: e6c0d144a8d8d05f01f8d7086a347d2aba7022b4
Former-commit-id: e5f1805494b931e26afcbccf48a782f1ea495f9a
Former-commit-id: 8cf2f5dc12765d3262645d6ccd30704a25fa9b74
---
src/store/modules/d2admin/index.js.REMOVED.git-id | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/store/modules/d2admin/index.js.REMOVED.git-id b/src/store/modules/d2admin/index.js.REMOVED.git-id
index 412de3df..f8ca85be 100644
--- a/src/store/modules/d2admin/index.js.REMOVED.git-id
+++ b/src/store/modules/d2admin/index.js.REMOVED.git-id
@@ -1 +1 @@
-fd12a77558dbfc4645076ab263171bba16fca77c
\ No newline at end of file
+b8a23a986004dadbc5824f16111da212f777bb27
\ No newline at end of file
From b1459f100d6f670fce6d8f594b0ccc1c4c68d0fc Mon Sep 17 00:00:00 2001
From: liyang <1711467488@qq.com>
Date: Wed, 8 Aug 2018 09:19:11 +0800
Subject: [PATCH 03/31] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=91=BD=E5=90=8D?=
=?UTF-8?q?=E7=A9=BA=E9=97=B4?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Former-commit-id: 63fcb6e8af280eb6aa1847600c096fb48cf53ea1 [formerly 63fcb6e8af280eb6aa1847600c096fb48cf53ea1 [formerly 63fcb6e8af280eb6aa1847600c096fb48cf53ea1 [formerly 63fcb6e8af280eb6aa1847600c096fb48cf53ea1 [formerly 632d40c9d0643c6a24abfb7b58b999d829d4f4e5 [formerly 57132b61c7b2f326d08dbe138fda1fac4cb83c62]]]]]
Former-commit-id: c0cb71135408e03add94e219759ae37cfb75f31b
Former-commit-id: 7f8209eae78f59e644c204712c31dff787899384
Former-commit-id: b08fbd31671e552da8012eb3ee901edf4f89c0e9 [formerly bb7abe3cc56f2f376a59413c370032d896b50c38]
Former-commit-id: 0872ac8e17b45829eee426dc5f80f25e37c85ea3
Former-commit-id: 373b0874ce730b26f256600de55a39b2e40d5f9f
Former-commit-id: 472309b468a04d5e57a1a917a6472061668cc7f0
Former-commit-id: 88ad7d087a7382d66523f481b7e1476c21f2830d
Former-commit-id: 6557698b7db15cc1b62cf9c3976521de6cc194cd
---
src/components/d2-error-log-list/index.vue | 6 +--
.../components/header-error-log/index.vue | 28 ++++++------
.../components/header-fullscreen/index.vue | 12 ++---
.../components/d2-theme-list/index.vue | 14 +++---
.../components/header-user/index.vue | 12 ++---
.../components/menu-header/index.vue | 6 +--
.../components/menu-side/index.vue | 8 ++--
.../header-aside/components/tabs/index.vue | 30 ++++++-------
src/layout/header-aside/layout.vue | 32 +++++++-------
src/libs/util.js | 4 +-
src/main.js | 12 ++---
src/pages/demo/playground/db/public/index.vue | 16 +++----
src/pages/demo/playground/db/user/index.vue | 16 +++----
.../playground/store/fullscreen/index.vue | 14 +++---
.../demo/playground/store/gray/index.vue | 22 +++++-----
.../demo/playground/store/menu/index.vue | 30 ++++++-------
src/pages/demo/playground/store/sys/index.vue | 44 +++++++++----------
.../demo/playground/store/theme/index.vue | 14 +++---
src/pages/demo/playground/store/ua/index.vue | 6 +--
src/pages/login/page.vue | 6 +--
src/plugin/error/index.js | 2 +-
src/plugin/log/index.js | 2 +-
src/router/index.js | 2 +-
.../modules/d2admin/index.js.REMOVED.git-id | 2 +-
24 files changed, 170 insertions(+), 170 deletions(-)
diff --git a/src/components/d2-error-log-list/index.vue b/src/components/d2-error-log-list/index.vue
index 34a93065..666fac97 100644
--- a/src/components/d2-error-log-list/index.vue
+++ b/src/components/d2-error-log-list/index.vue
@@ -136,9 +136,9 @@ export default {
ExpandItem
},
computed: {
- ...mapState({
- log: state => state.d2admin.log
- }),
+ ...mapState('d2admin', [
+ 'log'
+ ]),
logReverse () {
// 直接 reverse 的话有点问题
const res = []
diff --git a/src/layout/header-aside/components/header-error-log/index.vue b/src/layout/header-aside/components/header-error-log/index.vue
index d95c6e1e..b031d8c5 100644
--- a/src/layout/header-aside/components/header-error-log/index.vue
+++ b/src/layout/header-aside/components/header-error-log/index.vue
@@ -9,12 +9,12 @@
type="text"
@click="handleClick">
+ :value="logErrorLength"
+ :is-dot="logErrorLength === 0">
0
- ? ` | 包含 ${this.d2adminLogErrorLength} 个异常`
+ : `${this.logLength} 条日志${this.logErrorLength > 0
+ ? ` | 包含 ${this.logErrorLength} 个异常`
: ''}`
}
},
methods: {
- ...mapMutations([
- 'd2adminLogClean'
+ ...mapMutations('d2admin', [
+ 'logClean'
]),
handleClick () {
- if (this.d2adminLogLength > 0) {
+ if (this.logLength > 0) {
this.dialogVisible = true
}
},
handleLogClean () {
this.dialogVisible = false
- this.d2adminLogClean()
+ this.logClean()
}
}
}
diff --git a/src/layout/header-aside/components/header-fullscreen/index.vue b/src/layout/header-aside/components/header-fullscreen/index.vue
index 68f801be..8e6ed7ea 100644
--- a/src/layout/header-aside/components/header-fullscreen/index.vue
+++ b/src/layout/header-aside/components/header-fullscreen/index.vue
@@ -3,7 +3,7 @@
effect="dark"
:content="isFullScreen ? '退出全屏' : '全屏'"
placement="bottom">
-
+
@@ -14,13 +14,13 @@
import { mapState, mapMutations } from 'vuex'
export default {
computed: {
- ...mapState({
- isFullScreen: state => state.d2admin.isFullScreen
- })
+ ...mapState('d2admin', [
+ 'isFullScreen'
+ ])
},
methods: {
- ...mapMutations([
- 'd2adminFullScreenToggle'
+ ...mapMutations('d2admin', [
+ 'fullScreenToggle'
])
}
}
diff --git a/src/layout/header-aside/components/header-theme/components/d2-theme-list/index.vue b/src/layout/header-aside/components/header-theme/components/d2-theme-list/index.vue
index 9038b29b..8b81cc76 100644
--- a/src/layout/header-aside/components/header-theme/components/d2-theme-list/index.vue
+++ b/src/layout/header-aside/components/header-theme/components/d2-theme-list/index.vue
@@ -30,17 +30,17 @@ export default {
}
},
computed: {
- ...mapState({
- themeList: state => state.d2admin.themeList,
- themeActiveName: state => state.d2admin.themeActiveName
- })
+ ...mapState('d2admin', [
+ 'themeList',
+ 'themeActiveName'
+ ])
},
methods: {
- ...mapMutations([
- 'd2adminThemeSet'
+ ...mapMutations('d2admin', [
+ 'themeSet'
]),
handleSelectTheme (name) {
- this.d2adminThemeSet(name)
+ this.themeSet(name)
}
}
}
diff --git a/src/layout/header-aside/components/header-user/index.vue b/src/layout/header-aside/components/header-user/index.vue
index 7ed24019..3cc270b0 100644
--- a/src/layout/header-aside/components/header-user/index.vue
+++ b/src/layout/header-aside/components/header-user/index.vue
@@ -14,19 +14,19 @@
import { mapState, mapActions } from 'vuex'
export default {
computed: {
- ...mapState({
- userInfo: state => state.d2admin.userInfo
- })
+ ...mapState('d2admin', [
+ 'userInfo'
+ ])
},
methods: {
- ...mapActions([
- 'd2adminLogout'
+ ...mapActions('d2admin', [
+ 'logout'
]),
/**
* @description 登出
*/
logOff () {
- this.d2adminLogout({
+ this.logout({
vm: this,
confirm: true
})
diff --git a/src/layout/header-aside/components/menu-header/index.vue b/src/layout/header-aside/components/menu-header/index.vue
index a52d4e5d..0d634f27 100644
--- a/src/layout/header-aside/components/menu-header/index.vue
+++ b/src/layout/header-aside/components/menu-header/index.vue
@@ -22,9 +22,9 @@ export default {
'd2-layout-header-aside-menu-sub': d2LayoutMainMenuSub
},
computed: {
- ...mapState({
- menuHeader: state => state.d2admin.menuHeader
- })
+ ...mapState('d2admin', [
+ 'menuHeader'
+ ])
}
}
diff --git a/src/layout/header-aside/components/menu-side/index.vue b/src/layout/header-aside/components/menu-side/index.vue
index e387b810..cae75156 100644
--- a/src/layout/header-aside/components/menu-side/index.vue
+++ b/src/layout/header-aside/components/menu-side/index.vue
@@ -41,10 +41,10 @@ export default {
}
},
computed: {
- ...mapState({
- menuAside: state => state.d2admin.menuAside,
- isMenuAsideCollapse: state => state.d2admin.isMenuAsideCollapse
- })
+ ...mapState('d2admin', [
+ 'menuAside',
+ 'isMenuAsideCollapse'
+ ])
},
watch: {
// 折叠和展开菜单的时候销毁 better scroll
diff --git a/src/layout/header-aside/components/tabs/index.vue b/src/layout/header-aside/components/tabs/index.vue
index 9111f38b..36b8753e 100644
--- a/src/layout/header-aside/components/tabs/index.vue
+++ b/src/layout/header-aside/components/tabs/index.vue
@@ -82,17 +82,17 @@ export default {
}
},
computed: {
- ...mapState({
- pageOpenedList: state => state.d2admin.pageOpenedList,
- pageCurrent: state => state.d2admin.pageCurrent
- })
+ ...mapState('d2admin', [
+ 'pageOpenedList',
+ 'pageCurrent'
+ ])
},
methods: {
- ...mapMutations([
- 'd2adminTagCloseLeft',
- 'd2adminTagCloseRight',
- 'd2adminTagCloseOther',
- 'd2adminTagCloseAll'
+ ...mapMutations('d2admin', [
+ 'tagCloseLeft',
+ 'tagCloseRight',
+ 'tagCloseOther',
+ 'tagCloseAll'
]),
/**
* @description 右键菜单功能点击
@@ -136,16 +136,16 @@ export default {
}
switch (command) {
case 'left':
- this.d2adminTagCloseLeft(params)
+ this.tagCloseLeft(params)
break
case 'right':
- this.d2adminTagCloseRight(params)
+ this.tagCloseRight(params)
break
case 'other':
- this.d2adminTagCloseOther(params)
+ this.tagCloseOther(params)
break
case 'all':
- this.d2adminTagCloseAll(this)
+ this.tagCloseAll(this)
break
default:
this.$message.error('无效的操作')
@@ -156,7 +156,7 @@ export default {
* @description 接收点击关闭控制上按钮的事件
*/
handleControlBtnClick () {
- this.d2adminTagCloseAll(this)
+ this.tagCloseAll(this)
},
/**
* @description 接收点击 tab 标签的事件
@@ -174,7 +174,7 @@ export default {
*/
handleTabsEdit (tagName, action) {
if (action === 'remove') {
- this.$store.commit('d2adminTagClose', {
+ this.$store.commit('d2admin/tagClose', {
tagName,
vm: this
})
diff --git a/src/layout/header-aside/layout.vue b/src/layout/header-aside/layout.vue
index 9f672db9..bf8f0985 100644
--- a/src/layout/header-aside/layout.vue
+++ b/src/layout/header-aside/layout.vue
@@ -10,8 +10,8 @@