vue3 setup中获取地址栏参数
1 import { useRoute } from "vue-router" 2 3 setup() { 4 const route = useRoute() 5 console.log(route.query, route.params, '====') // 地址兰参数 6 }
原创文章,转载请说明出处,谢谢合作
1 import { useRoute } from "vue-router" 2 3 setup() { 4 const route = useRoute() 5 console.log(route.query, route.params, '====') // 地址兰参数 6 }