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
ba4641e1
Commit
ba4641e1
authored
Jul 30, 2020
by
zhangwenshuai
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
表格中下拉组件弹框样式增加判断条件
parent
a2cecbaf
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
29 additions
and
12 deletions
+29
-12
index.tsx
components/apolloTable/component/base/edit/search/index.tsx
+10
-4
index.tsx
components/apolloTable/component/base/edit/select/index.tsx
+10
-4
index.tsx
...Table/component/base/extra/dataEntry/textSelect/index.tsx
+9
-4
No files found.
components/apolloTable/component/base/edit/search/index.tsx
View file @
ba4641e1
...
@@ -44,6 +44,15 @@ export const ApolloSearch = (props: ApolloSearchProps) => {
...
@@ -44,6 +44,15 @@ export const ApolloSearch = (props: ApolloSearchProps) => {
}
}
};
};
const
extra
:
any
=
{};
// 表格中限制下拉类组件弹框高度
if
(
maxPopHeight
)
{
extra
.
dropdownClassName
=
s
.
searchDropdown
;
extra
.
dropdownStyle
=
{
maxHeight
:
maxPopHeight
,
};
}
return
(
return
(
<
Search
<
Search
className=
{
s
.
search
}
className=
{
s
.
search
}
...
@@ -53,10 +62,7 @@ export const ApolloSearch = (props: ApolloSearchProps) => {
...
@@ -53,10 +62,7 @@ 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
}
{
...
extra
}
dropdownStyle=
{
{
maxHeight
:
maxPopHeight
,
}
}
/>
/>
);
);
};
};
components/apolloTable/component/base/edit/select/index.tsx
View file @
ba4641e1
...
@@ -4,6 +4,7 @@ import { onBlurFn } from '../onBlurFn';
...
@@ -4,6 +4,7 @@ import { onBlurFn } from '../onBlurFn';
import
{
ApolloSelectProps
}
from
'../editInterface'
;
import
{
ApolloSelectProps
}
from
'../editInterface'
;
import
{
antiAssign
}
from
'../../../../utils/utils'
;
import
{
antiAssign
}
from
'../../../../utils/utils'
;
import
styles
from
'./styles.less'
;
import
styles
from
'./styles.less'
;
import
s
from
"@/submodule/components/apolloTable/component/base/edit/search/index.less"
;
export
const
ApolloSelect
=
(
props
:
ApolloSelectProps
)
=>
{
export
const
ApolloSelect
=
(
props
:
ApolloSelectProps
)
=>
{
const
{
options
=
[],
onChange
,
isMultiple
,
maxPopHeight
}
=
props
;
const
{
options
=
[],
onChange
,
isMultiple
,
maxPopHeight
}
=
props
;
...
@@ -31,16 +32,21 @@ export const ApolloSelect = (props: ApolloSelectProps) => {
...
@@ -31,16 +32,21 @@ export const ApolloSelect = (props: ApolloSelectProps) => {
}
}
};
};
const
extra
:
any
=
{};
if
(
maxPopHeight
)
{
extra
.
dropdownClassName
=
s
.
searchDropdown
;
extra
.
dropdownStyle
=
{
maxHeight
:
maxPopHeight
,
};
}
return
(
return
(
<
Select
<
Select
className=
{
styles
.
select
}
className=
{
styles
.
select
}
{
...
selfProps
}
{
...
selfProps
}
onChange=
{
changeValue
}
onChange=
{
changeValue
}
onDropdownVisibleChange=
{
selfProps
.
mode
===
'multiple'
?
multipleBlurFn
:
singleBlurFn
}
onDropdownVisibleChange=
{
selfProps
.
mode
===
'multiple'
?
multipleBlurFn
:
singleBlurFn
}
dropdownClassName=
{
styles
.
selectDropdown
}
{
...
extra
}
dropdownStyle=
{
{
maxHeight
:
maxPopHeight
,
}
}
>
>
{
options
.
map
((
item
)
=>
{
{
options
.
map
((
item
)
=>
{
return
(
return
(
...
...
components/apolloTable/component/base/extra/dataEntry/textSelect/index.tsx
View file @
ba4641e1
...
@@ -3,6 +3,7 @@ import { Menu, Empty, Spin, Input, Dropdown } from 'antd';
...
@@ -3,6 +3,7 @@ import { Menu, Empty, Spin, Input, Dropdown } from 'antd';
import
{
findDOMNode
}
from
'react-dom'
;
import
{
findDOMNode
}
from
'react-dom'
;
import
lodash
from
'lodash'
;
import
lodash
from
'lodash'
;
import
styles
from
'./styles.less'
;
import
styles
from
'./styles.less'
;
import
s
from
"@/submodule/components/apolloTable/component/base/edit/search/index.less"
;
/*
/*
* 此空间用于数据选择及输入控制,若不选择只传入输入框数据
* 此空间用于数据选择及输入控制,若不选择只传入输入框数据
...
@@ -200,14 +201,18 @@ class TextSelect extends React.Component<Props, State> {
...
@@ -200,14 +201,18 @@ class TextSelect extends React.Component<Props, State> {
render
()
{
render
()
{
const
{
placeholder
,
disabled
,
maxPopHeight
}
=
this
.
props
;
const
{
placeholder
,
disabled
,
maxPopHeight
}
=
this
.
props
;
const
{
searchStr
}
=
this
.
state
;
const
{
searchStr
}
=
this
.
state
;
const
extra
:
any
=
{};
if
(
maxPopHeight
)
{
extra
.
overlayClassName
=
styles
.
overlayClassName
;
extra
.
overlayStyle
=
{
maxHeight
:
maxPopHeight
,
};
}
return
(
return
(
<
div
className=
{
styles
.
textSelectContainer
}
ref=
{
this
.
container
}
>
<
div
className=
{
styles
.
textSelectContainer
}
ref=
{
this
.
container
}
>
<
Dropdown
<
Dropdown
trigger=
{
[
'click'
]
}
trigger=
{
[
'click'
]
}
overlayClassName=
{
styles
.
overlayClassName
}
{
...
extra
}
overlayStyle=
{
{
maxHeight
:
maxPopHeight
,
}
}
onVisibleChange=
{
this
.
onVisibleChange
}
onVisibleChange=
{
this
.
onVisibleChange
}
placement=
"bottomLeft"
placement=
"bottomLeft"
overlay=
{
this
.
renderList
()
}
overlay=
{
this
.
renderList
()
}
...
...
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