参考文档 ↗
设置一个回调函数,以便在窗口的 beforeunload 事件触发时执行。
beforeunload
useBeforeUnload(callback, options): void
无文档