我是Vue.js的初学者,使用@vue/cli
4.5.11创建了一个Vue项目。
import { createApp } from 'vue';
import VueRouter from 'vue-router';
import App from './App.vue';
import TeamsList from './components/teams/TeamsList.vue'
import UsersList from './components/users/UsersList.vue'
const router = new VueRouter({
mode: 'history',
routes: [
{ path:'/teams',component:TeamsList},
{ path:'/users',component:UsersList}
]
});
const app = createApp(App);
app.use(router);
app.mount('#app');
但是我的应用程序不能导航到相应的路由,而且对于每个路由都会附加“/#”。