vue-router url变了但是页面没有刷新

使用路由跳转时,页面url有变化,但是页面没有跳转

img


img

路由代码:

      {
        name: "MyResource",
        path: "/resource",
        component:null,
        meta: {
          title: "数据中心",
        },
        children:[
          {
            name: "resourceList",
            path: "list",
            component: () => import("@/pages/data-center/mine/resourceList"),
            meta: {
              title: "我的资源",
            },
            children: [
              // 添加资源,已被整合到此路由下
              {
                name: "AddResource",
                path: "add",
                component: () => import("@/pages/data-center/mine/addResource"),
                meta: {
                  title: "添加资源",
                },
              },
            ]
          },
      }

页面跳转写法:


```javascript
this.$router.push("/resource/list/add")

点击跳转按钮,没有跳转到添加资源页面,但是url已经改变了。请问是什么原因导致的呢,改怎么解决啊?

改用hash路由模式,别用history模式

参考 https://blog.csdn.net/Huanghuali_/article/details/122524719

有app.js的截图吗