vue.js - 当我调用 this.$router.push() 时浏览器挂起
问题描述
我正在使用 Nuxt.js,我有一个触发 this.$router.push({ name: 'profile-info' }) 的按钮
// 路由器.js
...
export const routerOptions = {
mode: 'history',
base: decodeURI('/'),
linkActiveClass: 'nuxt-link-active',
linkExactActiveClass: 'nuxt-link-exact-active',
scrollBehavior,
routes: [{
path: "/profile",
component: _21560a2a,
name: "profile",
children: [{
path: "info",
component: _7cf67dd8,
name: "profile-info"
}]
}, {
path: "/",
component: _4ca319da,
name: "index"
}],
fallback: false
}
...
所以当我触发 this.$router.push 时,浏览器只是挂起,我必须强行关闭浏览器,因为我无法关闭选项卡。
在chrome dev工具中,在network选项卡中,页面的js文件只是pending然后超时
解决方案
推荐阅读
- sql - ORA-00904: "DEPT_ID": 无效标识符
- swift - 正则表达式仅在字符串具有前缀时才执行某些操作
- r - R 函数用于从前几行中识别唯一行,而不是完全在数据框中
- django - Django-cors-headers 不适用于 Expo-web
- flutter - 在特定日期时间在后台运行 Flutter 代码
- django - Django没有将静态文件加载到资产文件中
- java - 打破多态性?
- python - 比较两个numpy数组后如何使用颜色图绘制散点数据点?
- spring - 从nestjs发送文件
- javascript - 启动 Shift + 旋转,将对象旋转 15° 步长(FabricJS)