AicsKnowledgeBase_client/AicsKnowledgeBase/qml/LoginPage.qml

99 lines
3.0 KiB
QML
Raw Normal View History

2023-06-16 21:07:11 +08:00
import QtQuick
import FluentUI
import QtQuick.Controls
import QtQuick.Window
import QtQuick.Layouts
import org.wangwenx190.FramelessHelper
2023-06-19 15:45:16 +08:00
import AicsKB.HttpClient
2023-06-16 21:07:11 +08:00
2023-06-18 00:06:24 +08:00
Row {
anchors.fill: parent
2023-06-16 21:07:11 +08:00
2023-06-18 00:06:24 +08:00
Rectangle {
id: introdutcitonItem
height: parent.height
width: parent.width * 0.5
color: "#f3fbff"
2023-06-16 21:07:11 +08:00
2023-06-18 00:06:24 +08:00
//color: "transparent"
Image {
anchors.fill: parent
fillMode: Image.PreserveAspectFit
source: "qrc:/AicsKnowledgeBase/res/login_background.webp"
2023-06-16 21:07:11 +08:00
}
}
2023-06-18 00:06:24 +08:00
ColumnLayout {
id: loginRect
width: parent.width * 0.5
height: parent.height
FluPivot {
2023-06-19 15:45:16 +08:00
2023-06-18 00:06:24 +08:00
Layout.fillWidth: true
Layout.alignment: Qt.AlignVCenter
Layout.margins: 20
height: 200
2023-06-16 21:07:11 +08:00
2023-06-18 00:06:24 +08:00
FluPivotItem {
2023-06-19 15:45:16 +08:00
id: loginItem
2023-06-18 00:06:24 +08:00
title: "登录"
2023-06-16 21:07:11 +08:00
2023-06-19 15:45:16 +08:00
function login(s)
{
showSuccess(s);
}
2023-06-18 00:06:24 +08:00
contentItem: Column {
anchors.margins: {
top: 10
}
anchors.top: parent.top
spacing: 12
2023-06-16 21:07:11 +08:00
2023-06-18 00:06:24 +08:00
FluTextBox {
anchors.left: parent.left
anchors.right: parent.right
id: account
placeholderText: "用户名"
}
FluPasswordBox {
anchors.left: parent.left
anchors.right: parent.right
id: password
placeholderText: "密码"
}
RowLayout {
anchors.left: parent.left
anchors.right: parent.right
FluCheckBox {
Layout.alignment: Qt.AlignLeft
//anchors.left: parent.left
text: "记住密码"
2023-06-16 21:07:11 +08:00
}
2023-06-18 00:06:24 +08:00
FluTextButton {
Layout.alignment: Qt.AlignRight
//anchors.right: parent.right
text: "忘记密码?"
2023-06-16 21:07:11 +08:00
}
2023-06-18 00:06:24 +08:00
}
FluFilledButton {
anchors.horizontalCenter: parent.horizontalCenter
2023-06-18 15:04:51 +08:00
normalColor: FluColors.Green.normal
2023-06-18 00:06:24 +08:00
text: "登录"
2023-06-18 15:04:51 +08:00
onClicked: {
2023-06-19 15:45:16 +08:00
HttpClient.doGetRequest(loginItem, "login");
2023-06-18 15:04:51 +08:00
}
2023-06-16 21:07:11 +08:00
}
}
2023-06-18 00:06:24 +08:00
}
FluPivotItem {
title: "注册"
// Rectangle{
// anchors.fill: parent
// color: "blue"
// }
2023-06-16 21:07:11 +08:00
}
}
}
}