想在切換路由的時(shí)候把采集的數(shù)據(jù)發(fā)送出去,但是修改vuex的值的時(shí)候不生beforeRouteLeave: (to, from, next) => { try { console.log("即將離開舊路由:"+new Date().getTime()); this.$store.commit('GET_HTTPRESPONSETIME', new Date().getTime()); this.closPages(); } catch (error) { }finally{ next(); } 這樣寫有什么不對(duì)嗎?
添加回答
舉報(bào)
0/150
提交
取消