AicsKnowledgeBase_client/AicsKnowledgeBase/qml/component/NoteListItem.qml

62 lines
1.5 KiB
QML
Raw Normal View History

2023-07-02 12:54:04 +08:00
import QtQuick 2.15
import FluentUI
import QtQuick.Layouts
FluArea {
2023-07-02 22:39:39 +08:00
id: noteItem
2023-07-02 12:54:04 +08:00
property string uuid
property string title
property string brief
property string date
property int pageView
property int stars
2023-07-02 22:39:39 +08:00
property string author
2023-07-02 12:54:04 +08:00
ColumnLayout {
id: row
anchors.fill: parent
anchors.margins: 10
spacing: 10
2023-07-02 22:39:39 +08:00
RowLayout {
id: titleRow
Layout.preferredWidth: parent.width
2023-07-02 12:54:04 +08:00
FluText {
2023-07-02 22:39:39 +08:00
text: title
font.bold: true
font.pointSize: 15
Layout.alignment: Qt.AlignLeft
2023-07-02 12:54:04 +08:00
}
FluText {
2023-07-02 22:39:39 +08:00
text: author
Layout.alignment: Qt.AlignRight
2023-07-02 12:54:04 +08:00
}
}
2023-07-02 22:39:39 +08:00
FluText {
text: " " + brief
Layout.fillWidth: true
wrapMode: Text.WrapAnywhere
elide: Text.ElideRight
maximumLineCount: 3
}
2023-07-02 12:54:04 +08:00
RowLayout {
2023-07-02 22:39:39 +08:00
id: bottomRow
Layout.preferredWidth: parent.width
FluText {
text: date
color: "#5F5F5F"
Layout.alignment: Qt.AlignLeft
}
FluText {
text: pageView + " 浏览"
color: "#5F5F5F"
Layout.alignment: Qt.AlignRight
}
FluText {
text: stars + " 收藏"
color: "#5F5F5F"
Layout.alignment: Qt.AlignRight
2023-07-02 12:54:04 +08:00
}
}
}
}