fix(qml): 修复搜索后切换全屏/默认大小,搜索框内容丢失
This commit is contained in:
parent
45005ad266
commit
8d5436408e
|
@ -30,6 +30,10 @@ Item {
|
|||
inputStatus = true;
|
||||
}
|
||||
}
|
||||
|
||||
Component.onCompleted: {
|
||||
text = root.currentSearchText;
|
||||
}
|
||||
}
|
||||
|
||||
function changeToSearch(keyEvent) {
|
||||
|
|
|
@ -142,6 +142,10 @@ FocusScope {
|
|||
AppPageBackend.startSearch(text);
|
||||
}
|
||||
}
|
||||
|
||||
Component.onCompleted: {
|
||||
text = root.currentSearchText;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -53,8 +53,10 @@ Item {
|
|||
|
||||
onClicked: {
|
||||
if (mainWindow.isFullScreen) {
|
||||
root.currentSearchText = searchInputBar.text;
|
||||
mainWindow.exitFullScreen();
|
||||
} else {
|
||||
root.currentSearchText = appPage.search.searchInputBar.text;
|
||||
mainWindow.isFullScreen = true;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -28,6 +28,7 @@ Item {
|
|||
clip: true
|
||||
property int animationDuration: menuSetting.get("animationDuration")
|
||||
property var normalGeometry: mainWindow.normalRect
|
||||
property string currentSearchText: ""
|
||||
|
||||
Component.onCompleted: {
|
||||
mainWindow.fullScreenChanged.connect(enterFullScreen);
|
||||
|
|
Loading…
Reference in New Issue