獲取路由引數
import { useRouter } from 'vue-router';
const router = useRouter();
console.log(router.currentRoute.query);
設定路由引數
import { useRouter } from 'vue-router';
const router=useRouter();
router.push({
path:"/product-list",
query:{
categoryId:id
}
})