Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
U
uview-ui
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
李晖
uview-ui
Commits
5491842d
Commit
5491842d
authored
Mar 21, 2022
by
yatoku
Committed by
童皓
Apr 04, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix:修复`u-inpu`t组件中`blur`事件使用`value`变量未声明的错误
close #1008
parent
09c9e206
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
u-input.vue
uview-ui/components/u-input/u-input.vue
+3
-2
No files found.
uview-ui/components/u-input/u-input.vue
View file @
5491842d
...
...
@@ -300,11 +300,12 @@ export default {
handleBlur
(
event
)
{
// 最开始使用的是监听图标@touchstart事件,自从hx2.8.4后,此方法在微信小程序出错
// 这里改为监听点击事件,手点击清除图标时,同时也发生了@blur事件,导致图标消失而无法点击,这里做一个延时
let
value
=
event
.
detail
.
value
;
setTimeout
(()
=>
{
this
.
focused
=
false
;
},
100
)
// vue 原生的方法 return 出去
this
.
$emit
(
'
blur
'
,
event
.
detail
.
value
);
this
.
$emit
(
'
blur
'
,
value
);
setTimeout
(()
=>
{
// 头条小程序由于自身bug,导致中文下,每按下一个键(尚未完成输入),都会触发一次@input,导致错误,这里进行判断处理
// #ifdef MP-TOUTIAO
...
...
@@ -312,7 +313,7 @@ export default {
this
.
lastValue
=
value
;
// #endif
// 将当前的值发送到 u-form-item 进行校验
this
.
dispatch
(
'
u-form-item
'
,
'
on-form-blur
'
,
event
.
detail
.
value
);
this
.
dispatch
(
'
u-form-item
'
,
'
on-form-blur
'
,
value
);
},
40
)
},
onFormItemError
(
status
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment