This commit is contained in:
朱子楚\zhuzi
2024-03-27 00:36:56 +08:00
parent 485bcc8acc
commit e81a2cc849
42 changed files with 412 additions and 635 deletions

View File

@ -31,7 +31,7 @@ FluWindow {
MouseArea{
anchors.fill: parent
onClicked: {
FluApp.navigate("/")
FluRouter.navigate("/")
}
}
}

View File

@ -71,7 +71,7 @@ FluWindow {
FluFilledButton{
text: qsTr("Restart Program")
onClicked: {
FluApp.exit(931)
FluRouter.exit(931)
}
}
}

View File

@ -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()
}
}

View File

@ -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:{