support pull to refresh in account list page

This commit is contained in:
MaysWind
2020-11-11 00:27:51 +08:00
parent 9f328402d8
commit 6e782d9d83
2 changed files with 44 additions and 13 deletions
+18
View File
@@ -26,6 +26,23 @@ function isBoolean(val) {
return typeof(val) === 'boolean';
}
function getCategorizedAccounts(allAccounts) {
const ret = {};
for (let i = 0; i < allAccounts.length; i++) {
const account = allAccounts[i];
if (!ret[account.category]) {
ret[account.category] = [];
}
const accountList = ret[account.category];
accountList.push(account);
}
return ret;
}
export default {
isFunction,
isObject,
@@ -33,4 +50,5 @@ export default {
isString,
isNumber,
isBoolean,
getCategorizedAccounts,
};