first commit.

This commit is contained in:
2023-01-04 10:20:18 +08:00
commit 919fcf5ba9
39 changed files with 4196 additions and 0 deletions

14
src/utils/functions.ts Normal file
View File

@@ -0,0 +1,14 @@
export function getACRate(acCount: number, totalCount: number) {
let rate = totalCount === 0 ? 0.0 : ((acCount / totalCount) * 100).toFixed(2);
return `${rate}%`;
}
export function filterEmptyValue(object: any) {
let query: any = {};
Object.keys(object).forEach((key) => {
if (object[key] || object[key] === 0 || object[key] === false) {
query[key] = object[key];
}
});
return query;
}