wheel ui

初始化 vue-router

新建 history 对象

新建 router 对象

app.use(router)

1
2
3
4
5
6
7
8
9
const history = createWebHashHistory();
const router = createRouter({
history: history,
routes: [{ path: "/", component: HelloWorld }],
});

const app = createApp(App);
app.use(router);
app.mount("#app");