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
0413ff18
Commit
0413ff18
authored
Jul 13, 2020
by
zhangwenshuai
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
自定义组件默认取config的setFormat
parent
dd72d6b0
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
1 deletion
+11
-1
Cell.tsx
components/apolloTable/component/Cell.tsx
+9
-0
index.less
...onents/apolloTable/component/base/detail/input/index.less
+1
-0
index.tsx
components/apolloTable/component/base/detail/tag/index.tsx
+1
-1
No files found.
components/apolloTable/component/Cell.tsx
View file @
0413ff18
...
...
@@ -191,6 +191,15 @@ const Cell = (props: CellProps) => {
let
detailConfig
;
if
(
typeof
renderDetailCell
===
'function'
)
{
detailConfig
=
renderDetailCell
({
cellData
,
rowData
:
record
,
columnConfig
});
const
defaultConfig
=
config
[
String
(
columnType
)];
if
(
defaultConfig
)
{
if
(
defaultConfig
.
getFormatter
&&
!
detailConfig
.
getFormatter
)
{
detailConfig
.
getFormatter
=
defaultConfig
.
getFormatter
;
}
if
(
defaultConfig
.
setFormatter
&&
!
detailConfig
.
setFormatter
)
{
detailConfig
.
setFormatter
=
defaultConfig
.
setFormatter
;
}
}
empty
=
false
;
}
else
{
detailConfig
=
config
[
String
(
columnType
)]
||
config
[
'1'
];
...
...
components/apolloTable/component/base/detail/input/index.less
View file @
0413ff18
...
...
@@ -6,6 +6,7 @@
width: 100%;
height: 100%;
align-items: center;
overflow: hidden;
.itemBgTxt {
position: absolute;
z-index: -1;
...
...
components/apolloTable/component/base/detail/tag/index.tsx
View file @
0413ff18
...
...
@@ -29,7 +29,7 @@ export const Tags = (props: any) => {
if
(
mode
!==
'multiple'
)
{
// 单选
return
(
<
div
className=
{
s
.
container
}
>
<
div
className=
{
s
.
container
}
style=
{
{
overflow
:
'hidden'
}
}
>
<
span
className=
{
s
.
item
}
style=
{
{
...
itemStyle
,
background
:
`#${getColor(value[0])}`
}
}
>
<
div
className=
{
s
.
itemBgTxt
}
>
{
value
[
0
].
text
}
</
div
>
</
span
>
...
...
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