弹窗优化、支持大小设定

This commit is contained in:
Devil 2021-08-26 14:53:25 +08:00
parent 4f73b139fb
commit 624a9e5843
3 changed files with 36 additions and 5 deletions

View File

@ -165,6 +165,12 @@ form.am-form .am-form-group-refreshing, .plug-file-upload-view { border-bottom:
.am-modal-dialog .am-modal-bd span { .am-modal-dialog .am-modal-bd span {
vertical-align: middle; vertical-align: middle;
} }
@media only screen and (min-width:1200px) {
.popup-full-max {
max-width: 1200px;
left: calc(50% - 600px);
}
}
/** /**
* iframe * iframe

View File

@ -1019,14 +1019,37 @@ function CheckVideo()
* @param {[string]} url [加载url] * @param {[string]} url [加载url]
* @param {[string]} title [标题] * @param {[string]} title [标题]
* @param {[string]} class_tag [指定class] * @param {[string]} class_tag [指定class]
* @param {[int]} full [是否满屏0, 1]
* @param {[int]} full_max [满屏最大限制max-width:1200px0, 1]
*/ */
function ModalLoad(url, title, class_tag) function ModalLoad(url, title, class_tag, full, full_max)
{ {
class_tag = class_tag || ''; // class 定义
var ent = 'popup-iframe';
// 自定义 class
if((class_tag || null) != null)
{
ent += ' '+class_tag;
}
// 是否满屏
if((full || 0) == 1)
{
ent += ' popup-full';
}
// 满屏最大限制
if((full_max || 0) == 1)
{
ent += ' popup-full-max';
}
// 调用弹窗组件
AMUI.dialog.popup({ AMUI.dialog.popup({
title: title || '', title: title || '',
content: '<iframe src="'+url+'" width="100%" height="100%"></iframe>', content: '<iframe src="'+url+'" width="100%" height="100%"></iframe>',
class: ' popup-iframe '+class_tag class: ent
}); });
} }
@ -2904,9 +2927,11 @@ $(function()
// 基础参数 // 基础参数
var title = $(this).data('title') || ''; var title = $(this).data('title') || '';
var class_tag = $(this).data('class') || ''; var class_tag = $(this).data('class') || '';
var full = parseInt($(this).data('full')) || 0;
var full_max = parseInt($(this).data('full-max')) || 0;
// 调用弹窗方法 // 调用弹窗方法
ModalLoad(url, title, class_tag); ModalLoad(url, title, class_tag, full, full_max);
}); });
// 地图弹窗 // 地图弹窗

View File

@ -122,7 +122,7 @@ ul.progress li.current .title {
box-shadow: none; box-shadow: none;
} }
.order-base .am-panel-bd, .order-base .base-right { .order-base .am-panel-bd, .order-base .base-right {
padding: 5px 10px; padding: 10px;
} }
.order-base, .order-base .status { .order-base, .order-base .status {
overflow: hidden; overflow: hidden;