mirror of
https://github.com/zhuzichu520/FluentUI.git
synced 2024-11-30 15:06:52 +08:00
fix bug
This commit is contained in:
parent
394a42cb94
commit
fe2543ab4d
@ -19,6 +19,7 @@ Rectangle {
|
||||
property bool verticalHeaderVisible: true
|
||||
property color selectedBorderColor: FluTheme.primaryColor
|
||||
property color selectedColor: FluTools.withOpacity(FluTheme.primaryColor,0.3)
|
||||
property alias view: table_view
|
||||
id:control
|
||||
color: {
|
||||
if(Window.active){
|
||||
@ -47,6 +48,9 @@ Rectangle {
|
||||
header_column_model.rows = [headerRow]
|
||||
}
|
||||
}
|
||||
Component.onDestruction: {
|
||||
table_view.contentY = 0
|
||||
}
|
||||
QtObject{
|
||||
id:d
|
||||
property var current
|
||||
@ -896,6 +900,7 @@ Rectangle {
|
||||
item_table_frozen_header.contentX = columnModel.width * _index
|
||||
item_table_frozen.contentX = columnModel.width * _index
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -45,6 +45,9 @@ Rectangle {
|
||||
id:tree_model
|
||||
columnSource: control.columnSource
|
||||
}
|
||||
Component.onDestruction: {
|
||||
table_view.contentY = 0
|
||||
}
|
||||
onDepthPaddingChanged: {
|
||||
table_view.forceLayout()
|
||||
}
|
||||
|
@ -19,6 +19,7 @@ Rectangle {
|
||||
property bool verticalHeaderVisible: true
|
||||
property color selectedBorderColor: FluTheme.primaryColor
|
||||
property color selectedColor: FluTools.withOpacity(FluTheme.primaryColor,0.3)
|
||||
property alias view: table_view
|
||||
id:control
|
||||
color: {
|
||||
if(Window.active){
|
||||
@ -47,6 +48,9 @@ Rectangle {
|
||||
header_column_model.rows = [headerRow]
|
||||
}
|
||||
}
|
||||
Component.onDestruction: {
|
||||
table_view.contentY = 0
|
||||
}
|
||||
QtObject{
|
||||
id:d
|
||||
property var current
|
||||
@ -896,6 +900,7 @@ Rectangle {
|
||||
item_table_frozen_header.contentX = columnModel.width * _index
|
||||
item_table_frozen.contentX = columnModel.width * _index
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -28,21 +28,26 @@ Rectangle {
|
||||
tree_model.setDataSource(dataSource)
|
||||
}
|
||||
onColumnSourceChanged: {
|
||||
var columns= []
|
||||
var headerRow = {}
|
||||
columnSource.forEach(function(item){
|
||||
var column = Qt.createQmlObject('import Qt.labs.qmlmodels 1.0;TableModelColumn{}',control);
|
||||
column.display = item.dataIndex
|
||||
columns.push(column)
|
||||
headerRow[item.dataIndex] = item.title
|
||||
})
|
||||
header_column_model.columns = columns
|
||||
header_column_model.rows = [headerRow]
|
||||
if(columnSource.length !== 0){
|
||||
var columns= []
|
||||
var headerRow = {}
|
||||
columnSource.forEach(function(item){
|
||||
var column = Qt.createQmlObject('import Qt.labs.qmlmodels 1.0;TableModelColumn{}',control);
|
||||
column.display = item.dataIndex
|
||||
columns.push(column)
|
||||
headerRow[item.dataIndex] = item.title
|
||||
})
|
||||
header_column_model.columns = columns
|
||||
header_column_model.rows = [headerRow]
|
||||
}
|
||||
}
|
||||
FluTreeModel{
|
||||
id:tree_model
|
||||
columnSource: control.columnSource
|
||||
}
|
||||
Component.onDestruction: {
|
||||
table_view.contentY = 0
|
||||
}
|
||||
onDepthPaddingChanged: {
|
||||
table_view.forceLayout()
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user