🐛 优化弹窗被拦截时的处理方式

- 弹窗被阻止时改为toast提示,避免当前页跳转

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2025-11-30 13:12:41 +08:00
parent 4fe59aa27c
commit 1581da1e3e

View File

@@ -2019,8 +2019,8 @@ handleDragLeave(e) {
if (!url) return;
const newWindow = window.open(url, '_blank', 'noopener');
if (!newWindow || newWindow.closed || typeof newWindow.closed === 'undefined') {
// 部分浏览器可能阻止弹窗,退回当前页跳转
window.location.href = url;
// 弹窗被拦截时提示用户手动打开,避免当前页跳转
this.showToast('info', '提示', '浏览器阻止了新标签页,请允许弹窗或手动打开链接');
}
},