Compare commits

...

2 Commits

Author SHA1 Message Date
yang.yongquan 691012903a merge 2023-07-06 21:22:37 +08:00
yang.yongquan 2d9ff239c7 笔记创建 2023-07-06 21:21:15 +08:00
4 changed files with 49 additions and 21 deletions

View File

@ -101,9 +101,8 @@ FluWindow {
Connections { Connections {
target: SignalFileOperation target: SignalFileOperation
function onOpen(file) { function onOpen(file) {
stack_view.push(file_view, { stack_view.clear()
"knowledgeFileId": file stack_view.push(file_view, {knowledgeFileId: file})
})
} }
function onOpenNote(note) { function onOpenNote(note) {
stack_view.push(note_view, { stack_view.push(note_view, {

View File

@ -131,12 +131,8 @@ FluArea {
console.log(content_area.type) console.log(content_area.type)
} }
FluIconButton { FluText {
iconSize: 12 font.pointSize: 12
iconSource: FluentIcons.Back
onClicked: {
emit: SignalFileOperation.back()
}
Layout.margins: -5 Layout.margins: -5
} }

View File

@ -18,6 +18,12 @@ FluArea {
property string noteTitle property string noteTitle
property string noteContent property string noteContent
Component.onCompleted: {
noteTitle = Qt.binding(function() {
return input_title.text
})
}
FluScrollablePage { FluScrollablePage {
id: edit_page id: edit_page
anchors.fill: parent anchors.fill: parent
@ -25,6 +31,7 @@ FluArea {
topPadding: 5 topPadding: 5
rightPadding: 5 rightPadding: 5
bottomPadding: 0 bottomPadding: 0
RowLayout {
FluIconButton { FluIconButton {
iconSize: 12 iconSize: 12
iconSource: FluentIcons.Back iconSource: FluentIcons.Back
@ -33,6 +40,7 @@ FluArea {
} }
Layout.margins: -5 Layout.margins: -5
} }
}
Item { Item {
Layout.fillWidth: true Layout.fillWidth: true
implicitHeight: 50 implicitHeight: 50
@ -47,18 +55,42 @@ FluArea {
} }
} }
FluTextBox { FluTextBox {
id: input_title
padding: 10 padding: 10
placeholderText:"单行输入框" placeholderText:"单行输入框"
implicitWidth: parent.width implicitWidth: parent.width
} }
} }
} }
Item {
Layout.fillWidth: true
implicitHeight: parent.height
Layout.fillWidth: true
NoteEditPage {
FluText {
padding: 10
text: "内容"
font {
pointSize: 15
bold: true
}
}
NoteEditPage {
id: text_view
noteId: "255454"
width: parent.width
height: width*9/16
}
RowLayout {
Layout.alignment: Qt.AlignCenter
Layout.topMargin: 10
FluFilledButton {
text: "上传"
onClicked: {
console.log(noteTitle)
}
}
FluButton {
text: "取消"
} }
} }
} }

View File

@ -11,6 +11,7 @@ FluArea {
paddings: 0 paddings: 0
backgroundColor: "#f9f9f9" backgroundColor: "#f9f9f9"
property string noteId: "234" property string noteId: "234"
Layout.fillWidth: true
FluScrollablePage { FluScrollablePage {
id: edit_page id: edit_page
@ -153,7 +154,7 @@ FluArea {
property bool isPreviewShowing: true property bool isPreviewShowing: true
Layout.fillWidth: true Layout.fillWidth: true
implicitHeight: 300 implicitHeight: width * 8/16
ScrollView { ScrollView {
id: edit_show_view id: edit_show_view