hookehuyr

fix 处理iframe引用关闭可能会出现关闭弹框问题

......@@ -1063,12 +1063,12 @@ export default {
document.title = '可视化流程设计器'
localStorage.setItem('showConfirmation', '1'); // 打开刷新提示框
// 监听 beforeunload 事件
window.addEventListener('beforeunload', function (event) {
if (localStorage.getItem('showConfirmation') === '1') {
// 取消事件的默认行为(弹出确认对话框)
event.preventDefault();
}
});
// window.addEventListener('beforeunload', function (event) {
// if (localStorage.getItem('showConfirmation') === '1') {
// // 取消事件的默认行为(弹出确认对话框)
// event.preventDefault();
// }
// });
// 监听 unload 事件
window.addEventListener('unload', function () {
// 设置标志位为 false,避免在刷新页面时再次显示提示框
......