added PageLoader and pageController

This commit is contained in:
vladimir.kuznetsov 2023-05-15 13:38:17 +08:00
parent 116fa6777b
commit 03a0e2084a
27 changed files with 265 additions and 193 deletions

View file

@ -154,6 +154,10 @@ Item {
anchors.topMargin: 16
anchors.leftMargin: 16
anchors.rightMargin: 16
backButtonFunction: function() {
root.menuVisible = false
}
}
FlickableType {
@ -190,6 +194,7 @@ Item {
id: loader
sourceComponent: root.menuDelegate
property QtObject modelData: model
property var delegateIndex: index
}
}
}

View file

@ -35,6 +35,8 @@ Item {
onClicked: {
if (backButtonFunction && typeof backButtonFunction === "function") {
backButtonFunction()
} else {
PageController.closePage()
}
}
}

View file

@ -35,6 +35,8 @@ Item {
onClicked: {
if (backButtonFunction && typeof backButtonFunction === "function") {
backButtonFunction()
} else {
PageController.closePage()
}
}
}