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.
@@ -150,6 +150,7 @@ export default {
150
150
  left: 50%;
151
151
  transform: translate(-50%, -50%);
152
152
  background: #fff;
153
+ border-radius: $ml-border-radius;
153
154
  }
154
155
  .ml-modal-header {
155
156
  display: flex;
@@ -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="getUrl(item)" @click="previewImageEvent(item, index)"></image>
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) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mali-applet-ui",
3
- "version": "1.0.13",
3
+ "version": "1.0.15",
4
4
  "description": "码里云小程序组件库",
5
5
  "files": [
6
6
  "lib",