mali-applet-ui 0.2.42 → 0.2.44
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.
|
@@ -1,7 +1,15 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<
|
|
3
|
-
<
|
|
4
|
-
|
|
2
|
+
<view class="ml-dict-type" :class="[className || '', (status || showStatus) && selectStatus ? `ss-${selectStatus}` : '', {'is-underline': underline, 'is-border': border, 'is-round': round}]">
|
|
3
|
+
<view v-if="prefixIcon && prefixIcon !== 'none'" class="ml-dict-type-left-icon">
|
|
4
|
+
<ml-icon :className="prefixIcon"></ml-icon>
|
|
5
|
+
</view>
|
|
6
|
+
<view class="ml-dict-type-content">
|
|
7
|
+
<slot>{{ selectLabel }}</slot>
|
|
8
|
+
</view>
|
|
9
|
+
<view v-if="suffixIcon && suffixIcon !== 'none'" class="ml-dict-type-right-icon">
|
|
10
|
+
<ml-icon :className="suffixIcon"></ml-icon>
|
|
11
|
+
</view>
|
|
12
|
+
</view>
|
|
5
13
|
</template>
|
|
6
14
|
|
|
7
15
|
<script>
|
|
@@ -18,6 +26,8 @@ export default {
|
|
|
18
26
|
status: String,
|
|
19
27
|
round: Boolean,
|
|
20
28
|
border: Boolean,
|
|
29
|
+
prefixIcon: String,
|
|
30
|
+
suffixIcon: String,
|
|
21
31
|
showStatus: Boolean,
|
|
22
32
|
underline: Boolean,
|
|
23
33
|
optionProps: Object,
|
|
@@ -52,6 +62,7 @@ export default {
|
|
|
52
62
|
|
|
53
63
|
<style lang="scss">
|
|
54
64
|
.ml-dict-type {
|
|
65
|
+
display: inline-block;
|
|
55
66
|
padding: 0 4rpx;
|
|
56
67
|
&+.ml-dict-type {
|
|
57
68
|
margin-left: 20rpx;
|
|
@@ -190,5 +201,10 @@ export default {
|
|
|
190
201
|
color: $ml-purple-color;
|
|
191
202
|
}
|
|
192
203
|
}
|
|
204
|
+
.ml-dict-type-left-icon,
|
|
205
|
+
.ml-dict-type-right-icon,
|
|
206
|
+
.ml-dict-type-content {
|
|
207
|
+
display: inline;
|
|
208
|
+
}
|
|
193
209
|
}
|
|
194
210
|
</style>
|
|
@@ -134,6 +134,14 @@ export default {
|
|
|
134
134
|
this.$emit('input', value)
|
|
135
135
|
return { status: false, value: value }
|
|
136
136
|
}
|
|
137
|
+
if (this.minNum !== null && (numVal < this.minNum)) {
|
|
138
|
+
this.$emit('input', this.minNum)
|
|
139
|
+
return { status: false, value: this.minNum }
|
|
140
|
+
}
|
|
141
|
+
if (this.maxNum !== null && (numVal > this.maxNum)) {
|
|
142
|
+
this.$emit('input', this.maxNum)
|
|
143
|
+
return { status: false, value: this.maxNum }
|
|
144
|
+
}
|
|
137
145
|
if (`${numVal}` !== this.inpVal) {
|
|
138
146
|
this.$emit('input', numVal)
|
|
139
147
|
return { status: false, value: numVal }
|
|
@@ -1,8 +1,14 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<view class="ml-status-tag" :class="[className, status ? `ss-${status}` : '']" :style="styles">
|
|
3
|
-
<
|
|
4
|
-
<
|
|
5
|
-
</
|
|
2
|
+
<view class="ml-status-tag" :class="[className || '', status ? `ss-${status}` : '']" :style="styles">
|
|
3
|
+
<view v-if="prefixIcon && prefixIcon !== 'none'" class="ml-status-tag-left-icon">
|
|
4
|
+
<ml-icon :className="prefixIcon"></ml-icon>
|
|
5
|
+
</view>
|
|
6
|
+
<view class="ml-status-tag-content">
|
|
7
|
+
<slot>{{ content }}</slot>
|
|
8
|
+
</view>
|
|
9
|
+
<view v-if="suffixIcon && suffixIcon !== 'none'" class="ml-status-tag-right-icon">
|
|
10
|
+
<ml-icon :className="suffixIcon"></ml-icon>
|
|
11
|
+
</view>
|
|
6
12
|
</view>
|
|
7
13
|
</template>
|
|
8
14
|
|
|
@@ -16,6 +22,8 @@ export default {
|
|
|
16
22
|
color: String,
|
|
17
23
|
content: String,
|
|
18
24
|
status: String,
|
|
25
|
+
prefixIcon: String,
|
|
26
|
+
suffixIcon: String,
|
|
19
27
|
className: String
|
|
20
28
|
},
|
|
21
29
|
computed: {
|
|
@@ -66,5 +74,10 @@ export default {
|
|
|
66
74
|
&.ss-purple {
|
|
67
75
|
background: $ml-purple-color;
|
|
68
76
|
}
|
|
77
|
+
.ml-status-tag-left-icon,
|
|
78
|
+
.ml-status-tag-right-icon,
|
|
79
|
+
.ml-status-tag-content {
|
|
80
|
+
display: inline;
|
|
81
|
+
}
|
|
69
82
|
}
|
|
70
83
|
</style>
|