Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
J
jinfa-admin
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
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
linweijiong
jinfa-admin
Commits
4f874244
Commit
4f874244
authored
Jan 05, 2022
by
卢均锐
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: NiceForm/Search 增加只输入整数控制
parent
cb7ffa5d
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
1 deletion
+2
-1
Search.tsx
src/components/NiceForm/components/Search.tsx
+2
-1
No files found.
src/components/NiceForm/components/Search.tsx
View file @
4f874244
...
...
@@ -19,6 +19,7 @@ const Search = props => {
align
,
advanced
=
true
,
// 是否展示高级筛选
tip
,
// 搜索框悬浮提示
onlyNumber
=
false
,
//只输入整数
...
rest
}
=
props
.
props
[
'x-component-props'
];
const
justifyAlign
=
align
||
'flex-end'
;
...
...
@@ -39,7 +40,7 @@ const Search = props => {
<
Tooltip
title=
{
tip
}
>
<
Input
.
Search
value=
{
props
.
value
||
''
}
onChange=
{
e
=>
props
.
mutators
.
change
(
e
.
target
.
value
)
}
onChange=
{
e
=>
props
.
mutators
.
change
(
onlyNumber
?
e
.
target
.
value
.
replace
(
/
\D
/g
,
''
)
:
e
.
target
.
value
)
}
onSearch=
{
(
_
,
e
)
=>
{
e
.
preventDefault
();
props
.
form
.
submit
();
...
...
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