Baidu for a long time, finally know
Want to drag, drag the default title is touched, it must have title, look at your title is not set, then set the move as inside following the same move
On these two points
layer official document: https://www.layui.com/doc/modules/layer.html#resize
//iframe窗
layer.open({
type : 2,
title : '微信维护记录',
closeBtn : 1, //不显示关闭按钮
shade : false,
moveOut: true,
// shadeClose: true,//点击阴影部分关闭弹窗
// maxmin: true,
area : '880px',
// offset: 'rb', //右下角弹出
// time: 2000, //2秒后自动关闭
move : '.layui-layer-title',
// offset : [ '', '' ],
offset : '1%',
resize:true,
anim : 2,
content : [ url, 'yes' ], //iframe的url,no代表不显示滚动条
success : function(layero, index) {
layer.iframeAuto(index);
},
end : function() { //此处用于演示
}
});
}