This commit is contained in:
zhuzichu
2023-09-22 17:35:02 +08:00
parent 67ef7f13aa
commit f88b330f8e
11 changed files with 175 additions and 30 deletions

View File

@ -302,7 +302,7 @@ FluObject{
onTap:{ navigationView.push(url) }
}
FluPaneItem{
title:"TreeView(Todo)"
title:"TreeView"
url:"qrc:/example/qml/page/T_TreeView.qml"
onDropped:{ FluApp.navigate("/pageWindow",{title:title,url:url}) }
onTap:{ navigationView.push(url) }

View File

@ -12,7 +12,7 @@ FluContentPage {
function treeData(){
const dig = (path = '0', level = 4) => {
const list = [];
for (let i = 0; i < 9; i += 1) {
for (let i = 0; i < 6; i += 1) {
const key = `${path}-${i}`;
const treeNode = {
title: key,
@ -45,6 +45,10 @@ FluContentPage {
text:"共计%1条数据当前显示的%2条数据".arg(tree_view.count()).arg(tree_view.visibleCount())
}
FluText{
text:"共计选中%1条数据".arg(tree_view.selectionModel().length)
}
RowLayout{
spacing: 10
FluText{
@ -74,12 +78,17 @@ FluContentPage {
FluToggleSwitch{
id:switch_showline
text:"showLine"
checked: true
checked: false
}
FluToggleSwitch{
id:switch_draggable
text:"draggable"
checked: true
checked: false
}
FluToggleSwitch{
id:switch_checkable
text:"checkable"
checked: false
}
FluButton{
text:"all expand"
@ -111,6 +120,7 @@ FluContentPage {
cellHeight: slider_cell_height.value
draggable:switch_draggable.checked
showLine: switch_showline.checked
checkable:switch_checkable.checked
depthPadding: slider_depth_padding.value
Component.onCompleted: {
var data = treeData()

View File

@ -302,7 +302,7 @@ FluObject{
onTap:{ navigationView.push(url) }
}
FluPaneItem{
title:"TreeView(Todo)"
title:"TreeView"
url:"qrc:/example/qml/page/T_TreeView.qml"
onDropped:{ FluApp.navigate("/pageWindow",{title:title,url:url}) }
onTap:{ navigationView.push(url) }

View File

@ -13,7 +13,7 @@ FluContentPage {
function treeData(){
const dig = (path = '0', level = 4) => {
const list = [];
for (let i = 0; i < 9; i += 1) {
for (let i = 0; i < 6; i += 1) {
const key = `${path}-${i}`;
const treeNode = {
title: key,
@ -46,6 +46,10 @@ FluContentPage {
text:"共计%1条数据当前显示的%2条数据".arg(tree_view.count()).arg(tree_view.visibleCount())
}
FluText{
text:"共计选中%1条数据".arg(tree_view.selectionModel().length)
}
RowLayout{
spacing: 10
FluText{
@ -75,12 +79,17 @@ FluContentPage {
FluToggleSwitch{
id:switch_showline
text:"showLine"
checked: true
checked: false
}
FluToggleSwitch{
id:switch_draggable
text:"draggable"
checked: true
checked: false
}
FluToggleSwitch{
id:switch_checkable
text:"checkable"
checked: false
}
FluButton{
text:"all expand"
@ -112,6 +121,7 @@ FluContentPage {
cellHeight: slider_cell_height.value
draggable:switch_draggable.checked
showLine: switch_showline.checked
checkable:switch_checkable.checked
depthPadding: slider_depth_padding.value
Component.onCompleted: {
var data = treeData()