Vue3.0路由传参

 传参。直接push query 或者 param也行

const router = useRouter();

const handleEdit = (index, row) => {
          router.push({path:"/publishArticle",query: {id:row.articleId}});
          //  editVisible.value = true;
        };



接收参数

const router = useRouter();
    //编辑页参数回传
    const formEditParams = reactive(router.currentRoute.value.query);

你可能感兴趣的:(VUE,前端,elementui,vue.js,前端)