mali-applet-ui 0.1.74 → 0.1.76
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.
- package/components/ml-checkbox/ml-checkbox.vue +4 -1
- package/components/ml-drawer/ml-drawer.vue +5 -0
- package/components/ml-input/ml-input.vue +4 -0
- package/components/ml-list-group/ml-list-group.vue +2 -0
- package/components/ml-list-menu-group/ml-list-menu-group.vue +2 -0
- package/components/ml-textarea/ml-textarea.vue +9 -1
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<view class="ml-checkbox" :class="[className || '', {'is-vertical': vertical, 'is-checked': checked, 'is-disabled': disabled}]" @tap="tapEvent">
|
|
2
|
+
<view class="ml-checkbox" :class="[className || '', {'is-vertical': vertical, 'is-checked': checked, 'is-half': indeterminate, 'is-disabled': disabled}]" @tap="tapEvent">
|
|
3
3
|
<view class="ml-checkbox-icon">
|
|
4
4
|
<ml-icon :name="checked ? 'checkbox-checked' : (indeterminate ? 'checkbox-indeterminate' : 'checkbox-unchecked')"></ml-icon>
|
|
5
5
|
</view>
|
|
@@ -64,6 +64,9 @@ export default {
|
|
|
64
64
|
&.is-checked {
|
|
65
65
|
color: $uni-color-primary;
|
|
66
66
|
}
|
|
67
|
+
&.is-half {
|
|
68
|
+
color: $uni-color-primary;
|
|
69
|
+
}
|
|
67
70
|
&.is-disabled {
|
|
68
71
|
color: rgba(0,0,0,0.25);
|
|
69
72
|
}
|
|
@@ -178,7 +178,11 @@ export default {
|
|
|
178
178
|
transition: transform 0.25s ease, transform 0.3s ease;
|
|
179
179
|
}
|
|
180
180
|
.ml-drawer-header {
|
|
181
|
+
display: flex;
|
|
182
|
+
flex-direction: row;
|
|
183
|
+
align-items: center;
|
|
181
184
|
padding: 10rpx 20rpx;
|
|
185
|
+
min-height: 80rpx;
|
|
182
186
|
}
|
|
183
187
|
.ml-drawer-header-title {
|
|
184
188
|
text-align: center;
|
|
@@ -197,6 +201,7 @@ export default {
|
|
|
197
201
|
.ml-drawer-footer {
|
|
198
202
|
display: flex;
|
|
199
203
|
flex-direction: row;
|
|
204
|
+
align-items: center;
|
|
200
205
|
padding: 20rpx;
|
|
201
206
|
}
|
|
202
207
|
}
|
|
@@ -17,6 +17,7 @@
|
|
|
17
17
|
:maxlength="maxlength"
|
|
18
18
|
:disabled="disabled"
|
|
19
19
|
@input="inputEvent"
|
|
20
|
+
@focus="focusEvent"
|
|
20
21
|
@blur="blurEvent"
|
|
21
22
|
@confirm="confirmEvent"/>
|
|
22
23
|
<view v-if="clearable && !disabled && inpVal" class="ml-input-clear-icon" @click.stop="clearEvent">
|
|
@@ -87,6 +88,9 @@ export default {
|
|
|
87
88
|
this.$emit('input', value)
|
|
88
89
|
this.$emit('change', { value })
|
|
89
90
|
},
|
|
91
|
+
focusEvent () {
|
|
92
|
+
this.$emit('focus', { value: this.inpVal })
|
|
93
|
+
},
|
|
90
94
|
blurEvent () {
|
|
91
95
|
this.$emit('blur', { value: this.inpVal })
|
|
92
96
|
},
|
|
@@ -227,8 +227,10 @@ export default {
|
|
|
227
227
|
const { value: label } = params
|
|
228
228
|
if (this.type === 'checkbox') {
|
|
229
229
|
this.toggleCheckboxRow(label)
|
|
230
|
+
this.$emit('checkbox-change', {})
|
|
230
231
|
} else if (this.type === 'radio') {
|
|
231
232
|
this.setRadioRow(label)
|
|
233
|
+
this.$emit('radio-change', {})
|
|
232
234
|
}
|
|
233
235
|
}
|
|
234
236
|
}
|
|
@@ -122,8 +122,10 @@ export default {
|
|
|
122
122
|
const { value: label } = params
|
|
123
123
|
if (this.type === 'checkbox') {
|
|
124
124
|
this.toggleCheckboxRow(label)
|
|
125
|
+
this.$emit('checkbox-change', {})
|
|
125
126
|
} else if (this.type === 'radio') {
|
|
126
127
|
this.setRadioRow(label)
|
|
128
|
+
this.$emit('radio-change', {})
|
|
127
129
|
}
|
|
128
130
|
}
|
|
129
131
|
}
|
|
@@ -14,6 +14,8 @@
|
|
|
14
14
|
:disabled="disabled"
|
|
15
15
|
:show-count="false"
|
|
16
16
|
@input="inputEvent"
|
|
17
|
+
@focus="focusEvent"
|
|
18
|
+
@blur="blurEvent"
|
|
17
19
|
:style="{color: fontColor, height: `${rows * 30}rpx`}" />
|
|
18
20
|
<view v-if="showWordLimit && !disabled" class="ml-textarea-word-count">
|
|
19
21
|
<!-- <VoiceInput v-if="showVoice" v-model="inpVal" @input="inputEvent"></VoiceInput> -->
|
|
@@ -97,7 +99,13 @@ export default {
|
|
|
97
99
|
}
|
|
98
100
|
this.$emit('input', value)
|
|
99
101
|
this.$emit('change', { value })
|
|
100
|
-
}
|
|
102
|
+
},
|
|
103
|
+
focusEvent () {
|
|
104
|
+
this.$emit('focus', { value: this.inpVal })
|
|
105
|
+
},
|
|
106
|
+
blurEvent () {
|
|
107
|
+
this.$emit('blur', { value: this.inpVal })
|
|
108
|
+
}
|
|
101
109
|
}
|
|
102
110
|
}
|
|
103
111
|
</script>
|