mali-applet-ui 0.0.66 → 0.0.69
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,5 +1,8 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<view
|
|
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
|
-
&.
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
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
|
-
|
|
66
|
-
|
|
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
|
|
33
|
+
padding: 6rpx 16rpx;
|
|
34
34
|
border-radius: 10rpx;
|
|
35
|
-
font-size:
|
|
35
|
+
font-size: 20rpx;
|
|
36
36
|
&.status-primary {
|
|
37
37
|
background: $uni-color-primary;
|
|
38
38
|
}
|
package/modal/toast.js
CHANGED