修改search界面布局,filelist添加隐藏head参数

main
shmily744 2023-07-04 13:38:01 +08:00
parent 8379c965b5
commit 78865cd93c
2 changed files with 16 additions and 12 deletions

View File

@ -8,17 +8,19 @@ Item {
signal search(string tag) signal search(string tag)
signal open(string file) signal open(string file)
property bool disableHeader: false
ListView { ListView {
id: listView id: listView
anchors.fill: parent anchors.fill: parent
spacing: 10 spacing: 10
header: fileListItemHeader header: disableHeader ? null :fileListItemHeader
model: fileListModel model: fileListModel
delegate: fileListItemDelegate delegate: fileListItemDelegate
Component.onCompleted: { Component.onCompleted: {
update() update()
} }
} }
Component { Component {
id: fileListItemHeader id: fileListItemHeader
Item { Item {

View File

@ -78,20 +78,20 @@ FluArea {
clicked() clicked()
} }
onClicked:{ onClicked:{
selectPDFAndWord.checked=true
selectVideo.checked=true selectVideo.checked=true
selectPPT.checked=true selectDoc.checked=true
selectAudio.checked=true
} }
} }
FluCheckBox{ FluCheckBox{
id:selectPDFAndWord id:selectVideo
text:"Video" text:"Video"
onClicked:{ onClicked:{
selectFormat.setAllStatus() selectFormat.setAllStatus()
} }
} }
FluCheckBox{ FluCheckBox{
id:selectPPT id:selectDoc
text:"Doc" text:"Doc"
onClicked:{ onClicked:{
selectFormat.setAllStatus() selectFormat.setAllStatus()
@ -99,7 +99,7 @@ FluArea {
} }
FluCheckBox{ FluCheckBox{
id:selectVideo id:selectAudio
text:"Audio" text:"Audio"
onClicked:{ onClicked:{
selectFormat.setAllStatus() selectFormat.setAllStatus()
@ -107,18 +107,20 @@ FluArea {
} }
function setAllStatus() { function setAllStatus() {
selectAllFormat.checked = selectPDFAndWord.checked && selectPPT.checked && selectVideo.checked selectAllFormat.checked = selectVideo.checked && selectDoc.checked && selectAudio.checked
} }
} }
Rectangle{ FluArea{
backgroundColor: "#f9f9f9"
border.width: 0
width: parent.width
height: 500
FileList{ FileList{
disableHeader: true
} }
} }
} }
} }