<script setup>vue3使用router和route
<script setup>// 跳路由import router from "@/router/index"// 获取路由参数import { useRoute } from 'vue-router'const route = useRoute()const routerpath = () => {router.push('/Find')console.log(route.qu
·
<script setup>
// 跳路由
import router from "@/router/index"
// 获取路由参数
import { useRoute } from 'vue-router'
const route = useRoute()
const routerpath = () => {
router.push('/Find')
console.log(route.query.id);
console.log(route.params.id);
}
更多推荐
已为社区贡献4条内容
所有评论(0)