顶栏菜单上日志按钮优化

Former-commit-id: 05466c2afd7cbdf8c90536a589d9da481d04084c [formerly 05466c2afd7cbdf8c90536a589d9da481d04084c [formerly 05466c2afd7cbdf8c90536a589d9da481d04084c [formerly 05466c2afd7cbdf8c90536a589d9da481d04084c [formerly b5eeb276a6288b0a4823459abd31d861e1f2fdfc [formerly 0127cb9480a76f66905cc9f2b17577985c2515c5]]]]]
Former-commit-id: 7ee5d762dad20128318a03854d30f2300a04c596
Former-commit-id: 07f32627ad9c5e4aafd204329284cfba25c3c3c1
Former-commit-id: a5ba8716f43554ceabf1be3e6d0bdffcc27623ed [formerly 0e5b1c3685d92cdf1f56048e4e4463e253677530]
Former-commit-id: 47b8417048b992b065c7bf2b411e0f8a88953158
Former-commit-id: a450a7cbd2f5c979e827c1cfdd741cea6a9f4146
Former-commit-id: df6023b040f9310fa76996ee2f787fd70706f26e
Former-commit-id: b1d4622a7601ea3cb2eae8ac58b61473366c8958
Former-commit-id: c3d6396c4e33b85a29b1583c06377cd5893adb23
This commit is contained in:
liyang
2018-08-02 20:16:41 +08:00
parent a20f12629a
commit 374247203c
2 changed files with 23 additions and 3 deletions

View File

@@ -1,8 +1,14 @@
<template>
<div>
<el-tooltip effect="dark" content="异常" placement="bottom">
<el-tooltip effect="dark" :content="tooltipContent" placement="bottom">
<el-button class="d2-ml-0 d2-mr btn-text can-hover" type="text" @click="dialogVisible = true">
<d2-icon name="bug" style="font-size: 20px"/>
<el-badge
v-if="d2adminLogLength > 0"
:value="d2adminLogErrorLength"
:is-dot="d2adminLogErrorLength === 0">
<d2-icon name="bug" style="font-size: 20px"/>
</el-badge>
<d2-icon v-else name="bug" style="font-size: 20px"/>
</el-button>
</el-tooltip>
<el-dialog
@@ -16,11 +22,25 @@
</template>
<script>
import { mapGetters } from 'vuex'
export default {
data () {
return {
dialogVisible: false
}
},
computed: {
...mapGetters([
'd2adminLogLength',
'd2adminLogErrorLength'
]),
tooltipContent () {
return this.d2adminLogLength === 0 ?
'没有日志或异常' :
`${this.d2adminLogLength} 条日志${this.d2adminLogErrorLength > 0 ?
` | 包含 ${this.d2adminLogErrorLength} 个异常` :
''}`
}
}
}
</script>

View File

@@ -1 +1 @@
d581b883c6d0533c0ae662760c8c665af3a5eec7
2bac47df865ef744c88006edd9f1302cf50ac230