done 新建工序

This commit is contained in:
lb
2023-10-24 15:56:15 +08:00
parent 6006ae13d9
commit 3c31e5d63a
3 changed files with 209 additions and 118 deletions

View File

@@ -217,7 +217,7 @@ export function getTime(type) {
export function debounce(func, wait, immediate) {
let timeout, args, context, timestamp, result
const later = function() {
const later = function () {
// 据上一次触发时间间隔
const last = +new Date() - timestamp
@@ -234,7 +234,7 @@ export function debounce(func, wait, immediate) {
}
}
return function(...args) {
return function (...args) {
context = this
timestamp = +new Date()
const callNow = immediate && !timeout
@@ -438,3 +438,7 @@ export function toCamelCase(str, upperCaseFirst) {
return str;
}
export function IdToName(targetId, source, prop = 'name') {
return source.find(item => item.id === targetId)?.[prop]
}