小编Die*_*ego的帖子

[Vue Router warn]:推送/替换状态类型错误错误:历史记录[(中间值)(中间值)(中间值)]不是函数

我正在尝试设置 vue 路由器(Vue 3 + Vue 路由器 4),但我不断收到以下错误:

[Vue Router warn]: Error with push/replace State TypeError: history[(intermediate value)(intermediate value)(intermediate value)] is not a function

[Vue Router warn]: Unexpected error when starting the router: TypeError: Cannot read properties of null (reading 'back')

Uncaught TypeError: Cannot read properties of null (reading 'back')
Run Code Online (Sandbox Code Playgroud)

这是我的 main.ts:

import { createApp } from "vue";
import App from "./App.vue";
import store, { storeKey } from "./store/index";

// styling
import "./scss/base.scss";
import router from "./router";

createApp(App).use(router).use(store, storeKey).mount("#app");
Run Code Online (Sandbox Code Playgroud)

这是我的 …

typescript vue.js vue-router

5
推荐指数
1
解决办法
1005
查看次数

标签 统计

typescript ×1

vue-router ×1

vue.js ×1