This commit is contained in:
xiaozhiyong
2023-02-24 17:12:47 +08:00
parent b66f88ac17
commit 51aa12621d
15 changed files with 848 additions and 107 deletions

View File

@@ -32,6 +32,7 @@ export function parseTime(time) {
return formatRes;
}
// 防抖
export function debounce(fn, delay) {
let timer = null;
return function () {
@@ -39,7 +40,6 @@ export function debounce(fn, delay) {
let _this = this;
let _arguments = arguments;
timer = setTimeout(function () {
// 在执行时通过apply来使用_this和_arguments
fn.apply(_this, _arguments);
}, delay);
};
@@ -55,8 +55,8 @@ export function isLicensePlate(no) {
export function cellStyle() {
return "text-align:center";
}
// 类型判断
export function typeJudgment(object) {
let res = {}.__proto__.toString.call(object);
return res ? res : "";
return res || "";
}