yang.yongquan 2023-07-07 03:21:48 +08:00
commit ecff8e709c
10 changed files with 18 additions and 18 deletions

View File

@ -126,9 +126,15 @@ Item {
return "OTHER" return "OTHER"
} }
RowLayout { RowLayout {
Layout.preferredWidth: parent.width Layout.alignment: Qt.AlignRight
//Layout.preferredWidth: parent.width
layoutDirection: Qt.RightToLeft
UploadButton {
//Layout.alignment: Qt.AlignRight
header: header
}
Item { Item {
anchors.right: uploadBtn.left //anchors.right: uploadBtn.left
height: 28 height: 28
width: 28 width: 28
InputDialog { InputDialog {
@ -153,20 +159,14 @@ Item {
} }
} }
Image { FluIconButton {
source: "qrc:/AicsKnowledgeBase/res/createFolder.png"
anchors.fill: parent
}
MouseArea {
anchors.fill: parent anchors.fill: parent
iconSource: FluentIcons.NewFolder
onClicked: { onClicked: {
dialog.open() dialog.open()
} }
} }
} }
UploadButton {
Layout.alignment: Qt.AlignRight
}
} }
RowLayout { RowLayout {
id: fileListItemHeaderItem id: fileListItemHeaderItem

View File

@ -108,6 +108,7 @@ FluArea {
source: type ? "qrc:/AicsKnowledgeBase/res/" + type + ".png" : "" source: type ? "qrc:/AicsKnowledgeBase/res/" + type + ".png" : ""
Layout.preferredHeight: 24 Layout.preferredHeight: 24
Layout.preferredWidth: 24 Layout.preferredWidth: 24
fillMode: Image.PreserveAspectFit
} }
FluText { FluText {
id: title id: title

View File

@ -10,12 +10,12 @@ FluButton {
property var header property var header
property var currentSelectedFile: null property var currentSelectedFile: null
Layout.alignment: Qt.AlignRight //Layout.alignment: Qt.AlignRight
text: "上传" text: "上传"
onClicked: function () { onClicked: function () {
console.log("click") console.log("click")
//fileDialog.open() fileDialog.open()
popup.open() //popup.open()
} }
FileDialog { FileDialog {
id: fileDialog id: fileDialog
@ -110,14 +110,13 @@ FluButton {
Layout.fillHeight: true Layout.fillHeight: true
text: "上传" text: "上传"
onClicked: { onClicked: {
popup.close()
var tagIds = []
for (var i = 0; i < tags.tagList.count; i++) { for (var i = 0; i < tags.tagList.count; i++) {
console.log(tags.tagList.get(i).tag) console.log(tags.tagList.get(i).tag)
console.log(tags.tagList.get(i).id) console.log(tags.tagList.get(i).id)
tagIds.push(tags.tagList.get(i).id)
} }
return
popup.close()
let name = FileTransferManager.getFileName( let name = FileTransferManager.getFileName(
currentSelectedFile) currentSelectedFile)
const size = FileTransferManager.getFileSize( const size = FileTransferManager.getFileSize(
@ -131,7 +130,7 @@ FluButton {
"brief": brief_textbox.text, "brief": brief_textbox.text,
"size": size, "size": size,
"md5": md5, "md5": md5,
"tags": [], "tags": tagIds,
"parentId": currentParentId() "parentId": currentParentId()
} }
console.log("begin") console.log("begin")

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.8 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.3 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.5 KiB

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.2 KiB

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.5 KiB

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.9 KiB

After

Width:  |  Height:  |  Size: 2.0 KiB