mali-applet-ui 0.2.69 → 0.2.70

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.
@@ -27,7 +27,9 @@ export default {
27
27
  return this.selectItem ? this.selectItem.label : ''
28
28
  },
29
29
  styles () {
30
- return this.selectItem && this.selectItem.color? `background:${this.selectItem.color};` : ''
30
+ const colStys = this.selectItem && this.selectItem.background? `background:${this.selectItem.background};` : ''
31
+ const bgStys = this.selectItem && this.selectItem.color? `color:${this.selectItem.color};` : ''
32
+ return `${bgStys}${colStys}`
31
33
  }
32
34
  }
33
35
  }
@@ -36,7 +38,6 @@ export default {
36
38
  <style lang="scss">
37
39
  .ml-approval-type {
38
40
  display: inline-block;
39
- color: #ffffff;
40
41
  padding: 8rpx 16rpx;
41
42
  border-radius: $ml-border-radius;
42
43
  font-size: 24rpx;
@@ -1,5 +1,5 @@
1
1
  <template>
2
- <button class="ml-button" :class="[className || '', `type-${type}`, size ? `size-${size}` : '', status ? `ss-${status}` : '', round ? 'is-round' : '']" :open-type="openType" :style="styles" @tap="tapEvent" @click="clickEvent">
2
+ <button class="ml-button" :class="[className || '', `type-${type}`, size ? `size-${size}` : '', status ? `ss-${status}` : '', {'is-round': round, 'is-underline': underline}]" :open-type="openType" :style="styles" @tap="tapEvent" @click="clickEvent">
3
3
  <slot>{{ content }}</slot>
4
4
  </button>
5
5
  </template>
@@ -19,6 +19,7 @@ export default {
19
19
  default: 'button'
20
20
  },
21
21
  size: String,
22
+ underline: Boolean,
22
23
  openType: String,
23
24
  width: String,
24
25
  height: String,
@@ -68,6 +69,9 @@ export default {
68
69
  vertical-align: middle;
69
70
  background: transparent;
70
71
  font-size: $uni-font-size-base;
72
+ &.is-underline {
73
+ text-decoration: underline;
74
+ }
71
75
  &.ss-primary {
72
76
  color: $uni-color-primary;
73
77
  }
@@ -17,13 +17,23 @@
17
17
  </view>
18
18
 
19
19
  <view v-else class="ml-upload-file-list">
20
- <view class="ml-upload-file-item">
21
- <view class="ml-upload-file-icon">
22
- <ml-icon name="file-txt" />
20
+ <view class="ml-upload-file-item" v-for="(item, index) in fileList" :key="index">
21
+ <view class="ml-upload-file-left">
22
+ <view class="ml-upload-file-icon">
23
+ <ml-icon name="file-txt" />
24
+ </view>
23
25
  </view>
24
26
  <view class="ml-upload-file-info">
25
- <view class="ml-upload-file-name"></view>
26
- <view></view>
27
+ <view class="ml-upload-file-name">{{ item[nameField] }}</view>
28
+ <view>
29
+ <ml-button status="primary" type="text">预览</ml-button>
30
+ <ml-button status="primary" type="text">下载</ml-button>
31
+ </view>
32
+ </view>
33
+ <view class="ml-upload-file-right">
34
+ <view class="ml-upload-file-del-btn">
35
+ <ml-icon name="close" />
36
+ </view>
27
37
  </view>
28
38
  </view>
29
39
  <view class="ml-upload-file-add">
@@ -41,7 +51,7 @@
41
51
  <script>
42
52
  import XEUtils from 'xe-utils'
43
53
  import globalStore from '../../config/store'
44
- import { uploadImageFiles } from './file-handle'
54
+ import { uploadAllFiles, uploadImageFiles } from './file-handle'
45
55
 
46
56
  export default {
47
57
  name: 'MlUpload',
@@ -427,7 +437,7 @@ export default {
427
437
  },
428
438
  chooseFile () {
429
439
  const uploadMethod = this.uploadFile ? this.uploadFile : (globalStore.upload ? globalStore.upload.uploadFile : null)
430
- uploadImageFiles({}).then(res => {
440
+ uploadAllFiles({}).then(res => {
431
441
  const { tempFiles } = res
432
442
  debugger
433
443
  Promise.all(
@@ -481,28 +491,61 @@ export default {
481
491
  flex-wrap: wrap;
482
492
  .ml-upload-image-item,
483
493
  .ml-upload-image-add {
494
+ display: flex;
495
+ justify-content: center;
496
+ align-items: center;
484
497
  position: relative;
485
- width: 100rpx;
486
- height: 100rpx;
487
- margin: 20rpx;
498
+ width: 140rpx;
499
+ height: 140rpx;
500
+ text-align: center;
488
501
  }
489
502
  .ml-upload-image-del-btn {
490
503
  position: absolute;
491
504
  right: 0;
492
505
  top: 0;
506
+ width: 40rpx;
507
+ height: 40rpx;
508
+ line-height: 40rpx;
509
+ text-align: center;
510
+ border-radius: 50%;
511
+ color: #ffffff;
512
+ background: #c8c8c9;
513
+ }
514
+ .ml-upload-image-add-btn {
515
+ width: 100rpx;
516
+ height: 100rpx;
517
+ line-height: 100rpx;
518
+ font-size: 60rpx;
519
+ color: #c8c8c9;
520
+ border: 1px solid #c8c8c9;
493
521
  border-radius: 50%;
494
522
  }
495
523
  .ml-upload-image-img {
524
+ width: 120rpx;
525
+ height: 120rpx;
526
+ line-height: 120rpx;
496
527
  border-radius: $ml-border-radius;
497
528
  }
498
529
  }
499
530
  .ml-upload-file-list {
500
531
  .ml-upload-file-item {
501
- display: block;
532
+ display: flex;
533
+ flex-direction: row;
502
534
  }
503
- .ml-upload-file-icon {
535
+ .ml-upload-file-left,
536
+ .ml-upload-file-right {
537
+ display: flex;
538
+ flex-direction: row;
539
+ align-items: center;
540
+ justify-content: center;
504
541
  flex-shrink: 0;
505
542
  }
543
+ .ml-upload-file-left {
544
+ width: 80rpx;
545
+ }
546
+ .ml-upload-file-icon {
547
+ font-size: 50rpx;
548
+ }
506
549
  .ml-upload-file-info {
507
550
  flex-grow: 1;
508
551
  .ml-upload-file-name {
@@ -511,6 +554,9 @@ export default {
511
554
  white-space: nowrap;
512
555
  }
513
556
  }
557
+ .ml-upload-file-right {
558
+ width: 60rpx;
559
+ }
514
560
  .ml-upload-file-add-btn {
515
561
  display: flex;
516
562
  flex-direction: row;
@@ -58,6 +58,14 @@
58
58
  :activeColor="getBarActiveColor({ type: 'body', row, rowIndex, column, columnIndex }) || '#FA8C16'"
59
59
  :backgroundColor="(column.cellRender.props ? column.cellRender.props.backgroundColor : '') || '#1890FF'">
60
60
  </ml-progress-bar>
61
+ <ml-button
62
+ v-else-if="column.cellRender && column.cellRender.name === 'MlButton'"
63
+ :type="column.cellRender.props ? column.cellRender.props.type : 'button'"
64
+ :underline="column.cellRender.props ? column.cellRender.props.underline : false"
65
+ :status="column.cellRender.props ? column.cellRender.props.status : ''"
66
+ :content="column.cellRender.props ? column.cellRender.props.content : ''"
67
+ @click="btnEvent({ type: 'body', row, rowIndex, column, columnIndex })">
68
+ </ml-button>
61
69
  <text v-else>{{ getCellValue({ type: 'body', row, rowIndex, column, columnIndex }) }}</text>
62
70
  </view>
63
71
  </view>
@@ -255,6 +263,9 @@ export default {
255
263
  },
256
264
  cellTdClick(params) {
257
265
  this.$emit('cell-click', params)
266
+ },
267
+ btnEvent (params) {
268
+ this.$emit('cell-button-click', params)
258
269
  }
259
270
  }
260
271
  }
package/config/store.js CHANGED
@@ -28,13 +28,13 @@ const globalStore = {
28
28
  optionMethod: null
29
29
  },
30
30
  types: [
31
- { value: 0, label: '起草中', color: '#F0F2F5' },
32
- { value: 1, label: '审批中', color: '#246BFD' },
33
- { value: 2, label: '已通过', color: '#00D35C' },
34
- { value: 3, label: '已驳回', color: '#FF5064' },
35
- { value: 4, label: '会签中', color: '#FF9C00' },
36
- { value: 5, label: '处理中', color: '#246BFD' },
37
- { value: 6, label: '已完成', color: '#00D35C' }
31
+ { value: 0, label: '起草中', color: '#353535', background: '#F0F2F5' },
32
+ { value: 1, label: '审批中', color: '#ffffff', background: '#246BFD' },
33
+ { value: 2, label: '已通过', color: '#ffffff', background: '#00D35C' },
34
+ { value: 3, label: '已驳回', color: '#ffffff', background: '#FF5064' },
35
+ { value: 4, label: '会签中', color: '#ffffff', background: '#FF9C00' },
36
+ { value: 5, label: '处理中', color: '#ffffff', background: '#246BFD' },
37
+ { value: 6, label: '已完成', color: '#ffffff', background: '#00D35C' }
38
38
  ]
39
39
  },
40
40
  // 上拉加载更多
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mali-applet-ui",
3
- "version": "0.2.69",
3
+ "version": "0.2.70",
4
4
  "description": "码里云小程序组件库",
5
5
  "scripts": {
6
6
  "release": "node script/release.js && npm publish"