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
891e5d3e
Commit
891e5d3e
authored
Dec 22, 2020
by
zhangwenshuai
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改分组时编辑样式
parent
52eb141b
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
13 deletions
+15
-13
Cell.less
components/apolloTable/component/Cell.less
+4
-4
Cell.tsx
components/apolloTable/component/Cell.tsx
+11
-9
No files found.
components/apolloTable/component/Cell.less
View file @
891e5d3e
...
...
@@ -125,11 +125,11 @@
}
.editCell {
position: absolute;
z-index: 1;
width: 100%;
height: 100%;
top: 0;
left: 0;
height: 40px;
z-index: 10;
//top: 0;
//left: 0;
}
.menuPop {
width: 110px;
...
...
components/apolloTable/component/Cell.tsx
View file @
891e5d3e
...
...
@@ -236,8 +236,6 @@ const Cell = (props: CellProps) => {
};
const
transferColumn
=
transferAttr
(
columnType
,
newProps
);
const
style
:
any
=
{};
const
{
dynamicCellConfigDTO
}
=
columnData
||
{};
// 不可编辑状态(无编辑权限、列只读、行锁定、单元格只读)
const
disabled
=
...
...
@@ -284,7 +282,6 @@ const Cell = (props: CellProps) => {
}
}
}
}
style=
{
style
}
>
<
div
className=
{
s
.
content
}
>
{
empty
?
(
...
...
@@ -313,13 +310,13 @@ const Cell = (props: CellProps) => {
trigger=
"contextMenu"
placement=
"rightTop"
content=
{
<
div
role=
"presentation"
className=
{
s
tyle
.
menuContainer
}
>
<
div
role=
"presentation"
className=
{
s
.
menuContainer
}
>
{
contentMenu
.
map
((
item
:
any
,
i
:
number
)
=>
{
return
(
<
div
key=
{
i
}
role=
"presentation"
className=
{
s
tyle
.
menu
}
className=
{
s
.
menu
}
onClick=
{
item
.
onClick
.
bind
(
null
,
record
)
}
>
{
item
.
label
}
...
...
@@ -352,8 +349,12 @@ const Cell = (props: CellProps) => {
const
newProps
=
{
...(
transferColumn
||
{}),
};
const
width
=
columnIndex
===
0
&&
position
!==
'right'
&&
record
.
groupLevel
?
`
${
cellStyle
.
width
-
record
.
groupLevel
*
16
-
50
}
px`
:
cellStyle
.
width
;
return
(
<
div
className=
{
s
.
editCell
}
>
<
div
className=
{
s
.
editCell
}
style=
{
{
width
}
}
>
<
EditComp
value=
{
getFormat
(
editConfig
,
columnConfig
,
cellData
)
}
{
...
newProps
}
...
...
@@ -385,7 +386,7 @@ const Cell = (props: CellProps) => {
rowId=
{
record
.
id
}
cellRenderProps=
{
cellRenderProps
}
style=
{
{
minHeight
:
cellStyle
.
height
,
minHeight
:
40
,
//
cellStyle.height,
borderRadius
:
0
,
}
}
maxPopHeight=
{
maxPopHeight
}
...
...
@@ -396,6 +397,8 @@ const Cell = (props: CellProps) => {
);
};
const
groupLevel
=
getGroupLevel
(
record
.
classList
);
const
paddingLeft
=
columnIndex
===
0
&&
position
!==
'right'
&&
record
.
groupLevel
?
`
${
record
.
groupLevel
*
16
}
px`
:
0
;
return
(
<
div
className=
{
classNames
(
...
...
@@ -408,8 +411,7 @@ const Cell = (props: CellProps) => {
)
}
style=
{
{
...
cellStyle
,
paddingLeft
:
columnIndex
===
0
&&
position
!==
'right'
&&
record
.
groupLevel
?
`${record.groupLevel * 16}px`
:
0
,
paddingLeft
,
paddingTop
:
`${groupLevel * 40}px`
,
}
}
onMouseEnter=
{
onMouseEnter
}
...
...
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