File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
uview-ui/components/u-input Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -300,19 +300,20 @@ export default {
300
300
handleBlur (event ) {
301
301
// 最开始使用的是监听图标@touchstart事件,自从hx2.8.4后,此方法在微信小程序出错
302
302
// 这里改为监听点击事件,手点击清除图标时,同时也发生了@blur事件,导致图标消失而无法点击,这里做一个延时
303
+ let value = event .detail .value ;
303
304
setTimeout (() => {
304
305
this .focused = false ;
305
306
}, 100 )
306
307
// vue 原生的方法 return 出去
307
- this .$emit (' blur' , event . detail . value );
308
+ this .$emit (' blur' , value);
308
309
setTimeout (() => {
309
310
// 头条小程序由于自身bug,导致中文下,每按下一个键(尚未完成输入),都会触发一次@input,导致错误,这里进行判断处理
310
311
// #ifdef MP-TOUTIAO
311
312
if (this .$u .trim (value) == this .lastValue ) return ;
312
313
this .lastValue = value;
313
314
// #endif
314
315
// 将当前的值发送到 u-form-item 进行校验
315
- this .dispatch (' u-form-item' , ' on-form-blur' , event . detail . value );
316
+ this .dispatch (' u-form-item' , ' on-form-blur' , value);
316
317
}, 40 )
317
318
},
318
319
onFormItemError (status ) {
You can’t perform that action at this time.
0 commit comments