路由跳转
import router from "@/router"; router.push({ path: "/iframe", query: { url: frameurl.value } });
获取参数
import router from "@/router"; import { useRoute } from "vue-router"; const route = useRoute(); const frameurl = <string>route.query.url; // 返回 const navigateBack = () => { router.go(-2); };
标签:传参,const,useRoute,vue3,import,router,路由 From: https://www.cnblogs.com/jqynr/p/17434586.html