main
zhuzihcu 2023-03-30 18:34:03 +08:00
parent cbd4c229aa
commit b5f44f4f7d
4 changed files with 11 additions and 6 deletions

View File

@ -17,7 +17,7 @@ FluWindow {
onInitArgument:
(argument)=>{
textbox_uesrname.text = argument.username
textbox_uesrname.updateText(argument.username)
textbox_password.focus = true
}
@ -35,7 +35,7 @@ FluWindow {
FluAutoSuggestBox{
id:textbox_uesrname
values:["Admin","User"]
items:[{title:"Admin"},{title:"User"}]
placeholderText: "请输入账号"
Layout.preferredWidth: 260
Layout.alignment: Qt.AlignHCenter

View File

@ -225,8 +225,12 @@ TextField{
function handleClick(modelData){
input_popup.visible = false
input.itemClicked(modelData)
updateText(modelData.title)
}
function updateText(text){
d.flagVisible = false
input.text = modelData.title
input.text = text
d.flagVisible = true
}
@ -239,8 +243,9 @@ TextField{
TapHandler {
acceptedButtons: Qt.RightButton
onTapped: menu.popup()
onTapped: input.echoMode !== TextInput.Password && menu.popup()
}
FluMenu{
id:menu
focus: false

View File

@ -75,7 +75,7 @@ TextArea{
}
TapHandler {
acceptedButtons: Qt.RightButton
onTapped: menu.popup()
onTapped: input.echoMode !== TextInput.Password && menu.popup()
}
FluMenu{
id:menu

View File

@ -74,7 +74,7 @@ TextField{
}
TapHandler {
acceptedButtons: Qt.RightButton
onTapped: menu.popup()
onTapped: input.echoMode !== TextInput.Password && menu.popup()
}
FluMenu{
id:menu