From 52c806eeffa381d5c9b426411fab4217d80e5bd3 Mon Sep 17 00:00:00 2001 From: zhuzichu Date: Thu, 28 Sep 2023 12:31:20 +0800 Subject: [PATCH] update --- example/qml-Qt6/page/T_TableView.qml | 34 ++++++++++++++++--- example/qml/page/T_TableView.qml | 34 ++++++++++++++++--- .../FluentUI/Controls/FluTableView.qml | 20 +++++++++-- .../FluentUI/Controls/FluTableView.qml | 20 +++++++++-- 4 files changed, 96 insertions(+), 12 deletions(-) diff --git a/example/qml-Qt6/page/T_TableView.qml b/example/qml-Qt6/page/T_TableView.qml index ffd6f174..6fa63aae 100644 --- a/example/qml-Qt6/page/T_TableView.qml +++ b/example/qml-Qt6/page/T_TableView.qml @@ -13,6 +13,23 @@ FluContentPage{ loadData(1,1000) } + Component{ + id:com_checbox + + Item{ + FluCheckBox{ + anchors.centerIn: parent + checked: true === options.checked + enableAnimation: false + clickListener: function(){ + modelData.checkbox = table_view.customItem(com_checbox,{checked:!options.checked}) + tableModel.setRow(row,modelData) + } + } + } + + } + Component{ id:com_action Item{ @@ -28,6 +45,9 @@ FluContentPage{ FluFilledButton{ text:"编辑" onClicked: { + var obj = tableModel.getRow(row) + obj.name = "12345" + tableModel.setRow(row,obj) showSuccess(JSON.stringify(tableModel.getRow(row))) } } @@ -59,12 +79,14 @@ FluContentPage{ const dataSource = [] for(var i=0;i