今天在做項目的一個頁面路由時,傳參這里搞了一整天...... 明明記得this.$router.query(注意這里的query是從router-link中傳的)。死活拿不到值。郁悶了一整天,后來才發現 應該是 this.$route.query,route不是router。
返回上一頁 用的是this.$router.go(-1),而我錯誤的認為獲取參數也是this.$router中取。其實是從this.$route中取。console發現 this.$route和this.$router這兩個都存在