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