feat(admin): 重复批量投递warning提供复制run_id按钮(复用copyToClipboard)
This commit is contained in:
@@ -718,6 +718,30 @@
|
||||
});
|
||||
})();
|
||||
|
||||
// 通用:复制任意文本(用于 flash 提示中的“复制run_id”等)
|
||||
(function(){
|
||||
var btns = document.querySelectorAll('[data-action="copy-text"][data-copy-text]');
|
||||
if(!btns || btns.length === 0){return;}
|
||||
|
||||
btns.forEach(function(btn){
|
||||
btn.addEventListener('click', function(){
|
||||
var text = btn.getAttribute('data-copy-text') || '';
|
||||
var label = btn.getAttribute('data-copy-label') || '文本';
|
||||
|
||||
copyToClipboard(text).then(function(){
|
||||
markCopied(btn, true);
|
||||
toastCopied(label, text);
|
||||
}).catch(function(){
|
||||
markCopied(btn, false);
|
||||
if (toastCopyFailed(label, '请手动复制:' + text)) {
|
||||
return;
|
||||
}
|
||||
try { window.alert('复制失败,请手动复制:' + text); } catch (e) {}
|
||||
});
|
||||
});
|
||||
});
|
||||
})();
|
||||
|
||||
// 续费缺订阅治理:订单详情页“绑定订阅ID”输入框,小交互增强:
|
||||
// - 输入后按 Enter 直接提交
|
||||
// - 自动聚焦,减少点击
|
||||
|
||||
Reference in New Issue
Block a user