mali-applet-ui 1.1.113 → 1.1.116

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,7 +1,7 @@
1
1
  <template>
2
2
  <view class="ml-upload" :class="[className || '', {'is-loading': loading}]">
3
3
  <!-- 上传图片 -->
4
- <view v-if="mediatype === 'image' || platformEnv.isDDMP" class="ml-upload-image-list-warpper">
4
+ <view v-if="mediatype === 'image'" class="ml-upload-image-list-warpper">
5
5
  <view class="ml-upload-image-list-body">
6
6
  <view class="ml-upload-image-item" v-for="(item, index) in fileList" :key="index">
7
7
  <image class="ml-upload-image-img" mode="aspectFill" :src="getThumbnailUrl(item)" @tap="previewImageEvent(item)"></image>
@@ -141,8 +141,9 @@ function compressImages (tempFiles, opts) {
141
141
  }
142
142
 
143
143
  function uploadImageFiles (opts) {
144
+ const uniChoose = opts.type === 'video' ? uni.chooseVideo : uni.chooseImage
144
145
  return new Promise((resolve, reject) => {
145
- uni.chooseImage({
146
+ uniChoose({
146
147
  count: opts.count || 9,
147
148
  sourceType: opts.sourceType,
148
149
  // #ifdef MP-WEIXIN
@@ -254,6 +255,10 @@ export default {
254
255
  type: Array,
255
256
  default: () => ['album', 'camera']
256
257
  },
258
+ type: {
259
+ type: String,
260
+ default: 'all'
261
+ },
257
262
  getFileUrl: Function,
258
263
  getThumbnailFileUrl: Function,
259
264
  uploadFile: Function,
@@ -599,7 +604,8 @@ export default {
599
604
  sizeType: this.sizeType,
600
605
  sourceType: this.sourceType,
601
606
  count: this.limitFileLen - this.fileList.length,
602
- quality: this.imageQuality
607
+ quality: this.imageQuality,
608
+ type: this.type
603
609
  }).then(res => {
604
610
  const { tempFiles } = res
605
611
  this.loading = true
@@ -647,8 +653,9 @@ export default {
647
653
  this.choose('image')
648
654
  },
649
655
  chooseFileEvent () {
656
+ const itemList = this.mediatype === 'image' ? ['选择图片'] : [this.type === 'video' ? '选择视频' : '选择图片', '选择文件']
650
657
  uni.showActionSheet({
651
- itemList: ['选择图片', '选择文件'],
658
+ itemList, // : ['选择图片', '选择文件'],
652
659
  // #ifdef MP-DINGTALK
653
660
  cancelButtonText: '取消',
654
661
  // #endif
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mali-applet-ui",
3
- "version": "1.1.113",
3
+ "version": "1.1.116",
4
4
  "description": "码里UI-小程序组件库(vue2)",
5
5
  "files": [
6
6
  "lib",
@@ -43,7 +43,7 @@
43
43
  "nodemailer": "^6.9.4",
44
44
  "nodemailer-smtp-transport": "^2.7.4",
45
45
  "compressing": "~1.6.3",
46
- "miniprogram-ci": "~2.0.10",
46
+ "miniprogram-ci": "~1.9.8",
47
47
  "xe-utils": "^3.5.11"
48
48
  },
49
49
  "devDependencies": {