sadais-piui 1.2.7-beta159 → 1.2.7-beta160
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.
|
@@ -440,10 +440,12 @@ export default {
|
|
|
440
440
|
return uploadImg.fileLimit
|
|
441
441
|
}
|
|
442
442
|
},
|
|
443
|
-
//
|
|
444
|
-
|
|
445
|
-
type:
|
|
446
|
-
default
|
|
443
|
+
// 是否自定义预览图片(如果为true,则不调用预览,通过事件自己实现预览)
|
|
444
|
+
customPreviewImage: {
|
|
445
|
+
type: Boolean,
|
|
446
|
+
default() {
|
|
447
|
+
return uploadImg.customPreviewImage
|
|
448
|
+
}
|
|
447
449
|
},
|
|
448
450
|
},
|
|
449
451
|
data() {
|
|
@@ -728,8 +730,8 @@ export default {
|
|
|
728
730
|
if (!this.previewFullImage) return
|
|
729
731
|
|
|
730
732
|
// 自定义预览功能
|
|
731
|
-
if (this.
|
|
732
|
-
this
|
|
733
|
+
if (this.customPreviewImage) {
|
|
734
|
+
this.$emit('preview-image', img)
|
|
733
735
|
return
|
|
734
736
|
}
|
|
735
737
|
|
package/config/uploadImg.js
CHANGED
|
@@ -103,5 +103,5 @@ export default {
|
|
|
103
103
|
fileIconMap: {}, // 文件类型和图标映射关系,对象形式({PDF: 'https://xxx'})
|
|
104
104
|
customUploadParams: {}, // 自定义上传参数,对象形式
|
|
105
105
|
fileLimit: null, // 文件大小限制,单位为字节,null表示不限制
|
|
106
|
-
|
|
106
|
+
customPreviewImage: false, // 是否自定义预览图片(如果为true,则不调用预览,通过事件自己实现预览)
|
|
107
107
|
}
|