* [bug#53275] adjust copy btn event for instance.

This commit is contained in:
caoyanyi
2024-07-30 11:09:48 +08:00
committed by 李阳
parent 920a22af16
commit 1f39b38bed
2 changed files with 8 additions and 15 deletions
+7 -15
View File
@@ -59,25 +59,17 @@ function refreshStatus()
});
}
$('.copy-btn').on('click', function()
window.copyText = function(dom)
{
var copyText = $(this).parent().find('input');
var copyText = $(dom).parent().find('input');
copyText.show();
copyText[0].select();
document.execCommand("Copy");
copyText.hide();
var that = this;
$(that).tooltip
({
trigger: 'click',
placement: 'bottom',
title: copied,
tipClass: 'success',
show:true
zui.Messager.show({
type: 'success',
content: copied,
time: 2000
});
setTimeout(function()
{
$(that).tooltip('hide');
}, 2000)
})
}
+1
View File
@@ -86,6 +86,7 @@ detailHeader(
div
(
setClass('flex flex-normal gap-x-5 justify-center'),
on::click('.copy-btn')->call('copyText', jsRaw('this')),
div
(
setClass('flex-none w-2/3'),