直接傳肯定是不行的
傳值
需要現將對象轉為JSON字符串 JSON.stringify(sendData)
然后再把字符串作為 URI 組件進行編碼 encodeURIComponent( JSON.stringify(sendData) )
然后正常傳值 this.$router.push(
"/blank?xxx=" + encodeURIComponent( JSON.stringify(sendData) )
)
接值
先函數對 URI 組件進行解碼 再轉為對象
JSON.parse(decodeURIComponent(this.$route.query.xxx))
這樣就完成了