mirror of
https://github.com/zhuzichu520/FluentUI.git
synced 2025-07-01 15:42:20 +08:00
update
This commit is contained in:
@ -355,6 +355,12 @@ FluObject{
|
||||
navigationView.push("qrc:/example/qml/page/T_Screenshot.qml")
|
||||
}
|
||||
}
|
||||
FluPaneItem{
|
||||
title:"Captcha"
|
||||
onTap:{
|
||||
navigationView.push("qrc:/example/qml/page/T_Captcha.qml")
|
||||
}
|
||||
}
|
||||
FluPaneItem{
|
||||
title:"Chart"
|
||||
onTap:{
|
||||
|
54
example/qml/page/T_Captcha.qml
Normal file
54
example/qml/page/T_Captcha.qml
Normal file
@ -0,0 +1,54 @@
|
||||
import QtQuick
|
||||
import QtQuick.Layouts
|
||||
import QtQuick.Window
|
||||
import QtQuick.Controls
|
||||
import FluentUI
|
||||
import "qrc:///example/qml/component"
|
||||
|
||||
FluScrollablePage{
|
||||
|
||||
title:"Captcha"
|
||||
|
||||
|
||||
FluCaptcha{
|
||||
id:captcha
|
||||
Layout.topMargin: 20
|
||||
MouseArea{
|
||||
anchors.fill: parent
|
||||
cursorShape: Qt.PointingHandCursor
|
||||
onClicked: {
|
||||
captcha.refresh()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
FluButton{
|
||||
text:"Refresh"
|
||||
Layout.topMargin: 20
|
||||
onClicked: {
|
||||
captcha.refresh()
|
||||
}
|
||||
}
|
||||
|
||||
RowLayout{
|
||||
spacing: 10
|
||||
Layout.topMargin: 10
|
||||
FluTextBox{
|
||||
id:text_box
|
||||
placeholderText: "请输入验证码"
|
||||
}
|
||||
FluButton{
|
||||
text:"verify"
|
||||
onClicked: {
|
||||
var success = captcha.verify(text_box.text)
|
||||
if(success){
|
||||
showSuccess("验证码正确")
|
||||
}else{
|
||||
showError("错误验证,请重新输入")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
Reference in New Issue
Block a user