mali-applet-ui 1.1.6 → 1.1.7

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.
@@ -101,6 +101,9 @@ export default {
101
101
  &.ss-pink {
102
102
  color: $ml-pink-color;
103
103
  }
104
+ &.ss-red {
105
+ color: $ml-red-color;
106
+ }
104
107
  &.ss-orange {
105
108
  color: $ml-orange-color;
106
109
  }
@@ -133,6 +133,9 @@ export default {
133
133
  &.ss-pink {
134
134
  color: $ml-pink-color;
135
135
  }
136
+ &.ss-red {
137
+ color: $ml-red-color;
138
+ }
136
139
  &.ss-orange {
137
140
  color: $ml-orange-color;
138
141
  }
@@ -215,6 +218,11 @@ export default {
215
218
  background: $ml-pink-color;
216
219
  border-color: $ml-pink-color;
217
220
  }
221
+ &.ss-red {
222
+ color: #ffffff;
223
+ background: $ml-red-color;
224
+ border-color: $ml-red-color;
225
+ }
218
226
  &.ss-orange {
219
227
  color: #ffffff;
220
228
  background: $ml-orange-color;
@@ -302,6 +302,9 @@ export default {
302
302
  &.ss-pink {
303
303
  background-color: $ml-pink-color;
304
304
  }
305
+ &.ss-red {
306
+ background-color: $ml-red-color;
307
+ }
305
308
  &.ss-orange {
306
309
  background-color: $ml-orange-color;
307
310
  }
@@ -158,6 +158,12 @@ export default {
158
158
  background: $ml-pink-color;
159
159
  }
160
160
  }
161
+ &.ss-red {
162
+ .ml-chunk-group-content {
163
+ color: #ffffff;
164
+ background: $ml-red-color;
165
+ }
166
+ }
161
167
  &.ss-orange {
162
168
  .ml-chunk-group-content {
163
169
  color: #ffffff;
@@ -117,6 +117,10 @@ export default {
117
117
  color: $ml-pink-color;
118
118
  border: 1px solid $ml-pink-color;
119
119
  }
120
+ &.ss-red {
121
+ color: $ml-red-color;
122
+ border: 1px solid $ml-red-color;
123
+ }
120
124
  &.ss-orange {
121
125
  color: $ml-orange-color;
122
126
  border: 1px solid $ml-orange-color;
@@ -201,6 +205,9 @@ export default {
201
205
  &.ss-pink {
202
206
  color: $ml-pink-color;
203
207
  }
208
+ &.ss-red {
209
+ color: $ml-red-color;
210
+ }
204
211
  &.ss-orange {
205
212
  color: $ml-orange-color;
206
213
  }
@@ -50,12 +50,6 @@ export default {
50
50
  showPulldown: Boolean,
51
51
  placeholder: String
52
52
  },
53
- inject: {
54
- layout: {
55
- from: '$pageLayout',
56
- default: null
57
- }
58
- },
59
53
  data () {
60
54
  return {
61
55
  searchName: '',
@@ -72,6 +72,9 @@ export default {
72
72
  &.ss-pink {
73
73
  background: $ml-pink-color;
74
74
  }
75
+ &.ss-red {
76
+ background: $ml-red-color;
77
+ }
75
78
  &.ss-orange {
76
79
  background: $ml-orange-color;
77
80
  }
@@ -96,6 +96,9 @@ export default {
96
96
  &.ss-pink {
97
97
  color: $ml-pink-color;
98
98
  }
99
+ &.ss-red {
100
+ color: $ml-red-color;
101
+ }
99
102
  &.ss-orange {
100
103
  color: $ml-orange-color;
101
104
  }
@@ -1,11 +1,15 @@
1
1
  <template>
2
2
  <view class="ml-list-item-title" @tap="tapEvent">
3
3
  <view class="ml-list-item-title-left">
4
- <text v-if="showSeq" class="ml-list-item-title-seq">{{ itemIndex + 1 }}</text>
5
- <text v-if="icon" class="ml-list-item-title-icon">
4
+ <view v-if="showSeq" class="ml-list-item-title-seq">{{ itemIndex + 1 }}</view>
5
+ <view v-if="icon" class="ml-list-item-title-icon">
6
6
  <ml-icon :name="icon" status="primary" />
7
- </text>
8
- <text class="ml-list-item-title-content">{{ currTitle }}</text>
7
+ </view>
8
+ <view class="ml-list-item-title-content">
9
+ <slot>
10
+ <view>{{ currTitle }}</view>
11
+ </slot>
12
+ </view>
9
13
  </view>
10
14
  <view class="ml-list-item-title-right">
11
15
  <slot name="extra"></slot>
@@ -249,6 +249,9 @@ export default {
249
249
  &.s-pink {
250
250
  background-color: $ml-pink-color;
251
251
  }
252
+ &.s-red {
253
+ background-color: $ml-red-color;
254
+ }
252
255
  &.s-orange {
253
256
  background-color: $ml-orange-color;
254
257
  }
@@ -66,6 +66,9 @@ export default {
66
66
  &.ss-pink {
67
67
  color: $ml-pink-color;
68
68
  }
69
+ &.ss-red {
70
+ color: $ml-red-color;
71
+ }
69
72
  &.ss-orange {
70
73
  color: $ml-orange-color;
71
74
  }
@@ -74,6 +74,10 @@ export default {
74
74
  color: $ml-pink-color;
75
75
  background: #ffeaec;
76
76
  }
77
+ &.ss-red {
78
+ color: $ml-red-color;
79
+ background: #ffeaec;
80
+ }
77
81
  &.ss-orange {
78
82
  color: $ml-orange-color;
79
83
  background: #ffedd6;
@@ -168,6 +168,9 @@ export default {
168
168
  &.s-pink {
169
169
  background-color: $ml-pink-color;
170
170
  }
171
+ &.s-red {
172
+ background-color: $ml-red-color;
173
+ }
171
174
  &.s-orange {
172
175
  background-color: $ml-orange-color;
173
176
  }
@@ -152,6 +152,9 @@ export default {
152
152
  &.s-pink {
153
153
  background-color: $ml-pink-color;
154
154
  }
155
+ &.s-red {
156
+ background-color: $ml-red-color;
157
+ }
155
158
  &.s-orange {
156
159
  background-color: $ml-orange-color;
157
160
  }
@@ -102,6 +102,9 @@ export default {
102
102
  &.ss-pink {
103
103
  color: $ml-pink-color;
104
104
  }
105
+ &.ss-red {
106
+ color: $ml-red-color;
107
+ }
105
108
  &.ss-orange {
106
109
  color: $ml-orange-color;
107
110
  }
@@ -45,7 +45,7 @@
45
45
  :info="getPrefixIcon(item)"
46
46
  />
47
47
  <view class="ml-tree-node__title" :class="{ 'hasExplain': item[useProps.explain] }" @tap.stop="handleIntoChildren(item)">
48
- <view class="nowrap">{{ item[useProps.label] || '' }}</view>
48
+ <view class="nowrap">{{ item[useProps.label] || '' }}<ml-text v-if="item.notEnabled" :status="item.notEnabledStatus || 'orange'">(未启用)</ml-text></view>
49
49
  <view class="ml-tree-node__explain" v-if="item[useProps.explain]">{{ item[useProps.explain] }}</view>
50
50
  </view>
51
51
  <view class="ml-tree-node__extra">
package/modal/toast.js CHANGED
@@ -25,6 +25,18 @@ const MaliToast = {
25
25
  })
26
26
  })
27
27
  },
28
+ warning (option) {
29
+ const opts = XEUtils.isString(option) ? { content: option } : (option || {})
30
+ return new Promise(resolve => {
31
+ uni.showToast({
32
+ title: opts.content || '操作失败',
33
+ icon: 'error',
34
+ success () {
35
+ setTimeout(resolve, 2000)
36
+ }
37
+ })
38
+ })
39
+ },
28
40
  hide () {
29
41
  return new Promise(resolve => {
30
42
  uni.hideLoading()
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mali-applet-ui",
3
- "version": "1.1.6",
3
+ "version": "1.1.7",
4
4
  "description": "vue2 码里云小程序组件库",
5
5
  "files": [
6
6
  "lib",
@@ -27,6 +27,7 @@ $ml-gray-color: #F0F2F5 !default;
27
27
  $ml-blue-color: #246BFD !default;
28
28
  $ml-green-color: #00D35C !default;
29
29
  $ml-pink-color: #FF5064 !default;
30
+ $ml-red-color: #FF5064 !default;
30
31
  $ml-orange-color: #FF9C00 !default;
31
32
  $ml-purple-color: #9747FF !default;
32
33
  $ml-dark-blue-color: #5e7092 !default;
package/types/toast.d.ts CHANGED
@@ -1,9 +1,10 @@
1
+ export interface MlToastOptions {
2
+ content?: string
3
+ }
4
+
1
5
  export const MaliToast: {
2
- success(options?: string | {
3
- content?: string
4
- }): Promise<void>
5
- error(options?: string | {
6
- content?: string
7
- }): Promise<void>
6
+ success(options?: string | MlToastOptions): Promise<void>
7
+ error(options?: string | MlToastOptions): Promise<void>
8
+ warning(options?: string | MlToastOptions): Promise<void>
8
9
  hide(): Promise<void>
9
10
  }