Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
submodule
Project
Project
Details
Activity
Releases
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
web_component
submodule
Commits
a75e2ee1
Commit
a75e2ee1
authored
Jan 26, 2021
by
zhangwenshuai
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
模糊搜索选项增加tooltip
parent
eb47abde
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
3 deletions
+10
-3
index.tsx
...lloTable/component/base/extra/associationSearch/index.tsx
+10
-3
No files found.
components/apolloTable/component/base/extra/associationSearch/index.tsx
View file @
a75e2ee1
import
React
from
'react'
;
import
{
Spin
,
Select
}
from
'antd'
;
import
{
Spin
,
Select
,
Tooltip
}
from
'antd'
;
import
lodash
from
'lodash'
;
import
{
Consumer
}
from
'../../../context'
;
...
...
@@ -17,6 +17,7 @@ interface Props {
value
:
any
;
label
:
string
;
};
showTooltip
?:
boolean
;
}
enum
Loaded
{
...
...
@@ -229,7 +230,7 @@ class AssociationSearch extends React.Component<Props, State> {
render
()
{
const
{
data
,
value
}
=
this
.
state
;
const
{
selfCom
,
autoFocus
,
onChange
,
...
rest
}
=
this
.
props
;
const
{
selfCom
,
autoFocus
,
onChange
,
showTooltip
,
...
rest
}
=
this
.
props
;
return
(
<
Consumer
>
{
({
locale
}:
any
)
=>
{
...
...
@@ -249,7 +250,13 @@ class AssociationSearch extends React.Component<Props, State> {
{
data
.
map
((
d
:
any
)
=>
{
return
(
<
Select
.
Option
key=
{
d
.
value
}
value=
{
d
.
value
}
>
{
showTooltip
?
(
<
Tooltip
placement=
"topLeft"
title=
{
d
.
label
}
>
{
d
.
label
}
</
Tooltip
>
)
:
(
d
.
label
)
}
</
Select
.
Option
>
);
})
}
...
...
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