refactor: upload vuex module

This commit is contained in:
Ramires Viana committed 2020-07-10 00:01:37 +00:00
1 parent 28d2b35718
commit c9cc0d3d5d
6 files changed
+51 -44

No files matched your search

+3 -3
View File
@@ -5,12 +5,12 @@ const getters = {
isEditor: (state, getters) => getters.isFiles && (state.req.type === 'text' || state.req.type === 'textImmutable'),
selectedCount: state => state.selected.length,
progress : state => {
if (state.uploading.progress.length == 0) {
if (state.upload.progress.length == 0) {
return 0;
}
let sum = state.uploading.progress.reduce((acc, val) => acc + val)
return Math.ceil(sum / state.uploading.size * 100);
let sum = state.upload.progress.reduce((acc, val) => acc + val)
return Math.ceil(sum / state.upload.size * 100);
}
}