优化排行榜组件并添加全局错误处理
This commit is contained in:
@ -79,7 +79,7 @@
|
||||
<div class="text-[15px] color-[#999]">{{ dayjs(item.createTime).format('MM-DD') }}</div>
|
||||
</div>
|
||||
<!-- 暂无数据 -->
|
||||
<el-empty v-if="!newDrawList.length" description="暂无数据"></el-empty>
|
||||
<el-empty v-if="!newDrawList?.length" description="暂无数据"></el-empty>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
11
plugins/error-handler.ts
Normal file
11
plugins/error-handler.ts
Normal file
@ -0,0 +1,11 @@
|
||||
export default defineNuxtPlugin((nuxtApp) => {
|
||||
nuxtApp.vueApp.config.errorHandler = (error, instance, info) => {
|
||||
// 处理错误,例如发送报告到服务
|
||||
console.log(error)
|
||||
}
|
||||
|
||||
// 也可以这样做
|
||||
// nuxtApp.hook('vue:error', (error, instance, info) => {
|
||||
// // 处理错误,例如发送报告到服务
|
||||
// })
|
||||
})
|
||||
Reference in New Issue
Block a user