跳轉頁面 -- withRouter

建立頁面和修改頁面爲同一個js, 方法不一樣,修改成put方法, 建立爲post方法, 可是當建立成功時, 頁面能夠跳轉成功, 但當修改時沒法跳轉, url爲同一個url 爲甚???react 使用 withRouter web withRouter組件 默認狀況下必須通過路由匹配渲染的組件才存在this.props,才擁有路由參數,執行this.props.history.push(’/deta
相關文章
相關標籤/搜索