|
@@ -116,7 +116,7 @@ export default {
|
|
|
if (uid) this._uploadingUids[uid] = true
|
|
if (uid) this._uploadingUids[uid] = true
|
|
|
|
|
|
|
|
// 时间节流(双保险),同一文件 1500ms 内只允许一次真正上传
|
|
// 时间节流(双保险),同一文件 1500ms 内只允许一次真正上传
|
|
|
- const key = uid || (rawFile && `${rawFile.name}_${rawFile.size}_${rawFile.lastModified}`) || rawFile && rawFile.name
|
|
|
|
|
|
|
+ const key = uid || (rawFile && `${rawFile.name}_${rawFile.size}_${rawFile.lastModified}`) || (rawFile && rawFile.name)
|
|
|
if (!this._lastUploadByKey) this._lastUploadByKey = {}
|
|
if (!this._lastUploadByKey) this._lastUploadByKey = {}
|
|
|
const now = Date.now()
|
|
const now = Date.now()
|
|
|
if (key && this._lastUploadByKey[key] && (now - this._lastUploadByKey[key] < 1500)) {
|
|
if (key && this._lastUploadByKey[key] && (now - this._lastUploadByKey[key] < 1500)) {
|
|
@@ -210,4 +210,4 @@ export default {
|
|
|
}
|
|
}
|
|
|
</script>
|
|
</script>
|
|
|
|
|
|
|
|
-<style scoped></style>
|
|
|
|
|
|
|
+<style scoped></style>
|