附件图片单击后打开
This commit is contained in:
@@ -110,7 +110,7 @@ function onImageClick(e) {
|
||||
initPinchZoom(overlay.querySelector('img'));
|
||||
}
|
||||
|
||||
function onImgThumbDblClick(img) {
|
||||
function onImgThumbClick(img) {
|
||||
const overlay = document.createElement('div');
|
||||
overlay.className = 'fullscreen-overlay';
|
||||
overlay.innerHTML = '<img src="' + img.src + '" style="max-width:100%;max-height:100%;object-fit:contain;transition: transform 0.1s; transform-origin: 0 0;" alt="">';
|
||||
|
||||
@@ -93,7 +93,7 @@ function renderEditAttachments(attachments) {
|
||||
}
|
||||
container.innerHTML = attachments.map(function(a) {
|
||||
return '<div class="attach-thumb-wrap">' +
|
||||
'<img class="attach-thumb" src="' + a.file_path + '" ondblclick="onImgThumbDblClick(this)">' +
|
||||
'<img class="attach-thumb" src="' + a.file_path + '" onclick="onImgThumbClick(this)">' +
|
||||
'<button class="attach-del-btn" onclick="deleteAttachment(event, \'' + encodeURIComponent(a.file_path) + '\')">' +
|
||||
'<svg viewBox="0 0 24 24"><line x1="18" y1="6" x2="6" y2="18"></line><line x1="6" y1="6" x2="18" y2="18"></line></svg>' +
|
||||
'</button>' +
|
||||
|
||||
Reference in New Issue
Block a user