import { useRouter } from 'vue-router'
const router = useRouter()
router.push({
path: "/about",
query: {
name: "why",
age: 18
}
})
如何得到query呢 ?
模板中 :
<h2>About: {{ $route.query }}</h2>
标签:about,vue,const,编程,router,query,useRouter,路由
来源: https://www.cnblogs.com/qd-lbxx/p/16624522.html