fixbug
This commit is contained in:
parent
a802fa14e3
commit
3c051cab17
|
|
@ -372,6 +372,18 @@ function fetchMail() {
|
||||||
});
|
});
|
||||||
}, 1000 * 60);
|
}, 1000 * 60);
|
||||||
|
|
||||||
|
$('#myModal').on('shown.bs.modal', function () {
|
||||||
|
let iframeHeight = $('#modalIframe').contents().find("html").height();
|
||||||
|
console.log("Iframe的实际高度是: " + iframeHeight + "px");
|
||||||
|
if (iframeHeight <= 600){
|
||||||
|
$('#modalIframe').css('height',600);
|
||||||
|
} else if (iframeHeight >= 800){
|
||||||
|
$('#modalIframe').css('height',800);
|
||||||
|
} else {
|
||||||
|
$('#modalIframe').css('height',iframeHeight);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
$(document).on('click', '.info-btn', function () {
|
$(document).on('click', '.info-btn', function () {
|
||||||
let key = $(this).data('key');
|
let key = $(this).data('key');
|
||||||
let apiUrl = '/mail/' + key;
|
let apiUrl = '/mail/' + key;
|
||||||
|
|
@ -395,13 +407,7 @@ function fetchMail() {
|
||||||
$('#exampleModalLabel').text(text);
|
$('#exampleModalLabel').text(text);
|
||||||
// 显示模态框
|
// 显示模态框
|
||||||
$('#myModal').modal('show');
|
$('#myModal').modal('show');
|
||||||
let iframeHeight = $('#modalIframe').contents().find("html").height();
|
|
||||||
console.log("Iframe的实际高度是: " + iframeHeight + "px");
|
|
||||||
if (iframeHeight >= 600){
|
|
||||||
$('#modalIframe').css('height',600);
|
|
||||||
} else {
|
|
||||||
$('#modalIframe').css('height',iframeHeight);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user