This commit is contained in:
zhuzichu
2023-09-15 19:11:55 +08:00
parent e6d9de34ea
commit be194e7624
16 changed files with 637 additions and 155 deletions

View File

@ -12,7 +12,7 @@ FluScrollablePage{
FluArea{
Layout.fillWidth: true
Layout.topMargin: 20
height: 240
height: 270
paddings: 10
ColumnLayout{
spacing: 14
@ -23,7 +23,7 @@ FluScrollablePage{
FluButton{
text:"Info"
onClicked: {
showInfo("这是一个Info样式的InfoBar")
showInfo("这是一个Info样式的InfoBar",0,"123")
}
}
FluButton{
@ -44,6 +44,12 @@ FluScrollablePage{
showSuccess("这是一个Success样式的InfoBar这是一个Success样式的InfoBar")
}
}
FluButton{
text:"手动关闭的InfoBar"
onClicked: {
showInfo("这是一个Info样式的InfoBar",0,"支持手动关闭")
}
}
FluButton{
text:"Loading"
onClicked: {

View File

@ -12,7 +12,7 @@ FluScrollablePage {
function treeData(){
const dig = (path = '0', level = 4) => {
const list = [];
for (let i = 0; i < 6; i += 1) {
for (let i = 0; i < 10; i += 1) {
const key = `${path}-${i}`;
const treeNode = {
title: key,
@ -32,33 +32,71 @@ FluScrollablePage {
Layout.fillWidth: true
Layout.topMargin: 10
paddings: 10
height: 60
FluText{
text:"共计:%1条数据".arg(tree_view.count())
height: 80
Column{
anchors.verticalCenter: parent.verticalCenter
spacing: 10
FluText{
text:"高性能树控件新的TreeView用TableView实现"
}
FluText{
text:"共计:%1条数据当前显示的%2条数据".arg(tree_view.count()).arg(tree_view.visibleCount())
}
}
}
FluArea{
Layout.fillWidth: true
Layout.topMargin: 10
paddings: 10
height: 400
Item{
anchors.fill: tree_view
FluShadow{}
}
FluTreeView{
id:tree_view
width:240
width:slider_width.value
anchors{
top:parent.top
left:parent.left
bottom:parent.bottom
}
showLine: switch_showline.checked
Component.onCompleted: {
var data = treeData()
dataSource = data
}
}
}
Column{
anchors{
top:parent.top
topMargin: 10
bottomMargin: 10
rightMargin: 10
bottom:parent.bottom
right: parent.right
}
RowLayout{
spacing: 10
FluText{
text:"width:"
Layout.alignment: Qt.AlignVCenter
}
FluSlider{
id:slider_width
value: 200
from: 160
to:320
}
}
FluToggleSwitch{
id:switch_showline
text:"showLine"
checked: true
}
}
}
CodeExpander{
Layout.fillWidth: true
Layout.topMargin: -1