<script src="https://unpkg.com/vue-router/dist/vue-router.js"></script>
```Vue.use(VueRouter);
const router=new VueRouter({
})
new Vue({
router,
```this.$router.push({
path: 'http://localhost:8080/',
query: {
tit: this.username,
price: this.phone,
sid: this.date,
}
我的项目是html的,但是里面引入vue组件,想进行带参跳转页面,但是跳转时路径是拼接在当前路径后面,相当于又拼接了一段路径。怎么解决,这个只是html引入vuejs
参考GPT和自己的思路:
如果想设置路由根目录,可以在VueRouter的实例中通过"base"属性来设置。例如,如果要将路由根目录设置为"http://localhost:8080/%22%EF%BC%8C%E5%8F%AF%E4%BB%A5%E5%9C%A8VueRouter%E7%9A%84%E5%AE%9E%E4%BE%8B%E4%B8%AD%E6%B7%BB%E5%8A%A0%E4%BB%A5%E4%B8%8B%E4%BB%A3%E7%A0%81%EF%BC%9A
```
const router = new VueRouter({
base: 'http://localhost:8080/'
})
``