react離開頁面,自定義彈框攔截,路由攔截

前言: 項目有個需求是: 跳轉路由,在離開頁面前,需要彈框詢問用戶是否確定離開。 用 react-router 的 <Prompt> 組件是可以的, 但是,怎麼使用 antd 組件(或者說自定義組件)呢? 請看下面 先看的這個: https://stackoverflow.com/questions/32841757/detecting-user-leaving-page-with-react-r
相關文章
相關標籤/搜索