mali-applet-ui 1.0.28 → 1.0.31

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.
@@ -12,7 +12,7 @@
12
12
  <ml-icon name="delete-filling"></ml-icon>
13
13
  </view>
14
14
  <view v-else class="ml-cascader-picker-icon">
15
- <ml-icon name="arrow-down" />
15
+ <ml-icon name="arrow-right" />
16
16
  </view>
17
17
  </view>
18
18
 
@@ -2,7 +2,9 @@
2
2
  <picker :value="value" class="ml-month-picker" mode="date" fields="month" @change="changeEvent">
3
3
  <view class="ml-month-picker-warpper" :class="[className || '', {'is-border': border}]">
4
4
  <view class="ml-month-picker-text">{{ value || '请选择' }}</view>
5
- <ml-icon class="ml-month-picker-icon" name="arrow-down"></ml-icon>
5
+ <view class="ml-month-picker-icon">
6
+ <ml-icon name="arrow-right"></ml-icon>
7
+ </view>
6
8
  </view>
7
9
  </picker>
8
10
  </template>
@@ -12,7 +12,7 @@
12
12
  <ml-icon name="delete-filling"></ml-icon>
13
13
  </view>
14
14
  <view v-else class="ml-province-city-picker-icon">
15
- <ml-icon name="arrow-down" />
15
+ <ml-icon name="arrow-right" />
16
16
  </view>
17
17
  </view>
18
18
 
@@ -12,7 +12,7 @@
12
12
  <ml-icon name="delete-filling"></ml-icon>
13
13
  </view>
14
14
  <view v-else class="ml-select-picker-icon">
15
- <ml-icon name="arrow-down" />
15
+ <ml-icon name="arrow-right" />
16
16
  </view>
17
17
  </view>
18
18
  </picker>
@@ -69,18 +69,21 @@ function normalizeChooseAndUploadFileRes (res, fileType) {
69
69
  return res
70
70
  }
71
71
 
72
- function compressImages (tempFiles) {
72
+ function compressImages (tempFiles, opts) {
73
73
  return Promise.all(
74
- tempFiles.map(tempFilePath => {
74
+ tempFiles.map(item => {
75
75
  return new Promise(resolve => {
76
76
  uni.compressImage({
77
- src: tempFilePath,
78
- quality: this.imageQuality,
77
+ src: item.path,
78
+ quality: opts.quality || 80,
79
79
  success (compressRes) {
80
- resolve(compressRes.tempFilePath)
80
+ resolve({
81
+ ...item,
82
+ path: compressRes.tempFilePath
83
+ })
81
84
  },
82
85
  fail () {
83
- resolve(tempFilePath)
86
+ resolve(item)
84
87
  }
85
88
  })
86
89
  })
@@ -98,8 +101,9 @@ function uploadImageFiles (opts) {
98
101
  // #endif
99
102
  success (chooseRes) {
100
103
  const rest = normalizeChooseAndUploadFileRes(chooseRes, 'image')
101
- if (this.imageQuality) {
102
- compressImages(rest.tempFiles).then((compressFiles) => {
104
+ // 如果是图片类型,支持压缩比例
105
+ if (opts.quality) {
106
+ compressImages(rest.tempFiles, opts).then((compressFiles) => {
103
107
  resolve({
104
108
  ...rest,
105
109
  tempFiles: compressFiles
@@ -467,7 +471,8 @@ export default {
467
471
  chooseMethod({
468
472
  sizeType: this.sizeType,
469
473
  sourceType: this.sourceType,
470
- count: this.limit - this.fileList.length
474
+ count: this.limit - this.fileList.length,
475
+ quality: this.imageQuality
471
476
  }).then(res => {
472
477
  const { tempFiles } = res
473
478
  this.loading = true
@@ -2,7 +2,9 @@
2
2
  <picker :value="value" class="ml-year-picker" mode="date" fields="year" @change="changeEvent">
3
3
  <view class="ml-year-picker-warpper" :class="[className || '', {'is-border': border}]">
4
4
  <view class="ml-year-picker-text">{{ value || '请选择' }}</view>
5
- <ml-icon class="ml-year-picker-icon" name="arrow-down"></ml-icon>
5
+ <view class="ml-year-picker-icon">
6
+ <ml-icon name="arrow-right"></ml-icon>
7
+ </view>
6
8
  </view>
7
9
  </picker>
8
10
  </template>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mali-applet-ui",
3
- "version": "1.0.28",
3
+ "version": "1.0.31",
4
4
  "description": "码里云小程序组件库",
5
5
  "files": [
6
6
  "lib",
package/theme.scss CHANGED
@@ -6,9 +6,9 @@ $ml-font-color: rgba(0, 0, 0, 0.85);
6
6
 
7
7
  // 字体
8
8
  $ml-base-font-size: 34rpx;
9
- // 副标题体
9
+ // 副标题字体
10
10
  $ml-subhead-font-size: 30rpx;
11
- // 描述体
11
+ // 描述字体
12
12
  $ml-describe-font-size: 28rpx;
13
13
 
14
14
  // 页面间隔宽度