This commit is contained in:
zhuzihcu 2023-06-16 09:30:21 +08:00
parent a574cd9230
commit 7bfa9f0191
2 changed files with 15 additions and 3 deletions

View File

@ -78,6 +78,7 @@ FluContentPage{
title: '姓名', title: '姓名',
dataIndex: 'name', dataIndex: 'name',
width:100, width:100,
minimumWidth:50
}, },
{ {
@ -85,7 +86,8 @@ FluContentPage{
dataIndex: 'age', dataIndex: 'age',
editDelegate:com_combobox, editDelegate:com_combobox,
width:100, width:100,
minimumWidth:100 minimumWidth:100,
maximumWidth: 100
}, },
{ {
title: '住址', title: '住址',
@ -95,7 +97,8 @@ FluContentPage{
{ {
title: '别名', title: '别名',
dataIndex: 'nickname', dataIndex: 'nickname',
width:100 width:100,
} }
] ]
} }

View File

@ -71,7 +71,16 @@ Rectangle {
columnWidthProvider: function(column) { columnWidthProvider: function(column) {
let w = explicitColumnWidth(column) let w = explicitColumnWidth(column)
if (w >= 0){ if (w >= 0){
return Math.max(100, w) var minimumWidth = columnSource[column].minimumWidth
var maximumWidth = columnSource[column].maximumWidth
if(!minimumWidth){
minimumWidth = 100
}
if(!maximumWidth){
maximumWidth = 65535
}
return Math.min(Math.max(minimumWidth, w),maximumWidth)
} }
return implicitColumnWidth(column) return implicitColumnWidth(column)
} }