mirror of
https://github.com/zhuzichu520/FluentUI.git
synced 2025-07-02 08:05:29 +08:00
update
This commit is contained in:
@ -31,7 +31,7 @@ FluWindow {
|
||||
MouseArea{
|
||||
anchors.fill: parent
|
||||
onClicked: {
|
||||
FluApp.navigate("/")
|
||||
FluRouter.navigate("/")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -71,7 +71,7 @@ FluWindow {
|
||||
FluFilledButton{
|
||||
text: qsTr("Restart Program")
|
||||
onClicked: {
|
||||
FluApp.exit(931)
|
||||
FluRouter.exit(931)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -51,7 +51,7 @@ FluWindow {
|
||||
showError(qsTr("Please feel free to enter a password"))
|
||||
return
|
||||
}
|
||||
onResult({password:textbox_password.text})
|
||||
setResult({password:textbox_password.text})
|
||||
window.close()
|
||||
}
|
||||
}
|
||||
|
@ -7,7 +7,6 @@ import Qt.labs.platform 1.1
|
||||
import FluentUI 1.0
|
||||
import example 1.0
|
||||
import "../component"
|
||||
import "../viewmodel"
|
||||
import "../global"
|
||||
|
||||
FluWindow {
|
||||
@ -29,10 +28,6 @@ FluWindow {
|
||||
z:7
|
||||
}
|
||||
|
||||
SettingsViewModel{
|
||||
id:viewmodel_settings
|
||||
}
|
||||
|
||||
FluEvent{
|
||||
id:event_checkupdate
|
||||
name: "checkUpdate"
|
||||
@ -60,6 +55,7 @@ FluWindow {
|
||||
|
||||
Component.onDestruction: {
|
||||
FluEventBus.unRegisterEvent(event_checkupdate)
|
||||
FluRouter.exit()
|
||||
}
|
||||
|
||||
SystemTrayIcon {
|
||||
@ -71,7 +67,7 @@ FluWindow {
|
||||
MenuItem {
|
||||
text: "退出"
|
||||
onTriggered: {
|
||||
FluApp.exit()
|
||||
FluRouter.exit()
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -106,7 +102,7 @@ FluWindow {
|
||||
positiveText: qsTr("Quit")
|
||||
neutralText: qsTr("Cancel")
|
||||
onPositiveClicked:{
|
||||
FluApp.exit(0)
|
||||
FluRouter.exit(0)
|
||||
}
|
||||
}
|
||||
|
||||
@ -118,7 +114,7 @@ FluWindow {
|
||||
text: qsTr("Open in Separate Window")
|
||||
font.pixelSize: 12
|
||||
onClicked: {
|
||||
FluApp.navigate("/pageWindow",{title:modelData.title,url:modelData.url})
|
||||
FluRouter.navigate("/pageWindow",{title:modelData.title,url:modelData.url})
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -197,7 +193,7 @@ FluWindow {
|
||||
z:999
|
||||
//Stack模式,每次切换都会将页面压入栈中,随着栈的页面增多,消耗的内存也越多,内存消耗多就会卡顿,这时候就需要按返回将页面pop掉,释放内存。该模式可以配合FluPage中的launchMode属性,设置页面的启动模式
|
||||
// pageMode: FluNavigationViewType.Stack
|
||||
//NoStack模式,每次切换都会销毁之前的页面然后创建一个新的页面,只需消耗少量内存,可以配合FluViewModel保存页面数据(推荐)
|
||||
//NoStack模式,每次切换都会销毁之前的页面然后创建一个新的页面,只需消耗少量内存
|
||||
pageMode: FluNavigationViewType.NoStack
|
||||
items: ItemsOriginal
|
||||
footerItems:ItemsFooter
|
||||
@ -207,7 +203,7 @@ FluWindow {
|
||||
}
|
||||
return FluTools.isMacos() ? 20 : 0
|
||||
}
|
||||
displayMode:viewmodel_settings.displayMode
|
||||
displayMode: GlobalModel.displayMode
|
||||
logo: "qrc:/example/res/image/favicon.ico"
|
||||
title:"FluentUI"
|
||||
onLogoClicked:{
|
||||
|
Reference in New Issue
Block a user