src/mvc/admin/Bootstrap.Admin/wwwroot/js/analyse.js
(开头部分) 7KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
(function ($) {
// sparkline component
'use strict';
var lgbSparkline = function (element, options) {
this.$element = $(element);
this.options = $.extend({}, lgbSparkline.DEFAULTS, options);
this.init();
};
lgbSparkline.VERSION = '1.0';
lgbSparkline.Author = 'argo@163.com';
lgbSparkline.DataKey = "lgb.sparkline";
lgbSparkline.Template = '<span class="d-inline-block tooltipped tooltipped-s" aria-label="Past year of activity">';
lgbSparkline.Template += '<svg width="155" height="30">';
lgbSparkline.Template += ' <defs>';
lgbSparkline.Template += ' <linearGradient id="{0}" x1="0" x2="0" y1="1" y2="0">';
lgbSparkline.Template += ' <stop offset="10%" stop-color="#c6e48b"></stop>';
lgbSparkline.Template += ' <stop offset="33%" stop-color="#7bc96f"></stop>';
lgbSparkline.Template += ' <stop offset="66%" stop-color="#239a3b"></stop>';
lgbSparkline.Template += ' <stop offset="90%" stop-color="#196127"></stop>';
lgbSparkline.Template += ' </linearGradient>';
lgbSparkline.Template += ' <mask id="{1}" x="0" y="0" width="155" height="28">';
lgbSparkline.Template += ' <polyline transform="translate(0, 28) scale(1,-1)" points="" fill="transparent" stroke="#8cc665" stroke-width="2">';
lgbSparkline.Template += ' </polyline>';
lgbSparkline.Template += ' </mask>';
lgbSparkline.Template += ' </defs>';
lgbSparkline.Template += ' <g transform="translate(0, 2.0)">';
lgbSparkline.Template += ' <rect x="0" y="-2" width="155" height="30" style="stroke: none; fill: url(#{0}); mask: url(#{1})"></rect>';
lgbSparkline.Template += ' </g>';
lgbSparkline.Template += '</svg>';
lgbSparkline.Template += '</span>';
lgbSparkline.AllowMethods = /val/;
function Plugin(option) {
var params = $.makeArray(arguments).slice(1);
return this.each(function () {
var $this = $(this);
var data = $this.data(lgbSparkline.DataKey);
var options = typeof option === 'object' && option;
if (!data) $this.data(lgbSparkline.DataKey, data = new lgbSparkline(this, options));
if (!lgbSparkline.AllowMethods.test(option)) return;
if (typeof option === 'string') {
data[option].apply(data, params);
}
});
}
$.fn.lgbSparkline = Plugin;
$.fn.lgbSparkline.Constructor = lgbSparkline;
var _proto = lgbSparkline.prototype;
_proto.init = function () {
var getUID = function (prefix) {
if (!prefix) prefix = 'lgb';
do prefix += ~~(Math.random() * 1000000);
while (document.getElementById(prefix));
return prefix;
后面还有 159 行代码,解锁后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明
AI 解读
登录后可用,每次 10 积分,解读结果公开显示在下面。
还没有人解读过这个文件。
