🐛 修复分享链接打开方式
- 添加openShare方法替代直接调用window.open - 处理弹窗被浏览器阻止的情况,自动退回当前页跳转 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -2015,6 +2015,15 @@ handleDragLeave(e) {
|
||||
return d.toLocaleString();
|
||||
},
|
||||
|
||||
openShare(url) {
|
||||
if (!url) return;
|
||||
const newWindow = window.open(url, '_blank', 'noopener');
|
||||
if (!newWindow || newWindow.closed || typeof newWindow.closed === 'undefined') {
|
||||
// 部分浏览器可能阻止弹窗,退回当前页跳转
|
||||
window.location.href = url;
|
||||
}
|
||||
},
|
||||
|
||||
copyShareLink(url) {
|
||||
// 复制分享链接到剪贴板
|
||||
if (navigator.clipboard && navigator.clipboard.writeText) {
|
||||
|
||||
Reference in New Issue
Block a user