mirror of
https://github.com/mayswind/ezbookkeeping.git
synced 2026-05-17 16:24:25 +08:00
show whether data is updated after pull down
This commit is contained in:
@@ -590,6 +590,7 @@ export default {
|
||||
},
|
||||
reload(done) {
|
||||
const self = this;
|
||||
const force = !!done;
|
||||
|
||||
if (!done) {
|
||||
self.loading = true;
|
||||
@@ -601,6 +602,7 @@ export default {
|
||||
]).then(() => {
|
||||
return self.transactionsStore.loadTransactions({
|
||||
reload: true,
|
||||
force: force,
|
||||
autoExpand: true,
|
||||
defaultCurrency: self.defaultCurrency
|
||||
});
|
||||
@@ -609,6 +611,10 @@ export default {
|
||||
done();
|
||||
}
|
||||
|
||||
if (force) {
|
||||
self.$toast('Data has been updated');
|
||||
}
|
||||
|
||||
self.loading = false;
|
||||
}).catch(error => {
|
||||
if (error.processed || done) {
|
||||
|
||||
Reference in New Issue
Block a user