直接上代码: watch: { $route: { immediate: true, // 一旦监听到路由的变化立即执行handler(to, from) { console.log("监听路由:" + JSON.stringify(to.name)); } ...
確定! 回上一頁