flat: 暂存

This commit is contained in:
Apcallover
2024-04-30 11:20:41 +08:00
parent 9f16b866e0
commit f14ea44af2
58 changed files with 6711 additions and 1439 deletions

View File

@@ -41,9 +41,21 @@ function deg2rad(deg) {
return deg * (Math.PI / 180);
}
export function debounce(fun, delay) {
return function(args) {
let that = this;
let _args = args;
clearTimeout(fun.id);
fun.id = setTimeout(() => {
fun.call(that, _args)
}, delay)
}
}
export default {
onDialingPhoneNumber,
addZeroPrefix,
getDistanceFromLatLonInKm
getDistanceFromLatLonInKm,
debounce
}