ThinkChat2.0新版上线,更智能更精彩,支持会话、画图、阅读、搜索等,送10W Token,即刻开启你的AI之旅 广告
[TOC] > https://router.vuejs.org/zh/ ## 安装 1. 安装 `npm i vue-router -S` ## 示例 ### 监听页面中的路由变更 ``` const route=useRoute(); onMounted(async()=>{ await render() }) watch(route,async () => { await render() }); const render=async ()=>{ //判断当前模块 if (route.name!="chat"){ return } group_id.value = route.params['group_id'] as string; // code } ```