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
8b6603d0
Commit
8b6603d0
authored
Dec 17, 2020
by
zhangwenshuai
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix bug
parent
a6ce9192
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
9 deletions
+11
-9
Cell.tsx
components/apolloTable/component/Cell.tsx
+8
-7
index.tsx
...nts/apolloTable/component/base/detail/text-link/index.tsx
+3
-2
No files found.
components/apolloTable/component/Cell.tsx
View file @
8b6603d0
...
@@ -238,17 +238,18 @@ const Cell = (props: CellProps) => {
...
@@ -238,17 +238,18 @@ const Cell = (props: CellProps) => {
const
style
:
any
=
{};
const
style
:
any
=
{};
const
{
dynamicCellConfigDTO
}
=
columnData
||
{};
const
{
dynamicCellConfigDTO
}
=
columnData
||
{};
// 不可编辑状态(无编辑权限、列只读、行锁定、单元格只读)
const
disabled
=
!
cellEditable
||
readOnlyFlag
||
record
.
isLocked
||
(
dynamicCellConfigDTO
&&
dynamicCellConfigDTO
.
readonlyFlag
);
transferColumn
.
disabled
=
disabled
;
const
detail
=
(
const
detail
=
(
<
div
<
div
className=
{
s
.
detailCell
}
className=
{
s
.
detailCell
}
onClick=
{
()
=>
{
onClick=
{
()
=>
{
// 不可编辑状态(无编辑权限、列只读、行锁定、单元格只读)
if
(
disabled
)
{
if
(
!
cellEditable
||
readOnlyFlag
||
record
.
isLocked
||
(
dynamicCellConfigDTO
&&
dynamicCellConfigDTO
.
readonlyFlag
)
)
{
return
false
;
return
false
;
}
}
// 获取当前节点的选中状态
// 获取当前节点的选中状态
...
...
components/apolloTable/component/base/detail/text-link/index.tsx
View file @
8b6603d0
...
@@ -5,7 +5,8 @@ import s from './index.less';
...
@@ -5,7 +5,8 @@ import s from './index.less';
import
IconFont
from
'@/submodule/components/IconFont'
;
import
IconFont
from
'@/submodule/components/IconFont'
;
export
const
ApolloTextLinkDetail
=
(
props
:
any
)
=>
{
export
const
ApolloTextLinkDetail
=
(
props
:
any
)
=>
{
const
{
value
,
origin
,
formatter
,
changeEdit
,
columnConfig
}
=
props
;
const
{
value
,
origin
,
formatter
,
changeEdit
,
columnConfig
,
componentAttr
}
=
props
;
const
{
disabled
}
=
componentAttr
;
const
newValue
=
formatter
?
formatter
(
value
)
:
value
;
const
newValue
=
formatter
?
formatter
(
value
)
:
value
;
if
(
!
newValue
)
return
null
;
if
(
!
newValue
)
return
null
;
// 以逗号分隔
// 以逗号分隔
...
@@ -123,7 +124,7 @@ export const ApolloTextLinkDetail = (props: any) => {
...
@@ -123,7 +124,7 @@ export const ApolloTextLinkDetail = (props: any) => {
)
}
)
}
</
div
>
</
div
>
</
div
>
</
div
>
{
origin
!==
'detailForm'
&&
(
{
origin
!==
'detailForm'
&&
!
disabled
&&
(
<
div
<
div
className=
{
s
.
moreBtn
}
className=
{
s
.
moreBtn
}
onClick=
{
()
=>
{
onClick=
{
()
=>
{
...
...
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