由于剛學(xué)習(xí)vue,很多地方在官網(wǎng)上面看的不是很明白現(xiàn)有這樣一個需求:當(dāng)點(diǎn)擊button時,跳轉(zhuǎn)到另一個頁面,另一個頁面內(nèi)容為上個頁面的數(shù)據(jù)詳細(xì)信息
當(dāng)前頁面已經(jīng)獲取到數(shù)據(jù),想把數(shù)據(jù)傳到另一個頁面
請問如何通過路由跳轉(zhuǎn)的方式來進(jìn)行頁面之間的相互傳值
planDetail(personid, plan, relation, productProperty) {
let param = {
personId: personid,
productCode: plan
};
console.log("入?yún)?quot;, param); this.$http.postBody("/1/111", param, result => {
console.log(result); this.productDetail = result.body.rows; if (relation == "1") { this.detailTitle =
productProperty == "1" ? "都市客從" : "方法 " + "吃的是草";
} else { this.detailTitle =
productProperty == "1" ? "的是" : "的的" + "的方式vs";
} this.familyShow = true; this.$router.push({name: 'employeeplan', query:param})
});
vue 頁面相互傳值
揚(yáng)帆大魚
2018-09-02 13:05:25