@idooel/components 0.0.2-beta.5 → 0.0.2-beta.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/@idooel/components.esm.js +781 -333
- package/dist/@idooel/components.umd.js +781 -333
- package/package.json +1 -1
- package/packages/upload/src/index.vue +14 -5
package/package.json
CHANGED
|
@@ -192,7 +192,8 @@ export default {
|
|
|
192
192
|
// 上传状态管理
|
|
193
193
|
saveToServerAsyncPageTimer: null,
|
|
194
194
|
uploadRefId: null,
|
|
195
|
-
groupId
|
|
195
|
+
// 多选且外部无值时,预先生成 groupId,确保首次上传参数完整
|
|
196
|
+
groupId: (this.multiple && !this.value) ? uuidv4() : null
|
|
196
197
|
}
|
|
197
198
|
},
|
|
198
199
|
created() {
|
|
@@ -205,8 +206,6 @@ export default {
|
|
|
205
206
|
watch: {
|
|
206
207
|
value: {
|
|
207
208
|
async handler(value) {
|
|
208
|
-
console.log('watch.value triggered:', { value, multiple: this.multiple, currentGroupId: this.groupId })
|
|
209
|
-
|
|
210
209
|
if (type.isEmpty(value)) {
|
|
211
210
|
this.resetFiles()
|
|
212
211
|
} else if (this.multiple) {
|
|
@@ -698,8 +697,18 @@ export default {
|
|
|
698
697
|
resetFiles() {
|
|
699
698
|
this.files = []
|
|
700
699
|
this.buildedFiles = []
|
|
701
|
-
|
|
702
|
-
|
|
700
|
+
// 多选模式下保留或生成 groupId,避免首次上传为空
|
|
701
|
+
if (this.multiple) {
|
|
702
|
+
if (!this.groupId) {
|
|
703
|
+
this.groupId = uuidv4()
|
|
704
|
+
console.log('Generated groupId in resetFiles:', this.groupId)
|
|
705
|
+
} else {
|
|
706
|
+
console.log('Preserve existing groupId in resetFiles:', this.groupId)
|
|
707
|
+
}
|
|
708
|
+
} else {
|
|
709
|
+
this.groupId = null
|
|
710
|
+
console.log('Reset groupId to null (single mode)')
|
|
711
|
+
}
|
|
703
712
|
},
|
|
704
713
|
|
|
705
714
|
/**
|