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
bae9b216
Commit
bae9b216
authored
5 months ago
by
杨子龙
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
操作栏配置增加宽度配置
parent
e7e07a6c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
3 deletions
+9
-3
settings.js
src/core/FormDesigner/config/settings.js
+6
-1
index.js
src/core/widgets/coord/DataTable/index.js
+3
-2
No files found.
src/core/FormDesigner/config/settings.js
View file @
bae9b216
...
@@ -4851,9 +4851,14 @@ const advancedWidgets = [
...
@@ -4851,9 +4851,14 @@ const advancedWidgets = [
type
:
'string'
,
type
:
'string'
,
widget
:
'htmlInput'
,
widget
:
'htmlInput'
,
},
},
optionWidth
:
{
title
:
"操作栏宽度"
,
type
:
"number"
,
default
:
120
},
optionRender
:
{
optionRender
:
{
title
:
''
,
title
:
''
,
name
:
'操作栏配置'
,
name
:
'操作栏
内容
配置'
,
type
:
'array'
,
type
:
'array'
,
default
:
[
default
:
[
{
type
:
"icon"
,
value
:
'DeleteOutlined'
,
action
:
"delete"
},
{
type
:
"icon"
,
value
:
'DeleteOutlined'
,
action
:
"delete"
},
...
...
This diff is collapsed.
Click to expand it.
src/core/widgets/coord/DataTable/index.js
View file @
bae9b216
...
@@ -21,6 +21,7 @@ const DataTable = props => {
...
@@ -21,6 +21,7 @@ const DataTable = props => {
scrollY
,
scrollY
,
statusOption
,
statusOption
,
areaTaskShine
,
areaTaskShine
,
optionWidth
}
=
schema
;
}
=
schema
;
const
[
dataSource
,
setDataSource
]
=
useState
([]);
const
[
dataSource
,
setDataSource
]
=
useState
([]);
...
@@ -261,7 +262,7 @@ const DataTable = props => {
...
@@ -261,7 +262,7 @@ const DataTable = props => {
title: '操作',
title: '操作',
dataIndex: '',
dataIndex: '',
key: '',
key: '',
width: 120,
width:
optionWidth ||
120,
render: (_, row, index) => {
render: (_, row, index) => {
return getOptionRender(_, row, index);
return getOptionRender(_, row, index);
},
},
...
@@ -352,7 +353,7 @@ const DataTable = props => {
...
@@ -352,7 +353,7 @@ const DataTable = props => {
useEffect(() => {
useEffect(() => {
getColumns();
getColumns();
}, [fieldList, dataSource]);
}, [fieldList, dataSource
, optionRender
]);
useEffect(() => {
useEffect(() => {
initRelationForm();
initRelationForm();
...
...
This diff is collapsed.
Click to expand it.
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