mirror of
https://github.com/imdap/ruoyi-plus-vben5.git
synced 2026-05-05 17:11:26 +08:00
fix: 解决window.xxx在路由报错情况下的undefined问题
This commit is contained in:
@@ -17,6 +17,7 @@ import { initComponentAdapter } from './adapter/component';
|
||||
import { initSetupVbenForm } from './adapter/form';
|
||||
import App from './app.vue';
|
||||
import { router } from './router';
|
||||
import { initPopupContext } from './utils/context';
|
||||
|
||||
async function bootstrap(namespace: string) {
|
||||
// 初始化组件适配器
|
||||
@@ -58,6 +59,9 @@ async function bootstrap(namespace: string) {
|
||||
const { initTippy } = await import('@vben/common-ui/es/tippy');
|
||||
initTippy(app);
|
||||
|
||||
// 初始化全局弹窗方法(静态API fallback, 防止路由守卫中访问undefined)
|
||||
initPopupContext();
|
||||
|
||||
// 配置路由及路由守卫
|
||||
app.use(router);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user