"vue-router": "^4.1.2",跳转请问如何传参和接收参数
const createCommand = () => {
router.push({
path: "/AddCommand",
query: {
name: "John",
age: 30
},
state: {
isLogin: true
}
})
}
// AddCommand
import { useRouter } from "vue-router"
const router = useRouter()
console.log(router) // 这里没有参数