🐛 fix(frontend): 修复上传进度与取件详情弹窗
This commit is contained in:
1 parent
da54bf40c9
commit
988ae2429d
5 files changed
+43
-124
No files matched your search
@@ -27,6 +27,8 @@ export function useSendFlow() {
|
||||
const expirationMethod = ref(config.value.expireStyle[0] || 'day')
|
||||
const expirationValue = ref('1')
|
||||
const uploadProgress = ref(0)
|
||||
const uploadedBytes = ref(0)
|
||||
const totalBytes = ref(0)
|
||||
const showDrawer = ref(false)
|
||||
const selectedRecord = ref<SentFileRecord | null>(null)
|
||||
const isSubmitting = ref(false)
|
||||
@@ -62,7 +64,9 @@ export function useSendFlow() {
|
||||
notify: (message, type) => alertStore.showAlert(message, type),
|
||||
translate: t,
|
||||
onProgress: (progress) => {
|
||||
uploadProgress.value = progress
|
||||
uploadProgress.value = progress.percentage
|
||||
uploadedBytes.value = progress.loaded
|
||||
totalBytes.value = progress.total
|
||||
},
|
||||
onFinalizing: () => { isFinalizing.value = true },
|
||||
onHashCalculated: (hash) => {
|
||||
@@ -285,6 +289,8 @@ export function useSendFlow() {
|
||||
alertStore.showAlert(getErrorMessage(error, t('send.messages.sendFailed')), 'error')
|
||||
} finally {
|
||||
uploadProgress.value = 0
|
||||
uploadedBytes.value = 0
|
||||
totalBytes.value = 0
|
||||
isSubmitting.value = false
|
||||
isFinalizing.value = false
|
||||
}
|
||||
@@ -319,6 +325,8 @@ export function useSendFlow() {
|
||||
expirationMethod,
|
||||
expirationValue,
|
||||
uploadProgress,
|
||||
uploadedBytes,
|
||||
totalBytes,
|
||||
showDrawer,
|
||||
selectedRecord,
|
||||
isSubmitting,
|
||||
|
||||
Reference in new issue
Block a user