家谱现有接口调试50%
This commit is contained in:
@@ -0,0 +1,34 @@
|
||||
(function (root, factory) {
|
||||
// 消息工具同时支持浏览器页面和 Node 测试,避免页面脚本直接使用原生 alert。
|
||||
if (typeof module === 'object' && module.exports) {
|
||||
module.exports = factory(root);
|
||||
return;
|
||||
}
|
||||
|
||||
root.MessageUtil = factory(root);
|
||||
})(typeof globalThis !== 'undefined' ? globalThis : window, function (root) {
|
||||
'use strict';
|
||||
|
||||
var DEFAULT_OPTIONS = {
|
||||
skin: 'auth-layer-message',
|
||||
time: 2200
|
||||
};
|
||||
|
||||
function show(message, options) {
|
||||
var text = String(message || '');
|
||||
var settings = Object.assign({}, DEFAULT_OPTIONS, options || {});
|
||||
|
||||
if (root.layui && root.layui.layer && root.layui.layer.msg) {
|
||||
root.layui.layer.msg(text, settings);
|
||||
return;
|
||||
}
|
||||
|
||||
if (root.console && root.console.warn) {
|
||||
root.console.warn(text);
|
||||
}
|
||||
}
|
||||
|
||||
return {
|
||||
show: show
|
||||
};
|
||||
});
|
||||
Reference in New Issue
Block a user