上传组件增加可选择上传途径
This commit is contained in:
@@ -55,6 +55,7 @@ export default {
|
||||
preview: Boolean,
|
||||
size: {default: 10 * 1024 * 1024},
|
||||
disabled: Boolean,
|
||||
sourceType: {default: () => ['album', 'camera']}
|
||||
},
|
||||
computed: {
|
||||
...mapState(['token']),
|
||||
@@ -90,7 +91,7 @@ export default {
|
||||
let params = {
|
||||
count: this.limit,
|
||||
sizeType: ['compressed'],
|
||||
sourceType: ['album', 'camera'],
|
||||
sourceType: [this.sourceType].flat(),
|
||||
success: (res) => {
|
||||
let count = this.fileList?.length + (res.tempFiles?.length || res.tempFile ? 1 : 0)
|
||||
if (count > this.limit && this.limit !== 1) {
|
||||
|
||||
Reference in New Issue
Block a user