This commit is contained in:
2024-08-21 11:03:31 +08:00
parent 934b3b7b74
commit e25627cda9
33 changed files with 204 additions and 176 deletions

View File

@@ -20,35 +20,35 @@
* @returns
*/
export const useDebounce = function (func, wait = 1000, isImmediate = true) {
var timerId = null
var flag = true
var timerId = null;
var flag = true;
return function () {
let context = this
let args = arguments
clearTimeout(timerId)
let context = this;
let args = arguments;
clearTimeout(timerId);
if (isImmediate) {
if (flag) {
func.apply(context, args)
flag = false
func?.apply(context, args);
flag = false;
}
timerId = setTimeout(function () {
flag = true
}, wait)
flag = true;
}, wait);
} else {
timerId = setTimeout(function () {
func.apply(context, args)
}, wait)
func?.apply(context, args);
}, wait);
}
}
}
};
};
export const tableHead = {
backgroundColor: '#F6F9FF',
color: '#3D3F46',
textAlign: 'center',
backgroundColor: "#F6F9FF",
color: "#3D3F46",
textAlign: "center",
// lineHeight: '30px'
}
};
export const tabCell = {
textAlign: 'center',
}
textAlign: "center",
};