2023-08-24 15:50:37 +08:00
|
|
|
import QtQuick
|
|
|
|
import QtQuick.Layouts
|
|
|
|
import QtQuick.Window
|
|
|
|
import QtQuick.Controls
|
|
|
|
import FluentUI
|
2024-01-25 17:26:50 +08:00
|
|
|
import "../component"
|
2023-08-24 15:50:37 +08:00
|
|
|
|
|
|
|
FluScrollablePage{
|
|
|
|
|
|
|
|
title:"InfoBar"
|
|
|
|
|
|
|
|
FluArea{
|
|
|
|
Layout.fillWidth: true
|
|
|
|
Layout.topMargin: 20
|
2023-09-15 19:11:55 +08:00
|
|
|
height: 270
|
2023-08-24 15:50:37 +08:00
|
|
|
paddings: 10
|
|
|
|
ColumnLayout{
|
|
|
|
spacing: 14
|
|
|
|
anchors{
|
|
|
|
verticalCenter: parent.verticalCenter
|
|
|
|
left: parent.left
|
|
|
|
}
|
|
|
|
FluButton{
|
|
|
|
text:"Info"
|
|
|
|
onClicked: {
|
2023-09-17 20:36:33 +08:00
|
|
|
showInfo("这是一个Info样式的InfoBar")
|
2023-08-24 15:50:37 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
FluButton{
|
|
|
|
text:"Warning"
|
|
|
|
onClicked: {
|
|
|
|
showWarning("这是一个Warning样式的InfoBar")
|
|
|
|
}
|
|
|
|
}
|
|
|
|
FluButton{
|
|
|
|
text:"Error"
|
|
|
|
onClicked: {
|
|
|
|
showError("这是一个Error样式的InfoBar")
|
|
|
|
}
|
|
|
|
}
|
|
|
|
FluButton{
|
|
|
|
text:"Success"
|
|
|
|
onClicked: {
|
2024-02-19 17:32:42 +08:00
|
|
|
showSuccess("这是一个Success样式的InfoBar")
|
2023-08-24 15:50:37 +08:00
|
|
|
}
|
|
|
|
}
|
2023-09-15 19:11:55 +08:00
|
|
|
FluButton{
|
|
|
|
text:"手动关闭的InfoBar"
|
|
|
|
onClicked: {
|
|
|
|
showInfo("这是一个Info样式的InfoBar",0,"支持手动关闭")
|
|
|
|
}
|
|
|
|
}
|
2023-08-24 15:50:37 +08:00
|
|
|
FluButton{
|
|
|
|
text:"Loading"
|
|
|
|
onClicked: {
|
|
|
|
showLoading()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
CodeExpander{
|
|
|
|
Layout.fillWidth: true
|
|
|
|
Layout.topMargin: -1
|
|
|
|
code:'showInfo("这是一个Info样式的InfoBar")
|
|
|
|
|
|
|
|
showWarning("这是一个Warning样式的InfoBar")
|
|
|
|
|
|
|
|
showError("这是一个Error样式的InfoBar")
|
|
|
|
|
|
|
|
showSuccess("这是一个Success样式的InfoBar这是一个Success样式的InfoBar")'
|
|
|
|
}
|
|
|
|
}
|