Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
X
xform
Project
Project
Details
Activity
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
田翔
xform
Commits
deafd8a8
Commit
deafd8a8
authored
Dec 10, 2024
by
杨子龙
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修复字段样式配置项
parent
2ad668c8
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
5 deletions
+17
-5
index.js
src/core/widgets/coord/DataTable/index.js
+13
-0
index.js
src/core/widgets/settings/groupSource/StatusOption/index.js
+4
-5
No files found.
src/core/widgets/coord/DataTable/index.js
View file @
deafd8a8
...
...
@@ -171,6 +171,7 @@ const DataTable = props => {
// 字段栏显示模式渲染
const getFieldRender = (_, row, index , item) => {
let ele;
switch (item.type) {
case "文本":
if(!item.isMapped){
...
...
@@ -202,6 +203,18 @@ const DataTable = props => {
download={true}
preview={true} />;
break;
default:
if(!item.isMapped){
ele = <span style={{color: item.color}}>{_}</span>
} else {
if(item.parseStr){
const json = JSON.parse(item.parseStr);
ele = <span style={{color: json[_]?.color}}>{json[_]?.label}</span>
} else {
ele = <span>调试中...</span>
}
}
break;
}
return ele
...
...
src/core/widgets/settings/groupSource/StatusOption/index.js
View file @
deafd8a8
...
...
@@ -57,15 +57,14 @@ const StatusOption = (props) => {
const
current
=
data
.
find
(
d
=>
d
.
FieldName
===
item
.
fieldName
);
if
(
currentItem
){
item
.
type
=
currentItem
.
type
;
item
.
color
=
currentItem
.
color
;
item
.
parseStr
=
currentItem
.
parseStr
;
item
.
type
=
showType
(
current
?.
Widget
)
?
current
?.
Widget
:
"文本"
;
item
.
editType
=
current
?.
Widget
||
"文本"
;
item
.
isMapped
=
currentItem
?.
isMapped
||
false
;
item
.
isMapped
=
currentItem
.
isMapped
||
false
;
item
.
width
=
currentItem
.
width
||
120
;
}
else
{
item
.
type
=
"文本"
;
item
.
editType
=
"文本"
;
item
.
type
=
showType
(
current
.
Widget
)
?
current
.
Widget
:
"文本"
;
item
.
editType
=
current
.
Widget
;
item
.
color
=
"rgb(65,68,69)"
;
item
.
isMapped
=
false
;
item
.
width
=
120
;
...
...
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