uview-plus 3.1.49 → 3.1.51
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/changelog.md +5 -0
- package/components/u-button/vue.scss +8 -7
- package/components/u-datetime-picker/props.js +1 -1
- package/components/u-datetime-picker/u-datetime-picker.vue +38 -2
- package/components/u-qrcode/qrcode.js +1206 -0
- package/components/u-qrcode/u-qrcode.vue +199 -0
- package/components/u-subsection/u-subsection.vue +2 -2
- package/components/u-tooltip/u-tooltip.vue +0 -28
- package/package.json +3 -2
package/changelog.md
CHANGED
|
@@ -14,13 +14,14 @@ $u-button-plain-u-button-success-color:$u-success;
|
|
|
14
14
|
$u-button-plain-u-button-error-color:$u-error;
|
|
15
15
|
$u-button-plain-u-button-warning-color:$u-error;
|
|
16
16
|
|
|
17
|
-
.u-button {
|
|
18
|
-
width: 100%;
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
17
|
+
.u-button {
|
|
18
|
+
width: 100%;
|
|
19
|
+
white-space: nowrap;
|
|
20
|
+
|
|
21
|
+
&__text {
|
|
22
|
+
white-space: nowrap;
|
|
23
|
+
line-height: 1;
|
|
24
|
+
}
|
|
24
25
|
|
|
25
26
|
&:before {
|
|
26
27
|
position: absolute;
|
|
@@ -99,7 +99,7 @@
|
|
|
99
99
|
// #ifdef VUE3
|
|
100
100
|
modelValue(newValue) {
|
|
101
101
|
this.init()
|
|
102
|
-
|
|
102
|
+
this.getInputValue()
|
|
103
103
|
},
|
|
104
104
|
// #endif
|
|
105
105
|
// #ifdef VUE2
|
|
@@ -124,6 +124,34 @@
|
|
|
124
124
|
emits: ['close', 'cancel', 'confirm', 'change', 'update:modelValue'],
|
|
125
125
|
// #endif
|
|
126
126
|
methods: {
|
|
127
|
+
getInputValue(newValue) {
|
|
128
|
+
if (this.mode == 'time') {
|
|
129
|
+
this.inputValue = newValue
|
|
130
|
+
} else {
|
|
131
|
+
if (this.format) {
|
|
132
|
+
this.inputValue = dayjs(newValue).format(this.format)
|
|
133
|
+
} else {
|
|
134
|
+
let format = ''
|
|
135
|
+
switch (this.mode) {
|
|
136
|
+
case 'date':
|
|
137
|
+
format = 'YYYY-MM-DD'
|
|
138
|
+
break;
|
|
139
|
+
case 'year-month':
|
|
140
|
+
format = 'YYYY-MM'
|
|
141
|
+
break;
|
|
142
|
+
case 'datetime':
|
|
143
|
+
format = 'YYYY-MM-DD HH:mm'
|
|
144
|
+
break;
|
|
145
|
+
case 'time':
|
|
146
|
+
format = 'HH:mm'
|
|
147
|
+
break;
|
|
148
|
+
default:
|
|
149
|
+
break;
|
|
150
|
+
}
|
|
151
|
+
this.inputValue = dayjs(newValue).format(format)
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
},
|
|
127
155
|
init() {
|
|
128
156
|
// #ifdef VUE3
|
|
129
157
|
this.innerValue = this.correctValue(this.modelValue)
|
|
@@ -156,7 +184,7 @@
|
|
|
156
184
|
value: this.innerValue,
|
|
157
185
|
mode: this.mode
|
|
158
186
|
})
|
|
159
|
-
|
|
187
|
+
|
|
160
188
|
// #ifdef VUE3
|
|
161
189
|
this.$emit('update:modelValue', this.innerValue)
|
|
162
190
|
// #endif
|
|
@@ -164,6 +192,7 @@
|
|
|
164
192
|
this.$emit('input', this.innerValue)
|
|
165
193
|
// #endif
|
|
166
194
|
if (this.hasInput) {
|
|
195
|
+
this.getInputValue(this.innerValue)
|
|
167
196
|
this.showByClickInput = false
|
|
168
197
|
}
|
|
169
198
|
},
|
|
@@ -287,6 +316,13 @@
|
|
|
287
316
|
// 进行过滤
|
|
288
317
|
if (this.filter) {
|
|
289
318
|
values = this.filter(type, values)
|
|
319
|
+
if (!values || (values && values.length == 0)) {
|
|
320
|
+
uni.showToast({
|
|
321
|
+
title: '日期filter结果不能为空',
|
|
322
|
+
icon: 'error',
|
|
323
|
+
mask: true
|
|
324
|
+
})
|
|
325
|
+
}
|
|
290
326
|
}
|
|
291
327
|
return { type, values }
|
|
292
328
|
})
|