* [bug#53275] adjust copy btn event for instance.
This commit is contained in:
@@ -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)
|
||||
})
|
||||
}
|
||||
|
||||
@@ -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'),
|
||||
|
||||
Reference in New Issue
Block a user