Commit bae9b216 authored by 杨子龙's avatar 杨子龙

操作栏配置增加宽度配置

parent e7e07a6c
...@@ -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"},
......
...@@ -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();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment