2023-08-24 15:50:37 +08:00
|
|
|
import QtQuick
|
|
|
|
import QtQuick.Layouts
|
|
|
|
import QtQuick.Controls
|
|
|
|
import QtQuick.Window
|
|
|
|
import FluentUI
|
2024-01-25 17:26:50 +08:00
|
|
|
import "../component"
|
2023-08-24 15:50:37 +08:00
|
|
|
|
|
|
|
FluScrollablePage{
|
|
|
|
|
2024-02-23 12:26:10 +08:00
|
|
|
title:"StatusLayout"
|
2023-08-24 15:50:37 +08:00
|
|
|
|
|
|
|
FluArea{
|
|
|
|
id:layout_actions
|
|
|
|
Layout.fillWidth: true
|
|
|
|
Layout.topMargin: 20
|
|
|
|
height: 50
|
|
|
|
paddings: 10
|
|
|
|
RowLayout{
|
|
|
|
spacing: 14
|
|
|
|
FluDropDownButton{
|
|
|
|
id:btn_status_mode
|
|
|
|
Layout.preferredWidth: 140
|
|
|
|
text:"Loading"
|
|
|
|
FluMenuItem{
|
|
|
|
text:"Loading"
|
|
|
|
onClicked: {
|
|
|
|
btn_status_mode.text = text
|
2024-02-23 12:26:10 +08:00
|
|
|
status_view.statusMode = FluStatusLayoutType.Loading
|
2023-08-24 15:50:37 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
FluMenuItem{
|
|
|
|
text:"Empty"
|
|
|
|
onClicked: {
|
|
|
|
btn_status_mode.text = text
|
2024-02-23 12:26:10 +08:00
|
|
|
status_view.statusMode = FluStatusLayoutType.Empty
|
2023-08-24 15:50:37 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
FluMenuItem{
|
|
|
|
text:"Error"
|
|
|
|
onClicked: {
|
|
|
|
btn_status_mode.text = text
|
2024-02-23 12:26:10 +08:00
|
|
|
status_view.statusMode = FluStatusLayoutType.Error
|
2023-08-24 15:50:37 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
FluMenuItem{
|
|
|
|
text:"Success"
|
|
|
|
onClicked: {
|
|
|
|
btn_status_mode.text = text
|
2024-02-23 12:26:10 +08:00
|
|
|
status_view.statusMode = FluStatusLayoutType.Success
|
2023-08-24 15:50:37 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
FluArea{
|
|
|
|
Layout.fillWidth: true
|
|
|
|
Layout.topMargin: 10
|
|
|
|
height: 380
|
|
|
|
paddings: 10
|
2024-02-23 12:26:10 +08:00
|
|
|
FluStatusLayout{
|
2023-08-24 15:50:37 +08:00
|
|
|
id:status_view
|
|
|
|
anchors.fill: parent
|
|
|
|
onErrorClicked:{
|
|
|
|
showError("点击重新加载")
|
|
|
|
}
|
|
|
|
Rectangle {
|
|
|
|
anchors.fill: parent
|
2023-11-02 15:33:59 +08:00
|
|
|
color:FluTheme.primaryColor
|
2023-08-24 15:50:37 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
CodeExpander{
|
|
|
|
Layout.fillWidth: true
|
|
|
|
Layout.topMargin: -1
|
2024-02-23 12:26:10 +08:00
|
|
|
code:'FluStatusLayout{
|
2023-08-24 15:50:37 +08:00
|
|
|
anchors.fill: parent
|
2024-02-23 12:26:10 +08:00
|
|
|
statusMode: FluStatusLayoutType.Loading
|
2023-08-24 15:50:37 +08:00
|
|
|
Rectangle{
|
|
|
|
anchors.fill: parent
|
2023-11-02 15:33:59 +08:00
|
|
|
color:FluTheme.primaryColor
|
2023-08-24 15:50:37 +08:00
|
|
|
}
|
|
|
|
}'
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|