https://blog.csdn.net/zrcj0706/article/details/79664532 (React中如何實現(xiàn)系統(tǒng)內(nèi)外的跳轉(zhuǎn))
React 頁面跳轉(zhuǎn)+傳遞參數(shù)+取參數(shù)(簡單直接)
1傳參
//這里可以onClick铸史,實現(xiàn)點擊跳轉(zhuǎn)傳參
this.props.history.push("/my/index", {
dotData: record //需要傳遞的參數(shù)
});
2.取參,
/my/index頁面取參數(shù)
const messages = this.props.location.state.dotData
onClick={this.handle}
handle(){
const w=window.open('about:blank');
w.location.href='你的地址'
}
react點擊按鈕跳轉(zhuǎn)到一個新的窗口的功能實現(xiàn)