删除旧的错误信息展示组件 为下一步准备用页面制作log显示做准备
Former-commit-id: 53f84c1b978bbe3f7c1a484f649ecb24904226c9 [formerly 53f84c1b978bbe3f7c1a484f649ecb24904226c9 [formerly 53f84c1b978bbe3f7c1a484f649ecb24904226c9 [formerly 53f84c1b978bbe3f7c1a484f649ecb24904226c9 [formerly d3727e3a924335c6f982b5b66085ffa0930b94f2 [formerly 19c41e84fdc55ab3f87ff45d67bd262eca2d213c]]]]] Former-commit-id: 630d89e2818f7ceb56f38a0f51fcd5ffab969dc4 Former-commit-id: 9fc7690b01b0fb1abc352c2a073f8bb69bd3fd62 Former-commit-id: ce67ae520552390aed3a2a7b8c3e4220fa24b338 [formerly 95724b4f1eb486dd79fda543a5bdfb9f5d38c361] Former-commit-id: b90a90dd985bda5959586c9f902b16754b3f21e0 Former-commit-id: 56d5ed57e2bcda3281c0850a5cbddd9f78a86011 Former-commit-id: b9cd9abc79b6177f9df7b06b1ded93a5d314d019 Former-commit-id: 6cf9a1a3c63ec56d5b3a91f74001c1af94bbb25f Former-commit-id: d563b29a0c397dce540c363cc5306c7daff904ad
This commit is contained in:
54
src/layout/header-aside/components/header-log/index.vue
Normal file
54
src/layout/header-aside/components/header-log/index.vue
Normal file
@@ -0,0 +1,54 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-tooltip
|
||||
effect="dark"
|
||||
:content="tooltipContent"
|
||||
placement="bottom">
|
||||
<el-button
|
||||
class="d2-ml-0 d2-mr btn-text can-hover"
|
||||
type="text"
|
||||
@click="handleClick">
|
||||
<el-badge
|
||||
v-if="logLength > 0"
|
||||
:max="99"
|
||||
:value="logLengthError"
|
||||
:is-dot="logLengthError === 0">
|
||||
<d2-icon
|
||||
:name="logLengthError === 0 ? 'dot-circle-o' : 'bug'"
|
||||
style="font-size: 20px"/>
|
||||
</el-badge>
|
||||
<d2-icon
|
||||
v-else
|
||||
name="dot-circle-o"
|
||||
style="font-size: 20px"/>
|
||||
</el-button>
|
||||
</el-tooltip>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapGetters, mapMutations } from 'vuex'
|
||||
export default {
|
||||
computed: {
|
||||
...mapGetters('d2admin', {
|
||||
logLength: 'log/length',
|
||||
logLengthError: 'log/lengthError'
|
||||
}),
|
||||
tooltipContent () {
|
||||
return this.logLength === 0
|
||||
? '没有日志或异常'
|
||||
: `${this.logLength} 条日志${this.logLengthError > 0
|
||||
? ` | 包含 ${this.logLengthError} 个异常`
|
||||
: ''}`
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
...mapMutations('d2admin/log', [
|
||||
'clean'
|
||||
]),
|
||||
handleClick () {
|
||||
//
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
Reference in New Issue
Block a user