chore: initialize qiming workspace repository
This commit is contained in:
15
qiming-mobile/utils/console.uts
Normal file
15
qiming-mobile/utils/console.uts
Normal file
@@ -0,0 +1,15 @@
|
||||
let vConsole: any = null;
|
||||
|
||||
export function initConsole() {
|
||||
// #ifdef H5
|
||||
if (process.env.NODE_ENV !== "production") {
|
||||
// 使用动态导入以避免在正式打包时进行静态依赖扫描
|
||||
import("vconsole").then((module) => {
|
||||
const VConsole = module.default;
|
||||
vConsole = new VConsole();
|
||||
}).catch(err => {
|
||||
console.error('vConsole 加载失败', err);
|
||||
});
|
||||
}
|
||||
// #endif
|
||||
}
|
||||
Reference in New Issue
Block a user