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 bool verticalHeaderVisible: true
|
||||||
property color selectedBorderColor: FluTheme.primaryColor
|
property color selectedBorderColor: FluTheme.primaryColor
|
||||||
property color selectedColor: FluTools.withOpacity(FluTheme.primaryColor,0.3)
|
property color selectedColor: FluTools.withOpacity(FluTheme.primaryColor,0.3)
|
||||||
|
property alias view: table_view
|
||||||
id:control
|
id:control
|
||||||
color: {
|
color: {
|
||||||
if(Window.active){
|
if(Window.active){
|
||||||
@ -47,6 +48,9 @@ Rectangle {
|
|||||||
header_column_model.rows = [headerRow]
|
header_column_model.rows = [headerRow]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Component.onDestruction: {
|
||||||
|
table_view.contentY = 0
|
||||||
|
}
|
||||||
QtObject{
|
QtObject{
|
||||||
id:d
|
id:d
|
||||||
property var current
|
property var current
|
||||||
@ -896,6 +900,7 @@ Rectangle {
|
|||||||
item_table_frozen_header.contentX = columnModel.width * _index
|
item_table_frozen_header.contentX = columnModel.width * _index
|
||||||
item_table_frozen.contentX = columnModel.width * _index
|
item_table_frozen.contentX = columnModel.width * _index
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -45,6 +45,9 @@ Rectangle {
|
|||||||
id:tree_model
|
id:tree_model
|
||||||
columnSource: control.columnSource
|
columnSource: control.columnSource
|
||||||
}
|
}
|
||||||
|
Component.onDestruction: {
|
||||||
|
table_view.contentY = 0
|
||||||
|
}
|
||||||
onDepthPaddingChanged: {
|
onDepthPaddingChanged: {
|
||||||
table_view.forceLayout()
|
table_view.forceLayout()
|
||||||
}
|
}
|
||||||
|
@ -19,6 +19,7 @@ Rectangle {
|
|||||||
property bool verticalHeaderVisible: true
|
property bool verticalHeaderVisible: true
|
||||||
property color selectedBorderColor: FluTheme.primaryColor
|
property color selectedBorderColor: FluTheme.primaryColor
|
||||||
property color selectedColor: FluTools.withOpacity(FluTheme.primaryColor,0.3)
|
property color selectedColor: FluTools.withOpacity(FluTheme.primaryColor,0.3)
|
||||||
|
property alias view: table_view
|
||||||
id:control
|
id:control
|
||||||
color: {
|
color: {
|
||||||
if(Window.active){
|
if(Window.active){
|
||||||
@ -47,6 +48,9 @@ Rectangle {
|
|||||||
header_column_model.rows = [headerRow]
|
header_column_model.rows = [headerRow]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Component.onDestruction: {
|
||||||
|
table_view.contentY = 0
|
||||||
|
}
|
||||||
QtObject{
|
QtObject{
|
||||||
id:d
|
id:d
|
||||||
property var current
|
property var current
|
||||||
@ -896,6 +900,7 @@ Rectangle {
|
|||||||
item_table_frozen_header.contentX = columnModel.width * _index
|
item_table_frozen_header.contentX = columnModel.width * _index
|
||||||
item_table_frozen.contentX = columnModel.width * _index
|
item_table_frozen.contentX = columnModel.width * _index
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -28,21 +28,26 @@ Rectangle {
|
|||||||
tree_model.setDataSource(dataSource)
|
tree_model.setDataSource(dataSource)
|
||||||
}
|
}
|
||||||
onColumnSourceChanged: {
|
onColumnSourceChanged: {
|
||||||
var columns= []
|
if(columnSource.length !== 0){
|
||||||
var headerRow = {}
|
var columns= []
|
||||||
columnSource.forEach(function(item){
|
var headerRow = {}
|
||||||
var column = Qt.createQmlObject('import Qt.labs.qmlmodels 1.0;TableModelColumn{}',control);
|
columnSource.forEach(function(item){
|
||||||
column.display = item.dataIndex
|
var column = Qt.createQmlObject('import Qt.labs.qmlmodels 1.0;TableModelColumn{}',control);
|
||||||
columns.push(column)
|
column.display = item.dataIndex
|
||||||
headerRow[item.dataIndex] = item.title
|
columns.push(column)
|
||||||
})
|
headerRow[item.dataIndex] = item.title
|
||||||
header_column_model.columns = columns
|
})
|
||||||
header_column_model.rows = [headerRow]
|
header_column_model.columns = columns
|
||||||
|
header_column_model.rows = [headerRow]
|
||||||
|
}
|
||||||
}
|
}
|
||||||
FluTreeModel{
|
FluTreeModel{
|
||||||
id:tree_model
|
id:tree_model
|
||||||
columnSource: control.columnSource
|
columnSource: control.columnSource
|
||||||
}
|
}
|
||||||
|
Component.onDestruction: {
|
||||||
|
table_view.contentY = 0
|
||||||
|
}
|
||||||
onDepthPaddingChanged: {
|
onDepthPaddingChanged: {
|
||||||
table_view.forceLayout()
|
table_view.forceLayout()
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user