Update: (步骤备份)更新 Pear Admin 框架版本与 Pear Admin Layui 一致,尝试重写页面

This commit is contained in:
wojiaoyishang
2025-01-19 20:03:18 +08:00
parent 43370ad078
commit d4a1b0ec57
63 changed files with 105722 additions and 2633 deletions
@@ -0,0 +1,37 @@
layui.define(['jquery', 'element'], function(exports) {
"use strict";
var MOD_NAME = 'count',
$ = layui.jquery,
element = layui.element;
var count = new function() {
this.up = function(targetEle, options) {
options = options || {};
var $this = document.getElementById(targetEle),
time = options.time,
finalNum = options.num,
regulator = options.regulator,
step = finalNum / (time / regulator),
count = 0.00,
initial = 0;
var timer = setInterval(function() {
count = count + step;
if (count >= finalNum) {
clearInterval(timer);
count = finalNum;
}
var t = count.toFixed(options.bit?options.bit:0);;
if (t == initial) return;
initial = t;
$this.innerHTML = initial;
}, 30);
}
}
exports(MOD_NAME, count);
});