不多说。直接上代码
$.extend({
remind: function (options) {
var _msg = '<div style="width:100%;">';
if (options.icon != undefined) {
_msg += '<div class="messager-icon messager-' + options.icon + '"></div>';
}
if (options.msg != undefined) {
_msg += '<div style="word-break : break-all;">' + options.msg + '</div>';
}
_msg += '</div>';
options.msg = _msg;
$.messager.show(options);
}
})
调用如下:
$.remind({
title: "系统提示",
icon: "info",
msg: _options.Data,
width: 350,
heigth: 200,
style: {
top: document.body.scrollTop + document.documentElement.scrollTop,
}
})