FluentUI/Gallery/res/qml/screen/NewProjectScreen.qml
yxdy ff15075c79
Some checks are pending
Gallery App Build / macOS (push) Waiting to run
Gallery App Build / Windows (push) Waiting to run
Gallery App Build / Ubuntu (push) Waiting to run
修改样式
2025-03-07 16:23:09 +08:00

91 lines
2.3 KiB
QML

import QtQuick
import QtQuick.Layouts
import QtQuick.Controls
import FluentUI.Controls
import FluentUI.impl
import Gallery
import QtQuick.LocalStorage 2.0
import "../DB/database.js" as DB
Item {
property var pro_title: ""
property var pro_desc: ""
id: control
Label{
text: "新增项目"
}
Connections{
target: window
function onInit(arg){
console.log("初始化。。。")
// DB.initDatabase()
// var result = DB.readMenuTree("1")
// console.log(DB)
// console.log(DB.readData("color"))
// DB.insertData("color", "red")
}
}
ColumnLayout {
spacing: 20
anchors.centerIn: parent
width: 260
Label {
elide: Label.ElideRight
text: "新建项目"
Layout.fillWidth: true
font.pointSize: 15
horizontalAlignment: Text.AlignHCenter
}
TextField {
id: tb_title
focus: true
placeholderText: "项目名称"
Layout.fillWidth: true
text: control.pro_title
}
TextField {
id: tb_company
focus: true
placeholderText: "运营商"
Layout.fillWidth: true
text: ""
}
MultiLineTextBox {
id: tb_desc
placeholderText: "项目描述"
Layout.fillWidth: true
text: control.pro_desc
}
Item{
implicitHeight: 40
Layout.fillWidth: true
Button{
text: "取消"
anchors{
left: parent.left
verticalCenter: parent.verticalCenter
}
onClicked: {
window.close()
}
}
FilledButton{
text: "确认"
anchors{
right: parent.right
verticalCenter: parent.verticalCenter
}
onClicked: {
window.setResult({title: tb_title.text, company: tb_company.text, desc: tb_desc.text})
window.close()
}
}
}
}
}