sadais-piui 1.2.7-beta51 → 1.2.7-beta53
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-19 09:44:33
|
|
5
5
|
* @LastEditors: zhangzhenfei
|
|
6
6
|
* @Description: 图片上传组件
|
|
7
|
-
* @FilePath:
|
|
7
|
+
* @FilePath: /dt-weitibao-console/Users/feilin/workspace/piui/piui-awesome/src/piui/components/pi-upload-img/index.vue
|
|
8
8
|
-->
|
|
9
9
|
|
|
10
10
|
<template>
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
class="pi-rela pi-flex-column-center"
|
|
17
17
|
@tap="handlePreviewImage(img)"
|
|
18
18
|
>
|
|
19
|
-
<view class="close" @tap.stop="handleDelete(index)">
|
|
19
|
+
<view v-if="!disabled" class="close" @tap.stop="handleDelete(index)">
|
|
20
20
|
<pi-icon name="roundclosefill" color="#8e8e8e" size="36" />
|
|
21
21
|
</view>
|
|
22
22
|
<image
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
/>
|
|
28
28
|
</view>
|
|
29
29
|
<!-- 上传框 -->
|
|
30
|
-
<view v-if="getUploadMaxCount">
|
|
30
|
+
<view v-if="getUploadMaxCount && !disabled">
|
|
31
31
|
<view :style="[getUploadBtnStyle]" class="pi-flex-column-center" @tap="handleChooseImage">
|
|
32
32
|
<slot name="uploadBtn">
|
|
33
33
|
<!-- 添加按钮 -->
|
|
@@ -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
|
}
|