mali-applet-ui 0.0.68 → 0.0.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.
@@ -69,11 +69,11 @@ export default {
69
69
  }
70
70
  }
71
71
  &:not(.is-vertical) {
72
- border-right: 1px solid rgba(255, 255, 255, 0.2);
72
+ border-bottom: 1px solid #e5e5e5;
73
73
  }
74
74
  &.is-vertical {
75
75
  flex-direction: row;
76
- border-bottom: 1px solid rgba(255, 255, 255, 0.2);
76
+ border-bottom: 1px solid #e5e5e5;
77
77
  }
78
78
  &:last-child {
79
79
  border: 0;
@@ -1,5 +1,8 @@
1
1
  <template>
2
- <view class="ml-col" :class="[className || '', span && !width ? `span-${span}` : '', align ? `align-${align}` : '', verticalAling ? `vertical-${verticalAling}` : '', {'is-light': light, 'is-flex': verticalAling || flex,'is-fixed': width || shrink}]" :style="styles">
2
+ <view
3
+ class="ml-col"
4
+ :class="[className || '', span && !width ? `span-${span}` : '', align ? `align-${align}` : '', verticalAling ? `vertical-${verticalAling}` : '', {'is-light': light, 'is-flex': verticalAling || flex, 'is-fixed': width || shrink, 'is-important': important}]"
5
+ :style="styles">
3
6
  <slot></slot>
4
7
  </view>
5
8
  </template>
@@ -12,6 +15,7 @@ export default {
12
15
  },
13
16
  props: {
14
17
  span: [String, Number],
18
+ important: Boolean,
15
19
  light: Boolean,
16
20
  flex: Boolean,
17
21
  shrink: Boolean,
@@ -36,6 +40,10 @@ export default {
36
40
  &.is-light {
37
41
  color: rgba(0, 0, 0, 0.45);
38
42
  }
43
+ &.is-important {
44
+ padding-bottom: 10rpx;
45
+ font-size: 30rpx;
46
+ }
39
47
  &.is-flex {
40
48
  display: flex;
41
49
  flex-direction: row;
@@ -1,5 +1,5 @@
1
1
  <template>
2
- <text class="ml-dict-type" :class="[className || '', (status || showStatus) && selectStatus ? `status-${selectStatus}` : '', {'is-underline': underline}]">{{ selectLabel }}</text>
2
+ <text class="ml-dict-type" :class="[className || '', (status || showStatus) && selectStatus ? `status-${selectStatus}` : '', {'is-underline': underline, 'is-round': round}]">{{ selectLabel }}</text>
3
3
  </template>
4
4
 
5
5
  <script>
@@ -12,6 +12,7 @@ export default {
12
12
  value: [Number, String],
13
13
  options: Array,
14
14
  status: String,
15
+ round: Boolean,
15
16
  showStatus: Boolean,
16
17
  underline: Boolean,
17
18
  optionProps: Object,
@@ -19,14 +20,14 @@ export default {
19
20
  },
20
21
  computed: {
21
22
  selectItem () {
22
- const item = this.options ? this.options.find(item => item[this.optValueField] === this.value) : null
23
+ const item = this.options ? this.options.find(item => String(item[this.optValueField]) === String(this.value)) : null
23
24
  return item
24
25
  },
25
26
  selectLabel () {
26
27
  return this.selectItem ? this.selectItem[this.optLabelField] : this.value
27
28
  },
28
29
  selectStatus () {
29
- return this.status || this.selectItem[this.optStatusField]
30
+ return this.status || (this.selectItem ? this.selectItem[this.optStatusField] : null)
30
31
  },
31
32
  optOptions () {
32
33
  return Object.assign({}, this.optionProps)
@@ -50,20 +51,47 @@ export default {
50
51
  &.is-underline {
51
52
  text-decoration: underline;
52
53
  }
53
- &.status-primary {
54
- color: $uni-color-primary;
55
- }
56
- &.status-success {
57
- color: $uni-color-success;
58
- }
59
- &.status-info {
60
- color: #909399;
61
- }
62
- &.status-warning {
63
- color: $uni-color-warning;
54
+ &.is-round {
55
+ padding: 6rpx 16rpx;
56
+ border-radius: 10rpx;
57
+ font-size: 20rpx;
58
+ &.status-primary {
59
+ color: #ffffff;
60
+ background: $uni-color-primary;
61
+ }
62
+ &.status-success {
63
+ color: #ffffff;
64
+ background: $uni-color-success;
65
+ }
66
+ &.status-info {
67
+ color: #ffffff;
68
+ background: #909399;
69
+ }
70
+ &.status-warning {
71
+ color: #ffffff;
72
+ background: $uni-color-warning;
73
+ }
74
+ &.status-danger {
75
+ color: #ffffff;
76
+ background: $uni-color-error;
77
+ }
64
78
  }
65
- &.status-danger {
66
- color: $uni-color-error;
79
+ &:not(.is-round) {
80
+ &.status-primary {
81
+ color: $uni-color-primary;
82
+ }
83
+ &.status-success {
84
+ color: $uni-color-success;
85
+ }
86
+ &.status-info {
87
+ color: #909399;
88
+ }
89
+ &.status-warning {
90
+ color: $uni-color-warning;
91
+ }
92
+ &.status-danger {
93
+ color: $uni-color-error;
94
+ }
67
95
  }
68
96
  }
69
97
  </style>
@@ -60,7 +60,7 @@ export default {
60
60
  return this.options || []
61
61
  },
62
62
  selectLabel () {
63
- const item = this.optionList.find(item => item[this.optValueField] === this.value)
63
+ const item = this.optionList.find(item => String(item[this.optValueField]) === String(this.value))
64
64
  return item ? item[this.optLabelField] : this.value
65
65
  },
66
66
  optOptions () {
@@ -30,9 +30,9 @@ export default {
30
30
  .ml-status-tag {
31
31
  display: inline-block;
32
32
  color: #ffffff;
33
- padding: 6rpx 18rpx;
33
+ padding: 6rpx 16rpx;
34
34
  border-radius: 10rpx;
35
- font-size: 24rpx;
35
+ font-size: 20rpx;
36
36
  &.status-primary {
37
37
  background: $uni-color-primary;
38
38
  }
package/modal/toast.js CHANGED
@@ -5,7 +5,7 @@ const MaliToast = {
5
5
  title: option.content || '操作成功',
6
6
  icon: 'success',
7
7
  success () {
8
- setTimeout(resolve, 1500)
8
+ setTimeout(resolve, 2000)
9
9
  }
10
10
  })
11
11
  })
@@ -16,7 +16,7 @@ const MaliToast = {
16
16
  title: option.content || '操作失败',
17
17
  icon: 'error',
18
18
  success () {
19
- setTimeout(resolve, 1500)
19
+ setTimeout(resolve, 2000)
20
20
  }
21
21
  })
22
22
  })
@@ -25,7 +25,7 @@ const MaliToast = {
25
25
  return new Promise(resolve => {
26
26
  uni.hideToast({
27
27
  success () {
28
- setTimeout(resolve, 1500)
28
+ setTimeout(resolve, 2000)
29
29
  }
30
30
  })
31
31
  })
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mali-applet-ui",
3
- "version": "0.0.68",
3
+ "version": "0.0.70",
4
4
  "description": "码里云小程序组件库",
5
5
  "files": [
6
6
  "components",