Merge branch 'main' of http://101.34.228.45:3000/auto/AicsKnowledgeBase into main
commit
f32bcae463
|
@ -1,5 +1,7 @@
|
||||||
import QtQuick 2.15
|
import QtQuick 2.15
|
||||||
import QtQuick.Layouts
|
import QtQuick.Layouts
|
||||||
|
import QtQuick.Controls
|
||||||
|
import QtQuick.Window
|
||||||
import FluentUI
|
import FluentUI
|
||||||
import "qrc:///AicsKnowledgeBase/qml/global"
|
import "qrc:///AicsKnowledgeBase/qml/global"
|
||||||
|
|
||||||
|
@ -50,23 +52,13 @@ Item {
|
||||||
date: "2022-02-02"
|
date: "2022-02-02"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
ListView {
|
|
||||||
id: listView
|
|
||||||
anchors.fill: parent
|
|
||||||
spacing: 8
|
|
||||||
header: noteListItemHeader
|
|
||||||
model: noteListModel
|
|
||||||
delegate: noteListItemDelegate
|
|
||||||
}
|
|
||||||
|
|
||||||
Component {
|
|
||||||
id: noteListItemHeader
|
|
||||||
Item {
|
|
||||||
id: noteListItemHeaderItem
|
|
||||||
width: ListView.view.width
|
|
||||||
height: 48
|
|
||||||
RowLayout {
|
RowLayout {
|
||||||
width: parent.width
|
height: 48
|
||||||
|
anchors.left: parent.left
|
||||||
|
anchors.right: parent.right
|
||||||
|
anchors.leftMargin: 10
|
||||||
|
anchors.rightMargin: 10
|
||||||
FluText {
|
FluText {
|
||||||
text: "笔记列表"
|
text: "笔记列表"
|
||||||
font.pixelSize: 18
|
font.pixelSize: 18
|
||||||
|
@ -81,13 +73,19 @@ Item {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
FluScrollablePage {
|
||||||
Component {
|
anchors.fill: parent
|
||||||
id: noteListItemDelegate
|
anchors.topMargin: 50
|
||||||
Rectangle {
|
ColumnLayout {
|
||||||
|
Layout.fillWidth: true
|
||||||
|
spacing: 8
|
||||||
|
Repeater {
|
||||||
|
id: repeater
|
||||||
|
model: noteListModel
|
||||||
|
delegate: Rectangle {
|
||||||
id: noteListItemRect
|
id: noteListItemRect
|
||||||
width: ListView.view.width
|
Layout.fillWidth: true
|
||||||
height: 150
|
height: 150
|
||||||
MouseArea {
|
MouseArea {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
|
@ -110,8 +108,11 @@ Item {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
function setListModel(listModel) {
|
function setListModel(listModel) {
|
||||||
listView.model = listModel
|
repeater.model = listModel
|
||||||
//console.log(listView.model.get(0).uuid)
|
//console.log(listView.model.get(0).uuid)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -70,6 +70,18 @@ QtObject {
|
||||||
xhr.send(arg)
|
xhr.send(arg)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function putForm(url, arg, success, failure) {
|
||||||
|
var xhr = new XMLHttpRequest
|
||||||
|
xhr.open("POST", baseUrl + url)
|
||||||
|
xhr.setRequestHeader("Content-Length", arg.length)
|
||||||
|
xhr.setRequestHeader("Content-Type",
|
||||||
|
"application/x-www-form-urlencoded;")
|
||||||
|
xhr.onreadystatechange = function () {
|
||||||
|
handleResponse(xhr, success, failure)
|
||||||
|
}
|
||||||
|
xhr.send(arg)
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/* function post(url, arg, success, failure) {
|
/* function post(url, arg, success, failure) {
|
||||||
var xhr = new XMLHttpRequest
|
var xhr = new XMLHttpRequest
|
||||||
|
|
|
@ -14,6 +14,8 @@ import "qrc:///AicsKnowledgeBase/qml/global"
|
||||||
FluArea {
|
FluArea {
|
||||||
property ListModel noteListModel2: ListModel {}
|
property ListModel noteListModel2: ListModel {}
|
||||||
Popup {
|
Popup {
|
||||||
|
x: parent.width - width
|
||||||
|
implicitHeight: parent.height
|
||||||
id: popup
|
id: popup
|
||||||
modal: true //模态, 为 true后弹出窗口会叠加一个独特的背景调光效果
|
modal: true //模态, 为 true后弹出窗口会叠加一个独特的背景调光效果
|
||||||
focus: true //焦点, 当弹出窗口实际接收到焦点时,activeFocus将为真
|
focus: true //焦点, 当弹出窗口实际接收到焦点时,activeFocus将为真
|
||||||
|
@ -24,12 +26,13 @@ FluArea {
|
||||||
color: Qt.rgba(0, 0, 0, 0) //背景为无色
|
color: Qt.rgba(0, 0, 0, 0) //背景为无色
|
||||||
}
|
}
|
||||||
FluArea {
|
FluArea {
|
||||||
|
|
||||||
width: 350
|
width: 350
|
||||||
height: 500
|
height: 500
|
||||||
backgroundColor: "#f9f9f9"
|
backgroundColor: "#f9f9f9"
|
||||||
NoteList {
|
NoteList {
|
||||||
id: noteList
|
id: noteList
|
||||||
noteListModel: noteListModel2
|
//noteListModel: noteListModel2
|
||||||
onOpen: function handle(noteId, authorId) {
|
onOpen: function handle(noteId, authorId) {
|
||||||
emit: SignalFileOperation.openNote(noteId, authorId)
|
emit: SignalFileOperation.openNote(noteId, authorId)
|
||||||
popup.close()
|
popup.close()
|
||||||
|
|
Loading…
Reference in New Issue