添加命名空间

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
This commit is contained in:
liyang
2018-08-08 09:19:11 +08:00
parent 129732558f
commit b1459f100d
24 changed files with 170 additions and 170 deletions

View File

@@ -9,12 +9,12 @@
type="text"
@click="handleClick">
<el-badge
v-if="d2adminLogLength > 0"
v-if="logLength > 0"
:max="99"
:value="d2adminLogErrorLength"
:is-dot="d2adminLogErrorLength === 0">
:value="logErrorLength"
:is-dot="logErrorLength === 0">
<d2-icon
:name="d2adminLogErrorLength === 0 ? 'dot-circle-o' : 'bug'"
:name="logErrorLength === 0 ? 'dot-circle-o' : 'bug'"
style="font-size: 20px"/>
</el-badge>
<d2-icon
@@ -49,30 +49,30 @@ export default {
}
},
computed: {
...mapGetters([
'd2adminLogLength',
'd2adminLogErrorLength'
...mapGetters('d2admin', [
'logLength',
'logErrorLength'
]),
tooltipContent () {
return this.d2adminLogLength === 0
return this.logLength === 0
? '没有日志或异常'
: `${this.d2adminLogLength} 条日志${this.d2adminLogErrorLength > 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()
}
}
}

View File

@@ -3,7 +3,7 @@
effect="dark"
:content="isFullScreen ? '退出全屏' : '全屏'"
placement="bottom">
<el-button class="d2-mr btn-text can-hover" type="text" @click="d2adminFullScreenToggle">
<el-button class="d2-mr btn-text can-hover" type="text" @click="fullScreenToggle">
<d2-icon v-if="isFullScreen" name="compress"/>
<d2-icon v-else name="arrows-alt" style="font-size: 16px"/>
</el-button>
@@ -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'
])
}
}

View File

@@ -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)
}
}
}

View File

@@ -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
})

View File

@@ -22,9 +22,9 @@ export default {
'd2-layout-header-aside-menu-sub': d2LayoutMainMenuSub
},
computed: {
...mapState({
menuHeader: state => state.d2admin.menuHeader
})
...mapState('d2admin', [
'menuHeader'
])
}
}
</script>

View File

@@ -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

View File

@@ -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
})

View File

@@ -10,8 +10,8 @@
<!-- 顶栏 -->
<div class="d2-theme-header" flex-box="0">
<div class="logo-group" :style="{width: isMenuAsideCollapse ? asideWidthCollapse : asideWidth}">
<img v-if="isMenuAsideCollapse" :src="`${$baseUrl}image/theme/${d2adminThemeActiveSetting.name}/logo/icon-only.png`">
<img v-else :src="`${$baseUrl}image/theme/${d2adminThemeActiveSetting.name}/logo/all.png`">
<img v-if="isMenuAsideCollapse" :src="`${$baseUrl}image/theme/${themeActiveSetting.name}/logo/icon-only.png`">
<img v-else :src="`${$baseUrl}image/theme/${themeActiveSetting.name}/logo/all.png`">
</div>
<div class="toggle-aside-btn" @click="handleToggleAside">
<d2-icon name="bars"/>
@@ -44,7 +44,7 @@
</div>
<div class="d2-theme-container-main-body" flex-box="1">
<transition name="fade-transverse">
<keep-alive :include="d2adminKeepAliveInclude">
<keep-alive :include="keepAliveInclude">
<router-view/>
</keep-alive>
</transition>
@@ -78,35 +78,35 @@ export default {
}
},
computed: {
...mapState({
isGrayMode: state => state.d2admin.isGrayMode,
pageOpenedList: state => state.d2admin.pageOpenedList,
isMenuAsideCollapse: state => state.d2admin.isMenuAsideCollapse
}),
...mapGetters([
'd2adminThemeActiveSetting',
'd2adminKeepAliveInclude'
...mapState('d2admin', [
'isGrayMode',
'pageOpenedList',
'isMenuAsideCollapse'
]),
...mapGetters('d2admin', [
'themeActiveSetting',
'keepAliveInclude'
]),
/**
* @description 最外层容器的背景图片样式
*/
styleLayoutMainGroup () {
return {
...this.d2adminThemeActiveSetting.backgroundImage ? {
backgroundImage: `url('${this.$baseUrl}${this.d2adminThemeActiveSetting.backgroundImage}')`
...this.themeActiveSetting.backgroundImage ? {
backgroundImage: `url('${this.$baseUrl}${this.themeActiveSetting.backgroundImage}')`
} : {}
}
}
},
methods: {
...mapMutations([
'd2adminMenuAsideCollapseToggle'
...mapMutations('d2admin', [
'menuAsideCollapseToggle'
]),
/**
* 接收点击切换侧边栏的按钮
*/
handleToggleAside () {
this.d2adminMenuAsideCollapseToggle()
this.menuAsideCollapseToggle()
}
}
}