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
a2cecbaf
Commit
a2cecbaf
authored
Jul 29, 2020
by
zhangwenshuai
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改search和select的下拉样式
parent
d887e67d
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
29 additions
and
6 deletions
+29
-6
index.less
components/apolloTable/component/base/edit/search/index.less
+7
-0
index.tsx
components/apolloTable/component/base/edit/search/index.tsx
+14
-2
index.tsx
components/apolloTable/component/base/edit/select/index.tsx
+1
-0
styles.less
...onents/apolloTable/component/base/edit/select/styles.less
+6
-0
index.tsx
...lloTable/component/base/extra/associationSearch/index.tsx
+1
-4
No files found.
components/apolloTable/component/base/edit/search/index.less
View file @
a2cecbaf
...
@@ -8,8 +8,15 @@
...
@@ -8,8 +8,15 @@
border-radius: 0;
border-radius: 0;
display: flex;
display: flex;
align-items: center;
align-items: center;
height: auto;
}
}
:global(.ant-select-selection__rendered) {
:global(.ant-select-selection__rendered) {
width: 100%;
width: 100%;
}
}
}
}
.searchDropdown {
overflow: auto;
:global(.ant-select-dropdown-menu) {
max-height: none;
}
}
components/apolloTable/component/base/edit/search/index.tsx
View file @
a2cecbaf
...
@@ -7,8 +7,16 @@ import { onBlurFn } from '../onBlurFn';
...
@@ -7,8 +7,16 @@ import { onBlurFn } from '../onBlurFn';
import
s
from
'./index.less'
;
import
s
from
'./index.less'
;
export
const
ApolloSearch
=
(
props
:
ApolloSearchProps
)
=>
{
export
const
ApolloSearch
=
(
props
:
ApolloSearchProps
)
=>
{
const
{
onChange
,
maxCount
,
isMultiple
,
request
}
=
props
;
const
{
onChange
,
maxCount
,
isMultiple
,
request
,
maxPopHeight
}
=
props
;
const
selfProps
=
antiAssign
(
props
,
[
'columnConfig'
,
'onChange'
,
'isMultiple'
,
'options'
,
'request'
,
'maxCount'
]);
const
selfProps
=
antiAssign
(
props
,
[
'columnConfig'
,
'onChange'
,
'isMultiple'
,
'options'
,
'request'
,
'maxCount'
,
'maxPopHeight'
,
]);
const
isOpen
:
any
=
useRef
();
const
isOpen
:
any
=
useRef
();
if
(
isMultiple
)
{
if
(
isMultiple
)
{
selfProps
.
mode
=
'multiple'
;
selfProps
.
mode
=
'multiple'
;
...
@@ -45,6 +53,10 @@ export const ApolloSearch = (props: ApolloSearchProps) => {
...
@@ -45,6 +53,10 @@ export const ApolloSearch = (props: ApolloSearchProps) => {
onDropdownVisibleChange=
{
selfProps
.
mode
===
'multiple'
?
multipleBlurFn
:
singleBlurFn
}
onDropdownVisibleChange=
{
selfProps
.
mode
===
'multiple'
?
multipleBlurFn
:
singleBlurFn
}
onChange=
{
changeValue
}
onChange=
{
changeValue
}
initDataType=
"onfocus"
initDataType=
"onfocus"
dropdownClassName=
{
s
.
searchDropdown
}
dropdownStyle=
{
{
maxHeight
:
maxPopHeight
,
}
}
/>
/>
);
);
};
};
components/apolloTable/component/base/edit/select/index.tsx
View file @
a2cecbaf
...
@@ -37,6 +37,7 @@ export const ApolloSelect = (props: ApolloSelectProps) => {
...
@@ -37,6 +37,7 @@ export const ApolloSelect = (props: ApolloSelectProps) => {
{
...
selfProps
}
{
...
selfProps
}
onChange=
{
changeValue
}
onChange=
{
changeValue
}
onDropdownVisibleChange=
{
selfProps
.
mode
===
'multiple'
?
multipleBlurFn
:
singleBlurFn
}
onDropdownVisibleChange=
{
selfProps
.
mode
===
'multiple'
?
multipleBlurFn
:
singleBlurFn
}
dropdownClassName=
{
styles
.
selectDropdown
}
dropdownStyle=
{
{
dropdownStyle=
{
{
maxHeight
:
maxPopHeight
,
maxHeight
:
maxPopHeight
,
}
}
}
}
...
...
components/apolloTable/component/base/edit/select/styles.less
View file @
a2cecbaf
...
@@ -18,3 +18,9 @@
...
@@ -18,3 +18,9 @@
align-items: center;
align-items: center;
}
}
}
}
.selectDropdown{
overflow: auto;
:global(.ant-select-dropdown-menu) {
max-height: none;
}
}
components/apolloTable/component/base/extra/associationSearch/index.tsx
View file @
a2cecbaf
...
@@ -227,7 +227,7 @@ class AssociationSearch extends React.Component<Props, State> {
...
@@ -227,7 +227,7 @@ class AssociationSearch extends React.Component<Props, State> {
render
()
{
render
()
{
const
{
data
,
value
}
=
this
.
state
;
const
{
data
,
value
}
=
this
.
state
;
const
{
selfCom
,
autoFocus
,
onChange
,
maxPopHeight
,
...
rest
}
=
this
.
props
;
const
{
selfCom
,
autoFocus
,
onChange
,
...
rest
}
=
this
.
props
;
return
(
return
(
<
Consumer
>
<
Consumer
>
{
({
locale
}:
any
)
=>
{
{
({
locale
}:
any
)
=>
{
...
@@ -243,9 +243,6 @@ class AssociationSearch extends React.Component<Props, State> {
...
@@ -243,9 +243,6 @@ class AssociationSearch extends React.Component<Props, State> {
onChange=
{
this
.
handleChange
}
onChange=
{
this
.
handleChange
}
onFocus=
{
this
.
onFocus
}
onFocus=
{
this
.
onFocus
}
onBlur=
{
this
.
onBlur
}
onBlur=
{
this
.
onBlur
}
dropdownStyle=
{
{
maxHeight
:
maxPopHeight
,
}
}
>
>
{
data
.
map
((
d
:
any
)
=>
{
{
data
.
map
((
d
:
any
)
=>
{
return
(
return
(
...
...
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