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
be4f22ef
Commit
be4f22ef
authored
Jun 24, 2020
by
zhangwenshuai
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改展开逻辑
parent
cf013df5
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
10 additions
and
4 deletions
+10
-4
Cell.tsx
components/apolloTable/component/Cell.tsx
+4
-4
Table.tsx
components/apolloTable/component/Table.tsx
+2
-0
index.tsx
components/apolloTable/component/index.tsx
+2
-0
interface.tsx
components/apolloTable/component/interface.tsx
+2
-0
No files found.
components/apolloTable/component/Cell.tsx
View file @
be4f22ef
...
...
@@ -27,6 +27,7 @@ const Cell = (props: CellProps) => {
rowIndex
,
paginationConfig
,
showIndex
,
showExpand
,
emptyPlaceholder
,
cellEditable
,
rowSelection
,
...
...
@@ -45,7 +46,6 @@ const Cell = (props: CellProps) => {
renderEditCell
,
cellRenderProps
,
readOnlyFlag
,
showExpand
,
}
=
columnConfig
;
const
[
status
,
setStatus
]
=
useState
(
'detail'
);
...
...
@@ -174,9 +174,9 @@ const Cell = (props: CellProps) => {
}
onClick=
{
()
=>
{
// 不可编辑状态
//
if (!cellEditable || readOnlyFlag || (dynamicCellConfigDTO && dynamicCellConfigDTO.readonlyFlag))
{
//
return false;
//
}
if
(
!
cellEditable
||
readOnlyFlag
||
(
dynamicCellConfigDTO
&&
dynamicCellConfigDTO
.
readonlyFlag
))
{
return
false
;
}
if
(
selectedCell
===
`${position}_${cellKey}`
)
{
setStatus
(
'edit'
);
}
else
{
...
...
components/apolloTable/component/Table.tsx
View file @
be4f22ef
...
...
@@ -340,6 +340,7 @@ export default class AirTable extends Component<TableProps, TableState> {
emitChangeCell
,
paginationConfig
,
showIndex
,
showExpand
,
emptyPlaceholder
,
cellEditable
,
rowSelection
,
...
...
@@ -402,6 +403,7 @@ export default class AirTable extends Component<TableProps, TableState> {
columns=
{
columns
}
paginationConfig=
{
paginationConfig
}
showIndex=
{
position
===
'right'
?
false
:
showIndex
}
showExpand=
{
showExpand
}
emptyPlaceholder=
{
emptyPlaceholder
}
cellEditable=
{
cellEditable
}
rowSelection=
{
position
===
'right'
?
false
:
rowSelection
}
...
...
components/apolloTable/component/index.tsx
View file @
be4f22ef
...
...
@@ -67,6 +67,7 @@ class AirTable extends React.Component<CommonProps, CommonState> {
operateConfig
,
paginationConfig
,
showIndex
,
showExpand
,
emptyPlaceholder
,
cellEditable
,
rowHeight
,
...
...
@@ -108,6 +109,7 @@ class AirTable extends React.Component<CommonProps, CommonState> {
sortConfig=
{
sortConfig
}
paginationConfig=
{
paginationConfig
}
showIndex=
{
showIndex
}
showExpand=
{
showExpand
}
emptyPlaceholder=
{
emptyPlaceholder
}
cellEditable=
{
cellEditable
}
rowHeight=
{
rowHeight
}
...
...
components/apolloTable/component/interface.tsx
View file @
be4f22ef
...
...
@@ -62,6 +62,7 @@ export interface TableProps extends LoadConfigProps {
sortConfig
?:
any
;
paginationConfig
?:
any
;
showIndex
?:
boolean
;
showExpand
?:
Function
;
emptyPlaceholder
?:
string
;
cellEditable
?:
boolean
;
rowHeight
?:
number
;
...
...
@@ -116,6 +117,7 @@ export interface CellProps {
hasFixed
?:
boolean
;
paginationConfig
?:
any
;
showIndex
?:
boolean
;
showExpand
?:
Function
;
emptyPlaceholder
?:
string
;
cellEditable
?:
boolean
;
rowSelection
?:
any
;
...
...
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