From 78865cd93c67d01a542f5e65d0ddb83594c5488d Mon Sep 17 00:00:00 2001 From: shmily744 <1527550984@qq.com> Date: Tue, 4 Jul 2023 13:38:01 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9search=E7=95=8C=E9=9D=A2?= =?UTF-8?q?=E5=B8=83=E5=B1=80=EF=BC=8Cfilelist=E6=B7=BB=E5=8A=A0=E9=9A=90?= =?UTF-8?q?=E8=97=8Fhead=E5=8F=82=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- AicsKnowledgeBase/qml/component/FileList.qml | 4 +++- AicsKnowledgeBase/qml/page/SearchPage.qml | 24 +++++++++++--------- 2 files changed, 16 insertions(+), 12 deletions(-) diff --git a/AicsKnowledgeBase/qml/component/FileList.qml b/AicsKnowledgeBase/qml/component/FileList.qml index 642a41b..9e01396 100644 --- a/AicsKnowledgeBase/qml/component/FileList.qml +++ b/AicsKnowledgeBase/qml/component/FileList.qml @@ -8,17 +8,19 @@ Item { signal search(string tag) signal open(string file) + property bool disableHeader: false ListView { id: listView anchors.fill: parent spacing: 10 - header: fileListItemHeader + header: disableHeader ? null :fileListItemHeader model: fileListModel delegate: fileListItemDelegate Component.onCompleted: { update() } } + Component { id: fileListItemHeader Item { diff --git a/AicsKnowledgeBase/qml/page/SearchPage.qml b/AicsKnowledgeBase/qml/page/SearchPage.qml index 69a36e6..c47cfb0 100644 --- a/AicsKnowledgeBase/qml/page/SearchPage.qml +++ b/AicsKnowledgeBase/qml/page/SearchPage.qml @@ -78,20 +78,20 @@ FluArea { clicked() } onClicked:{ - selectPDFAndWord.checked=true selectVideo.checked=true - selectPPT.checked=true + selectDoc.checked=true + selectAudio.checked=true } } FluCheckBox{ - id:selectPDFAndWord + id:selectVideo text:"Video" onClicked:{ selectFormat.setAllStatus() } } FluCheckBox{ - id:selectPPT + id:selectDoc text:"Doc" onClicked:{ selectFormat.setAllStatus() @@ -99,7 +99,7 @@ FluArea { } FluCheckBox{ - id:selectVideo + id:selectAudio text:"Audio" onClicked:{ selectFormat.setAllStatus() @@ -107,18 +107,20 @@ FluArea { } 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{ - + disableHeader: true } } - - - } }