Files
liangjian 836c61ac55 @@@@@@
2026-01-27 16:32:15 +08:00

34 lines
915 B
Vue

<template>
<div v-if="errorLogs.length > 0">
<el-badge type="danger" :value="errorLogs.length" @click="dialogVisible = true">
<vab-icon icon="bug-line" />
</el-badge>
<vab-dialog v-model="dialogVisible" append-to-body title="公寓项目异常捕获" width="60%">
<vab-error-log-content />
<template #footer>
<el-button @click="dialogVisible = false"> </el-button>
<el-button type="danger" @click="clearAll">暂不显示</el-button>
</template>
</vab-dialog>
</div>
</template>
<script setup>
import { useErrorLogStore } from '/@/store/modules/errorLog'
defineOptions({
name: 'VabErrorLog',
})
const errorLogStore = useErrorLogStore()
const { errorLogs } = storeToRefs(errorLogStore)
const { clearErrorLog } = errorLogStore
const dialogVisible = ref(false)
const clearAll = () => {
dialogVisible.value = false
clearErrorLog()
}
</script>