mali-applet-ui 1.0.13 → 1.0.15
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.
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
<!-- 上传图片 -->
|
|
4
4
|
<view v-if="mediatype === 'image'" class="ml-upload-image-list">
|
|
5
5
|
<view class="ml-upload-image-item" v-for="(item, index) in fileList" :key="index">
|
|
6
|
-
<image class="ml-upload-image-img" mode="aspectFit" :src="
|
|
6
|
+
<image class="ml-upload-image-img" mode="aspectFit" :src="getThumbnailFileUrl(item)" @click="previewImageEvent(item, index)"></image>
|
|
7
7
|
<view v-if="!isFromReadonly" class="ml-upload-image-del-btn" @click="removeEvent(item)">
|
|
8
8
|
<ml-icon name="close" />
|
|
9
9
|
</view>
|
|
@@ -99,8 +99,10 @@ export default {
|
|
|
99
99
|
default: () => ({})
|
|
100
100
|
},
|
|
101
101
|
getFileUrl: Function,
|
|
102
|
+
getThumbnailUrl: Function,
|
|
102
103
|
uploadFile: Function,
|
|
103
|
-
removeFile: Function
|
|
104
|
+
removeFile: Function,
|
|
105
|
+
downloadFile: Function
|
|
104
106
|
},
|
|
105
107
|
inject: {
|
|
106
108
|
currVM: {
|
|
@@ -233,6 +235,16 @@ export default {
|
|
|
233
235
|
this.isUpdate = true
|
|
234
236
|
this.updateModel()
|
|
235
237
|
},
|
|
238
|
+
getThumbnailFileUrl (item) {
|
|
239
|
+
const getThumbnailMethod = this.getThumbnailUrl ? this.getThumbnailUrl : (globalStore.upload ? globalStore.upload.getThumbnailUrl : null)
|
|
240
|
+
if (getThumbnailMethod) {
|
|
241
|
+
return getThumbnailMethod.call(this.currVM, {
|
|
242
|
+
item,
|
|
243
|
+
params: this.params
|
|
244
|
+
})
|
|
245
|
+
}
|
|
246
|
+
return this.getUrl(item)
|
|
247
|
+
},
|
|
236
248
|
getUrl (item) {
|
|
237
249
|
const getFileMethod = this.getFileUrl ? this.getFileUrl : (globalStore.upload ? globalStore.upload.getFileUrl : null)
|
|
238
250
|
if (getFileMethod) {
|