feat: 添加 vite-plugin-vue-layouts 插件并更新 vite 版本至 6.0.5
This commit is contained in:
14
src/plugins/_.ts
Normal file
14
src/plugins/_.ts
Normal file
@ -0,0 +1,14 @@
|
||||
import { createHead } from '@unhead/vue';
|
||||
|
||||
export function install({ app }: { app: import('vue').App<Element> }) {
|
||||
app.use(createHead());
|
||||
app.config.errorHandler = (error, instance, info) => {
|
||||
console.error('Global error:', error);
|
||||
console.error('Component:', instance);
|
||||
console.error('Error Info:', info);
|
||||
// 这里你可以:
|
||||
// 1. 发送错误到日志服务
|
||||
// 2. 显示全局错误提示
|
||||
// 3. 进行错误分析和处理
|
||||
};
|
||||
}
|
Reference in New Issue
Block a user