sadais-piui 1.2.7-beta51 → 1.2.7-beta52
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.
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
<!--
|
|
2
2
|
* @Author: zhangzhenfei
|
|
3
3
|
* @Date: 2021-08-13 11:31:57
|
|
4
|
-
* @LastEditTime: 2022-11-
|
|
4
|
+
* @LastEditTime: 2022-11-09 09:37:45
|
|
5
5
|
* @LastEditors: zhangzhenfei
|
|
6
6
|
* @Description: 图片上传组件
|
|
7
|
-
* @FilePath: \
|
|
7
|
+
* @FilePath: \piui-awesome\src\piui\components\pi-upload-img\index.vue
|
|
8
8
|
-->
|
|
9
9
|
|
|
10
10
|
<template>
|
|
@@ -315,7 +315,7 @@ export default {
|
|
|
315
315
|
if (this.val === null || this.val === undefined) {
|
|
316
316
|
return []
|
|
317
317
|
}
|
|
318
|
-
return this.isValString ? (this.val ? [this.val] : []) : this.val.filter(img => img)
|
|
318
|
+
return this.isValString ? (this.val ? [this.val] : []) : this.val.filter((img) => img)
|
|
319
319
|
},
|
|
320
320
|
getItemStyle() {
|
|
321
321
|
const style = {
|
|
@@ -382,7 +382,7 @@ export default {
|
|
|
382
382
|
current = this.val
|
|
383
383
|
urls = [this.val]
|
|
384
384
|
} else {
|
|
385
|
-
urls = this.imgField ? this.val.map(img => img[this.imgField]) : this.val
|
|
385
|
+
urls = this.imgField ? this.val.map((img) => img[this.imgField]) : this.val
|
|
386
386
|
current = this.imgField ? img[this.imgField] : img
|
|
387
387
|
}
|
|
388
388
|
|
|
@@ -507,7 +507,7 @@ export default {
|
|
|
507
507
|
sourceType,
|
|
508
508
|
crop
|
|
509
509
|
})
|
|
510
|
-
|
|
510
|
+
let { errMsg, tempFilePaths } = result
|
|
511
511
|
if (errMsg !== 'chooseImage:ok') {
|
|
512
512
|
throw new Error(errMsg)
|
|
513
513
|
}
|
|
@@ -525,7 +525,7 @@ export default {
|
|
|
525
525
|
}
|
|
526
526
|
this.handleUpload(tempFilePaths)
|
|
527
527
|
} catch (error) {
|
|
528
|
-
console.log(TAG, '上传文件失败',
|
|
528
|
+
console.log(TAG, '上传文件失败', error)
|
|
529
529
|
this.$emit('fail', error)
|
|
530
530
|
}
|
|
531
531
|
}
|