LK.WXAD.Web/Skin/plugins/colorpicker/bootstrap-colorpicker.js
(开头部分) 33KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
/*!
* Bootstrap Colorpicker
* http://mjolnic.github.io/bootstrap-colorpicker/
*
* Originally written by (c) 2012 Stefan Petre
* Licensed under the Apache License v2.0
* http://www.apache.org/licenses/LICENSE-2.0.txt
*
* @todo Update DOCS
*/
(function(factory) {
"use strict";
if (typeof exports === 'object') {
module.exports = factory(window.jQuery);
} else if (typeof define === 'function' && define.amd) {
define(['jquery'], factory);
} else if (window.jQuery && !window.jQuery.fn.colorpicker) {
factory(window.jQuery);
}
}
(function($) {
'use strict';
// Color object
var Color = function(val, customColors) {
this.value = {
h: 0,
s: 0,
b: 0,
a: 1
};
this.origFormat = null; // original string format
if (customColors) {
$.extend(this.colors, customColors);
}
if (val) {
if (val.toLowerCase !== undefined) {
// cast to string
val = val + '';
this.setColor(val);
} else if (val.h !== undefined) {
this.value = val;
}
}
};
Color.prototype = {
constructor: Color,
// 140 predefined colors from the HTML Colors spec
colors: {
"aliceblue": "#f0f8ff",
"antiquewhite": "#faebd7",
"aqua": "#00ffff",
"aquamarine": "#7fffd4",
"azure": "#f0ffff",
"beige": "#f5f5dc",
"bisque": "#ffe4c4",
"black": "#000000",
"blanchedalmond": "#ffebcd",
后面还有 1019 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明
AI 解读 AI
登录后可用,每次 10 积分,解读结果公开显示在下面。
还没有人解读过这个文件。
