Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
xiaojuan huang
Ccms
Commits
274a5611
Unverified
Commit
274a5611
authored
3 years ago
by
牛尾巴
Committed by
Gitee
3 years ago
Browse files
Options
Download
Plain Diff
!58 await导致的react更新问题
Merge pull request !58 from code_mayun/dev_await
parents
50a4b4a8
e32e8d82
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/components/formFields/select/single/index.tsx
+3
-5
src/components/formFields/select/single/index.tsx
with
3 additions
and
5 deletions
+3
-5
src/components/formFields/select/single/index.tsx
+
3
-
5
View file @
274a5611
...
...
@@ -144,11 +144,9 @@ export default class SelectSingleField extends SelectField<SelectSingleFieldConf
console
.
warn
(
'
单项选择框的值需要是字符串或数值。
'
)
}
else
if
(
value
===
undefined
)
{
if
(
defaultSelect
!==
undefined
&&
defaultSelect
!==
false
&&
props
.
options
.
length
)
{
(
async
()
=>
{
const
value
=
props
.
options
[
defaultSelect
===
true
?
0
:
defaultSelect
].
value
props
.
value
=
value
this
.
props
.
onValueSet
(
''
,
value
,
await
this
.
validate
(
value
))
})()
const
value
=
props
.
options
[
defaultSelect
===
true
?
0
:
defaultSelect
]?.
value
props
.
value
=
value
this
.
props
.
onValueSet
(
''
,
value
,
true
)
}
}
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
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
Menu
Projects
Groups
Snippets
Help