mali-applet-ui 0.1.34 → 0.1.36

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.
Files changed (27) hide show
  1. package/components/ml-amount-input/ml-amount-input.vue +1 -1
  2. package/components/ml-approval-record/ml-approval-record.vue +3 -3
  3. package/components/ml-approval-select/ml-approval-select.vue +2 -2
  4. package/components/ml-approval-type/ml-approval-type.vue +1 -1
  5. package/components/ml-button/ml-button.vue +1 -1
  6. package/components/ml-cascader-picker/ml-cascader-picker.vue +1 -1
  7. package/components/ml-checkbox-button/ml-checkbox-button.vue +1 -1
  8. package/components/ml-chunk-group/ml-chunk-group.vue +2 -2
  9. package/components/ml-dict-type/ml-dict-type.vue +2 -2
  10. package/components/ml-form-group/ml-form-group.vue +1 -1
  11. package/components/ml-input/ml-input.vue +6 -6
  12. package/components/ml-list-group/ml-list-group.vue +3 -1
  13. package/components/ml-list-item/ml-list-item.vue +1 -1
  14. package/components/ml-month-picker/ml-month-picker.vue +1 -1
  15. package/components/ml-number-input/ml-number-input.vue +1 -1
  16. package/components/ml-popup/ml-popup.vue +1 -1
  17. package/components/ml-province-city-picker/ml-province-city-picker.vue +2 -2
  18. package/components/ml-radio-button/ml-radio-button.vue +1 -1
  19. package/components/ml-select-picker/ml-select-picker.vue +2 -2
  20. package/components/ml-status-tag/ml-status-tag.vue +1 -1
  21. package/components/ml-tabbar/ml-tabbar.vue +2 -2
  22. package/components/ml-textarea/ml-textarea.vue +1 -1
  23. package/components/ml-upload/ml-upload.vue +1 -1
  24. package/components/ml-year-picker/ml-year-picker.vue +1 -1
  25. package/package.json +1 -1
  26. package/storage/index.js +18 -25
  27. package/theme.scss +13 -2
@@ -188,7 +188,7 @@ export default {
188
188
  &.is-border {
189
189
  .ml-amount-input-inp {
190
190
  border: 1px solid #e5e5e5;
191
- border-radius: 10rpx;
191
+ border-radius: $ml-border-radius;
192
192
  }
193
193
  }
194
194
  .ml-amount-tip {
@@ -85,7 +85,7 @@ export default {
85
85
  .ml-approval-record {
86
86
  background: #ffffff;
87
87
  padding: 20rpx;
88
- border-radius: 10rpx;
88
+ border-radius: $ml-border-radius;
89
89
  font-size: 30rpx;
90
90
  }
91
91
  .ml-approval-record-header-title {
@@ -94,7 +94,7 @@ export default {
94
94
  }
95
95
  .ml-approval-record-list {
96
96
  position: relative;
97
- padding-bottom: 10rpx;
97
+ padding-bottom: $ml-border-radius;
98
98
  .ml-approval-record-flow-line {
99
99
  position: absolute;
100
100
  top: 0;
@@ -183,7 +183,7 @@ export default {
183
183
  padding: 20rpx;
184
184
  background: #F0F2F5;
185
185
  height: 160rpx;
186
- border-radius: 10rpx;
186
+ border-radius: $ml-border-radius;
187
187
  overflow: auto;
188
188
  }
189
189
  }
@@ -74,7 +74,7 @@ export default {
74
74
  .ml-approval-select {
75
75
  background: #ffffff;
76
76
  padding: 20rpx;
77
- border-radius: 10rpx;
77
+ border-radius: $ml-border-radius;
78
78
  font-size: 30rpx;
79
79
  }
80
80
  .ml-approval-select-header-title {
@@ -83,7 +83,7 @@ export default {
83
83
  }
84
84
  .ml-approval-select-list {
85
85
  position: relative;
86
- padding-bottom: 10rpx;
86
+ padding-bottom: $ml-border-radius;
87
87
  .ml-approval-select-flow-line {
88
88
  position: absolute;
89
89
  top: 0;
@@ -38,7 +38,7 @@ export default {
38
38
  display: inline-block;
39
39
  color: #ffffff;
40
40
  padding: 4rpx 16rpx;
41
- border-radius: 10rpx;
41
+ border-radius: $ml-border-radius;
42
42
  font-size: 24rpx;
43
43
  }
44
44
  </style>
@@ -87,7 +87,7 @@ export default {
87
87
  height: 80rpx;
88
88
  line-height: 80rpx;
89
89
  border: 1px solid #e5e5e5;
90
- border-radius: 10rpx;
90
+ border-radius: $ml-border-radius;
91
91
  font-size: 30rpx;
92
92
  &+.ml-button {
93
93
  margin-left: 20rpx;
@@ -199,7 +199,7 @@ export default {
199
199
  align-items: center;
200
200
  padding: 0 20rpx;
201
201
  height: 70rpx;
202
- border-radius: 10rpx;
202
+ border-radius: $ml-border-radius;
203
203
  .ml-cascader-picker-text {
204
204
  flex-grow: 1;
205
205
  padding-right: 10rpx;
@@ -39,7 +39,7 @@ export default {
39
39
  padding: 0 24rpx;
40
40
  height: 60rpx;
41
41
  line-height: 60rpx;
42
- border-radius: 10rpx;
42
+ border-radius: $ml-border-radius;
43
43
  & + .ml-checkbox-button-item {
44
44
  margin-left: 20rpx;
45
45
  }
@@ -41,7 +41,7 @@ export default {
41
41
  <style lang="scss">
42
42
  .ml-chunk-group {
43
43
  display: block;
44
- border-radius: 10rpx;
44
+ border-radius: $ml-border-radius;
45
45
  background: #ffffff;
46
46
  margin-bottom: 20rpx;
47
47
  .ml-chunk-group-title {
@@ -59,7 +59,7 @@ export default {
59
59
  .ml-chunk-group-content {
60
60
  display: flex;
61
61
  flex-direction: row;
62
- border-radius: 10rpx;
62
+ border-radius: $ml-border-radius;
63
63
  }
64
64
  &.is-header {
65
65
  .ml-chunk-group-body {
@@ -59,7 +59,7 @@ export default {
59
59
  }
60
60
  &.is-border {
61
61
  padding: 6rpx 16rpx;
62
- border-radius: 10rpx;
62
+ border-radius: $ml-border-radius;
63
63
  font-size: 20rpx;
64
64
  &.status-primary {
65
65
  color: $uni-color-primary;
@@ -84,7 +84,7 @@ export default {
84
84
  }
85
85
  &.is-round {
86
86
  padding: 6rpx 16rpx;
87
- border-radius: 10rpx;
87
+ border-radius: $ml-border-radius;
88
88
  font-size: 20rpx;
89
89
  &.status-primary {
90
90
  color: #ffffff;
@@ -26,7 +26,7 @@ export default {
26
26
 
27
27
  <style lang="scss">
28
28
  .ml-form-group {
29
- border-radius: 10rpx;
29
+ border-radius: $ml-border-radius;
30
30
  background: #ffffff;
31
31
  margin-bottom: 20rpx;
32
32
  .ml-form-group-title {
@@ -125,7 +125,7 @@ export default {
125
125
  justify-content: center;
126
126
  background: #fff;
127
127
  color: #c0c4cc;
128
- border-radius: 0 10rpx 10rpx 0;
128
+ border-radius: 0 $ml-border-radius $ml-border-radius 0;
129
129
  }
130
130
  .ml-input-prefix-icon,
131
131
  .ml-input-suffix-icon {
@@ -159,16 +159,16 @@ export default {
159
159
  }
160
160
  .ml-input-inp {
161
161
  border: 1px solid #e5e5e5;
162
- border-radius: 10rpx;
162
+ border-radius: $ml-border-radius;
163
163
  }
164
164
  }
165
165
  &.is-prefix {
166
166
  .ml-input-prefix-icon {
167
- border-radius: 10rpx 0 0 10rpx;
167
+ border-radius: $ml-border-radius 0 0 $ml-border-radius;
168
168
  }
169
169
  .ml-input-inp {
170
170
  border-left: 0;
171
- border-radius: 0 10rpx 10rpx 0;
171
+ border-radius: 0 $ml-border-radius $ml-border-radius 0;
172
172
  }
173
173
  }
174
174
  &.is-suffix {
@@ -177,11 +177,11 @@ export default {
177
177
  border-right: 0;
178
178
  }
179
179
  .ml-input-suffix-icon {
180
- border-radius: 0 10rpx 10rpx 0;
180
+ border-radius: 0 $ml-border-radius $ml-border-radius 0;
181
181
  }
182
182
  .ml-input-inp {
183
183
  border-right: 0;
184
- border-radius: 10rpx 0 0 10rpx;
184
+ border-radius: $ml-border-radius 0 0 $ml-border-radius;
185
185
  }
186
186
  }
187
187
  &.is-clear {
@@ -4,7 +4,9 @@
4
4
  <scroll-view scroll-y>
5
5
  <slot></slot>
6
6
  </scroll-view>
7
- <uni-load-more v-if="showPage" :status="loadStatus"></uni-load-more>
7
+ <view v-if="showPage" :class="{a: loadStatus}">
8
+ <view v-if="loadStatus === 'loading'">loadStatus</view>
9
+ </view>
8
10
  </view>
9
11
  </view>
10
12
  </template>
@@ -75,7 +75,7 @@ export default {
75
75
  flex-direction: row;
76
76
  padding: 20rpx;
77
77
  margin-bottom: 20rpx;
78
- border-radius: 10rpx;
78
+ border-radius: $ml-border-radius;
79
79
  background: #ffffff;
80
80
  &:last-child {
81
81
  margin-bottom: 0;
@@ -48,7 +48,7 @@ export default {
48
48
  align-items: center;
49
49
  padding: 0 10rpx;
50
50
  height: 70rpx;
51
- border-radius: 10rpx;
51
+ border-radius: $ml-border-radius;
52
52
  &.is-border {
53
53
  border: 1px solid #e5e5e5;
54
54
  }
@@ -96,7 +96,7 @@ export default {
96
96
  }
97
97
  &.is-border {
98
98
  border: 1px solid #e5e5e5;
99
- border-radius: 10rpx;
99
+ border-radius: $ml-border-radius;
100
100
  }
101
101
  }
102
102
  </style>
@@ -133,7 +133,7 @@ export default {
133
133
  position: fixed;
134
134
  top: 0;
135
135
  left: 0;
136
- width: $page-full-width;
136
+ width: $ml-page-full-width;
137
137
  height: 100vh;
138
138
  z-index: 999;
139
139
  background-color: rgba(0, 0, 0, 0.4);
@@ -165,7 +165,7 @@ export default {
165
165
  align-items: center;
166
166
  padding: 0 20rpx;
167
167
  height: 70rpx;
168
- border-radius: 10rpx;
168
+ border-radius: $ml-border-radius;
169
169
  .ml-province-city-picker-text {
170
170
  flex-grow: 1;
171
171
  padding-right: 10rpx;
@@ -181,7 +181,7 @@ export default {
181
181
  justify-content: center;
182
182
  background: #fff;
183
183
  color: #c0c4cc;
184
- border-radius: 0 10rpx 10rpx 0;
184
+ border-radius: 0 $ml-border-radius $ml-border-radius 0;
185
185
  }
186
186
  .ml-province-city-picker-icon {
187
187
  width: 34rpx;
@@ -35,7 +35,7 @@ export default {
35
35
  padding: 0 24rpx;
36
36
  height: 60rpx;
37
37
  line-height: 60rpx;
38
- border-radius: 10rpx;
38
+ border-radius: $ml-border-radius;
39
39
  & + .ml-radio-button-item {
40
40
  margin-left: 20rpx;
41
41
  }
@@ -127,7 +127,7 @@ export default {
127
127
  align-items: center;
128
128
  padding: 0 20rpx;
129
129
  height: 70rpx;
130
- border-radius: 10rpx;
130
+ border-radius: $ml-border-radius;
131
131
  &.is-border {
132
132
  border: 1px solid #e5e5e5;
133
133
  background: #fff;
@@ -148,7 +148,7 @@ export default {
148
148
  justify-content: center;
149
149
  background: #fff;
150
150
  color: #c0c4cc;
151
- border-radius: 0 10rpx 10rpx 0;
151
+ border-radius: 0 $ml-border-radius $ml-border-radius 0;
152
152
  }
153
153
  .ml-select-picker-icon {
154
154
  width: 60rpx;
@@ -31,7 +31,7 @@ export default {
31
31
  display: inline-block;
32
32
  color: #ffffff;
33
33
  padding: 6rpx 16rpx;
34
- border-radius: 10rpx;
34
+ border-radius: $ml-border-radius;
35
35
  font-size: 20rpx;
36
36
  &.status-primary {
37
37
  background: $uni-color-primary;
@@ -63,7 +63,7 @@ export default {
63
63
  .ml-tabbar {
64
64
  display: flex;
65
65
  flex-direction: row;
66
- width: $page-full-width;
66
+ width: $ml-page-full-width;
67
67
  position: fixed;
68
68
  left: 0;
69
69
  bottom: 0;
@@ -95,7 +95,7 @@ export default {
95
95
  display: inline-block;
96
96
  min-width: 30rpx;
97
97
  text-align: center;
98
- font-size: 22rpx;
98
+ font-size: 20rpx;
99
99
  line-height: 32rpx;
100
100
  }
101
101
  .ml-tabbar-icon {
@@ -111,7 +111,7 @@ export default {
111
111
  background: #fff;
112
112
  &.is-border {
113
113
  border: 1px solid #e5e5e5;
114
- border-radius: 10rpx;
114
+ border-radius: $ml-border-radius;
115
115
  }
116
116
  .ml-textarea-readonly-content {
117
117
  padding: 0;
@@ -386,7 +386,7 @@ export default {
386
386
  border: 1rpx solid rgba(39, 42, 48, 0.0200);
387
387
  background-color: rgba(39, 42, 48, 0.0200);
388
388
  margin: 10rpx 0;
389
- border-radius: 8rpx;
389
+ border-radius: $ml-border-radius;
390
390
  padding: 20rpx;
391
391
  }
392
392
  .ml-upload-file-name {
@@ -48,7 +48,7 @@ export default {
48
48
  align-items: center;
49
49
  padding: 0 10rpx;
50
50
  height: 70rpx;
51
- border-radius: 10rpx;
51
+ border-radius: $ml-border-radius;
52
52
  &.is-border {
53
53
  border: 1px solid #e5e5e5;
54
54
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mali-applet-ui",
3
- "version": "0.1.34",
3
+ "version": "0.1.36",
4
4
  "description": "码里云小程序组件库",
5
5
  "files": [
6
6
  "components",
package/storage/index.js CHANGED
@@ -1,35 +1,28 @@
1
1
  import XEUtils from 'xe-utils'
2
2
 
3
- export function setStorage(keyValue, value) {
4
- if (XEUtils.isObject(keyValue)) {
5
- for (let key in keyValue) {
6
- uni.setStorageSync(key, keyValue[key]);
7
- }
8
- } else if (XEUtils.isString(keyValue)) {
9
- uni.setStorageSync(keyValue, value);
3
+ export function setStorage(key, value, options = {}) {
4
+ const opts = { ...options }
5
+ const data = {
6
+ data: value,
7
+ expires: XEUtils.eqNull(opts.expires) ? null : XEUtils.toNumber(opts.expires)
10
8
  }
9
+ uni.setStorageSync(key, JSON.stringify(data));
11
10
  }
12
11
 
13
- export function removeStorage(keyValue) {
14
- if (XEUtils.isObject(keyValue)) {
15
- for (let key in keyValue) {
16
- uni.removeStorageSync(key);
17
- }
18
- } else if (XEUtils.isString(keyValue)) {
19
- uni.removeStorageSync(keyValue);
20
- }
12
+ export function removeStorage(key) {
13
+ uni.removeStorageSync(key);
21
14
  }
22
15
 
23
- export function getStorage(keyValue) {
24
- if (XEUtils.isArray(keyValue)) {
25
- let data = {}
26
- keyValue.map(key => {
27
- data[key] = uni.getStorageSync(key)
28
- })
29
- return data
30
- } else if (XEUtils.isString(keyValue)) {
31
- return uni.getStorageSync(keyValue)
32
- }
16
+ export function getStorage(key) {
17
+ try {
18
+ const data = uni.getStorageSync(key)
19
+ if (data) {
20
+ const rest = JSON.parse(data)
21
+ if (rest.data && (XEUtils.eqNull(rest.expires) || rest.expires >= Date.now())) {
22
+ return rest.data
23
+ }
24
+ }
25
+ } catch (e) {}
33
26
  return null
34
27
  }
35
28
 
package/theme.scss CHANGED
@@ -1,4 +1,15 @@
1
- $page-full-width: 100vw;
1
+ // 页面宽度
2
+ $ml-page-full-width: 100vw;
2
3
  // #ifdef H5
3
- $page-full-width: 1200px;
4
+ $ml-page-full-width: 1200px;
4
5
  // #endif
6
+
7
+ // 全局色调
8
+ $ml-gray-color: #F0F2F5;
9
+ $ml-blue-color: #246BFD;
10
+ $ml-green-color: #00D35C;
11
+ $ml-red-color: #FF5064;
12
+ $ml-orange-color: #FF9C00;
13
+
14
+ // 边框圆角
15
+ $ml-border-radius: 8rpx;