log
Former-commit-id: 067af1ad15588da779f6fdb52d8dd5e4d5337a83 [formerly 067af1ad15588da779f6fdb52d8dd5e4d5337a83 [formerly 067af1ad15588da779f6fdb52d8dd5e4d5337a83 [formerly 067af1ad15588da779f6fdb52d8dd5e4d5337a83 [formerly 26bff908e7e98cdecb3942975cb8dac912d22760 [formerly 5394d813fcdce16e699ff3d54fca956c87f1b56b]]]]] Former-commit-id: 4d70ea535fa6b135fd63ef83fc090e9a9d851e39 Former-commit-id: faec9e738fabb0225ec9ed61b86c30f269c02486 Former-commit-id: 9b54c495f13d810d67fa85e2129c05eec4a99324 [formerly 46471134b136a5df475c7787b5694052aca6b8ae] Former-commit-id: 0eb56ebbfa256ce1c2d3c1d99994ec7236c7ad5f Former-commit-id: 68c0847f64453808a6afc906ffc110654ccf84a4 Former-commit-id: 93c3b439339c575b5d7a085262817b295a852058 Former-commit-id: 32ccde3e80c1ec1a1dc8bc335082eb6ac80ea3e1 Former-commit-id: b8e2a549af61ff83b566fd961085ad7414d21b2d
This commit is contained in:
@@ -11,10 +11,10 @@
|
||||
<el-badge
|
||||
v-if="logLength > 0"
|
||||
:max="99"
|
||||
:value="logErrorLength"
|
||||
:is-dot="logErrorLength === 0">
|
||||
:value="logLengthError"
|
||||
:is-dot="logLengthError === 0">
|
||||
<d2-icon
|
||||
:name="logErrorLength === 0 ? 'dot-circle-o' : 'bug'"
|
||||
:name="logLengthError === 0 ? 'dot-circle-o' : 'bug'"
|
||||
style="font-size: 20px"/>
|
||||
</el-badge>
|
||||
<d2-icon
|
||||
@@ -49,21 +49,21 @@ export default {
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('d2admin', [
|
||||
'logLength',
|
||||
'logErrorLength'
|
||||
]),
|
||||
...mapGetters('d2admin', {
|
||||
logLength: 'log/length',
|
||||
logLengthError: 'log/lengthError'
|
||||
}),
|
||||
tooltipContent () {
|
||||
return this.logLength === 0
|
||||
? '没有日志或异常'
|
||||
: `${this.logLength} 条日志${this.logErrorLength > 0
|
||||
? ` | 包含 ${this.logErrorLength} 个异常`
|
||||
: `${this.logLength} 条日志${this.logLengthError > 0
|
||||
? ` | 包含 ${this.logLengthError} 个异常`
|
||||
: ''}`
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
...mapMutations('d2admin', [
|
||||
'logClean'
|
||||
...mapMutations('d2admin/log', [
|
||||
'clean'
|
||||
]),
|
||||
handleClick () {
|
||||
if (this.logLength > 0) {
|
||||
@@ -72,7 +72,7 @@ export default {
|
||||
},
|
||||
handleLogClean () {
|
||||
this.dialogVisible = false
|
||||
this.logClean()
|
||||
this.clean()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<el-dropdown class="d2-mr">
|
||||
<span class="btn-text">你好 {{userInfo.name}}</span>
|
||||
<span class="btn-text">你好 {{info.name}}</span>
|
||||
<el-dropdown-menu slot="dropdown">
|
||||
<el-dropdown-item @click.native="logOff">
|
||||
<d2-icon name="power-off" class="d2-mr-5"/>
|
||||
@@ -14,9 +14,9 @@
|
||||
import { mapState, mapActions } from 'vuex'
|
||||
export default {
|
||||
computed: {
|
||||
...mapState('d2admin', {
|
||||
userInfo: state => state.user.info
|
||||
})
|
||||
...mapState('d2admin/user', [
|
||||
'info'
|
||||
])
|
||||
},
|
||||
methods: {
|
||||
...mapActions('d2admin', [
|
||||
|
||||
@@ -85,11 +85,9 @@ export default {
|
||||
...mapState('d2admin/menu', [
|
||||
'asideCollapse'
|
||||
]),
|
||||
...mapGetters('d2admin', [
|
||||
'keepAliveInclude'
|
||||
]),
|
||||
...mapGetters('d2admin/theme', {
|
||||
themeActiveSetting: 'activeSetting'
|
||||
...mapGetters('d2admin', {
|
||||
keepAliveInclude: 'keepAliveInclude',
|
||||
themeActiveSetting: 'theme/activeSetting'
|
||||
}),
|
||||
/**
|
||||
* @description 最外层容器的背景图片样式
|
||||
|
||||
Reference in New Issue
Block a user