mali-applet-ui 1.0.40 → 1.0.41

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.
@@ -46,6 +46,7 @@ export default {
46
46
  border-radius: $ml-border-radius;
47
47
  background: #ffffff;
48
48
  margin-bottom: 20rpx;
49
+ color: $ml-font-color;
49
50
  .ml-chunk-group-title {
50
51
  display: flex;
51
52
  flex-direction: row;
@@ -61,6 +61,9 @@ export default {
61
61
  padding: 16rpx;
62
62
  line-height: 50rpx;
63
63
  font-size: $ml-describe-font-size;
64
+ overflow: hidden;
65
+ text-overflow: ellipsis;
66
+ white-space: nowrap;
64
67
  $spans: 4.16667%, 8.33333%, 12.5%, 16.66667%, 20.83333%, 25%, 29.16667%, 33.33333%,
65
68
  37.5%, 41.66667%, 45.83333%, 50%, 54.16667%, 58.33333%, 62.5%, 66.66667%,
66
69
  70.83333%, 75%, 79.16667%, 83.33333%, 87.5%, 91.66667%, 95.83333%, 100%;
@@ -12,8 +12,7 @@
12
12
  export default {
13
13
  name: 'MlCol',
14
14
  options: {
15
- virtualHost: true,
16
- styleIsolation: 'shared'
15
+ virtualHost: true
17
16
  },
18
17
  props: {
19
18
  span: [String, Number],
@@ -8,8 +8,7 @@
8
8
  export default {
9
9
  name: 'MlRow',
10
10
  options: {
11
- virtualHost: true,
12
- styleIsolation: 'shared'
11
+ virtualHost: true
13
12
  },
14
13
  props: {
15
14
  gutter: [String, Number],
@@ -170,7 +170,6 @@ export default {
170
170
  flex-grow: 1;
171
171
  color: #999999;
172
172
  text-align: right;
173
- padding-right: 20rpx;
174
173
  font-size: $ml-describe-font-size;
175
174
  }
176
175
  }
@@ -8,28 +8,40 @@
8
8
  <ml-icon name="close" />
9
9
  </view>
10
10
  </view>
11
- <view v-if="!isFromReadonly && fileList.length < limit" class="ml-upload-image-add">
12
- <view class="ml-upload-image-add-btn" @tap="chooseEvent">
13
- <view class="ml-upload-image-add-icon">
14
- <ml-icon v-if="loading" name="loading" roll />
15
- <ml-icon v-else name="add" />
16
- <view v-if="loading" class="ml-upload-image-add-loading-text">上传中...</view>
11
+ <template v-if="!isFromReadonly && fileList.length < limit">
12
+ <view v-if="hasForm" class="ml-upload-image-form-add-btn" @tap="chooseEvent">
13
+ <ml-icon v-if="loading" name="loading" roll />
14
+ <ml-icon v-else name="add-circle" />
15
+ </view>
16
+ <view v-else class="ml-upload-image-add">
17
+ <view class="ml-upload-image-add-btn" @tap="chooseEvent">
18
+ <view class="ml-upload-image-add-icon">
19
+ <ml-icon v-if="loading" name="loading" roll />
20
+ <ml-icon v-else name="add" />
21
+ <view v-if="loading" class="ml-upload-image-add-loading-text">上传中...</view>
22
+ </view>
17
23
  </view>
18
24
  </view>
19
- </view>
25
+ </template>
20
26
  </view>
21
27
  <!-- 上传文件 -->
22
28
  <view v-else class="ml-upload-file-list">
23
- <view v-if="!isFromReadonly && fileList.length < limit" class="ml-upload-file-add">
24
- <view class="ml-upload-file-add-btn" @tap="chooseEvent">
25
- <text class="ml-upload-file-add-icon">
26
- <ml-icon v-if="loading" name="loading" roll />
27
- <ml-icon v-else name="add" />
28
- </text>
29
- <text v-if="loading">上传中...</text>
30
- <text v-else>添加文件</text>
29
+ <template v-if="!isFromReadonly && fileList.length < limit">
30
+ <view v-if="hasForm" class="ml-upload-file-form-add-btn" @tap="chooseEvent">
31
+ <ml-icon v-if="loading" name="loading" roll />
32
+ <ml-icon v-else name="add-circle" />
31
33
  </view>
32
- </view>
34
+ <view v-else class="ml-upload-file-add">
35
+ <view class="ml-upload-file-add-btn" @tap="chooseEvent">
36
+ <text class="ml-upload-file-add-icon">
37
+ <ml-icon v-if="loading" name="loading" roll />
38
+ <ml-icon v-else name="add" />
39
+ </text>
40
+ <text v-if="loading">上传中...</text>
41
+ <text v-else>添加文件</text>
42
+ </view>
43
+ </view>
44
+ </template>
33
45
  <view class="ml-upload-file-item" v-for="(item, index) in fileList" :key="index">
34
46
  <view class="ml-upload-file-left">
35
47
  <view class="ml-upload-file-icon">
@@ -217,6 +229,9 @@ export default {
217
229
  }
218
230
  },
219
231
  computed: {
232
+ hasForm () {
233
+ return !!this.form
234
+ },
220
235
  isFromReadonly () {
221
236
  if (this.readonly) {
222
237
  return true
@@ -523,6 +538,7 @@ export default {
523
538
 
524
539
  <style lang="scss">
525
540
  .ml-upload-image-list {
541
+ position: relative;
526
542
  display: flex;
527
543
  flex-direction: row;
528
544
  flex-wrap: wrap;
@@ -540,9 +556,9 @@ export default {
540
556
  position: absolute;
541
557
  right: 0;
542
558
  top: 0;
543
- width: 40rpx;
544
- height: 40rpx;
545
- line-height: 40rpx;
559
+ width: 36rpx;
560
+ height: 36rpx;
561
+ line-height: 36rpx;
546
562
  font-size: 28rpx;
547
563
  text-align: center;
548
564
  border-radius: 50%;
@@ -577,9 +593,10 @@ export default {
577
593
  }
578
594
  }
579
595
  .ml-upload-file-list {
596
+ position: relative;
580
597
  .ml-upload-file-add,
581
598
  .ml-upload-file-item {
582
- margin: 20rpx 0;
599
+ margin: 10rpx 0;
583
600
  }
584
601
  .ml-upload-file-item {
585
602
  display: flex;
@@ -638,4 +655,11 @@ export default {
638
655
  width: 60rpx;
639
656
  }
640
657
  }
658
+ .ml-upload-image-form-add-btn,
659
+ .ml-upload-file-form-add-btn {
660
+ position: absolute;
661
+ top: -74rpx;
662
+ right: 20rpx;
663
+ font-size: 44rpx;
664
+ }
641
665
  </style>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mali-applet-ui",
3
- "version": "1.0.40",
3
+ "version": "1.0.41",
4
4
  "description": "码里云小程序组件库",
5
5
  "files": [
6
6
  "lib",