ABPCMS.Web/lib/sweetalert/lib/modules/utils.js
(开头部分) 1KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
'use strict';
Object.defineProperty(exports, '__esModule', {
value: true
});
/*
* Allow user to pass their own params
*/
var extend = function extend(a, b) {
for (var key in b) {
if (b.hasOwnProperty(key)) {
a[key] = b[key];
}
}
return a;
};
/*
* Convert HEX codes to RGB values (#000000 -> rgb(0,0,0))
*/
var hexToRgb = function hexToRgb(hex) {
var result = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(hex);
return result ? parseInt(result[1], 16) + ', ' + parseInt(result[2], 16) + ', ' + parseInt(result[3], 16) : null;
};
/*
* Check if the user is using Internet Explorer 8 (for fallbacks)
*/
var isIE8 = function isIE8() {
return window.attachEvent && !window.addEventListener;
};
/*
* IE compatible logging for developers
*/
var logStr = function logStr(string) {
if (window.console) {
// IE...
window.console.log('SweetAlert: ' + string);
}
};
/*
* Set hover, active and focus-states for buttons
* (source: http://www.sitepoint.com/javascript-generate-lighter-darker-color)
*/
var colorLuminance = function colorLuminance(hex, lum) {
// Validate hex string
hex = String(hex).replace(/[^0-9a-f]/gi, '');
if (hex.length < 6) {
hex = hex[0] + hex[0] + hex[1] + hex[1] + hex[2] + hex[2];
}
lum = lum || 0;
// Convert to decimal and change luminosity
var rgb = '#';
var c;
var i;
for (i = 0; i < 3; i++) {
后面还有 13 行代码,解锁后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明
AI 解读
登录后可用,每次 10 积分,解读结果公开显示在下面。
还没有人解读过这个文件。
