add navigator demo & stack view

This commit is contained in:
王劲鹏 2021-06-08 10:25:36 +08:00 committed by osborn
parent 59bd3ea1ab
commit 7cdef00c34
3 changed files with 34 additions and 20 deletions

View File

@ -56,33 +56,36 @@ void DoricDemoBridge::navigate(QVariant route) {
name = "ModularDemo.js";
break;
case 12:
name = "NetworkDemo.js";
name = "NavigatorDemo.js";
break;
case 13:
name = "NotificationDemo.js";
name = "NetworkDemo.js";
break;
case 14:
name = "PopoverDemo.js";
name = "NotificationDemo.js";
break;
case 15:
name = "ScrollerDemo.js";
name = "PopoverDemo.js";
break;
case 16:
name = "SimpleDemo.js";
name = "ScrollerDemo.js";
break;
case 17:
name = "SliderDemo.js";
name = "SimpleDemo.js";
break;
case 18:
name = "Snake.js";
name = "SliderDemo.js";
break;
case 19:
name = "StorageDemo.js";
name = "Snake.js";
break;
case 20:
name = "SwitchDemo.js";
name = "StorageDemo.js";
break;
case 21:
name = "SwitchDemo.js";
break;
case 22:
name = "TextDemo.js";
break;
}

View File

@ -5,9 +5,17 @@ ApplicationWindow {
visible: true
width: 600
height: 800
title: qsTr("Scroll")
title: qsTr("Doric Demo")
StackView {
id: stack
initialItem: entry
anchors.fill: parent
}
ScrollView {
id: entry
anchors.fill: parent
ScrollBar.horizontal.policy: ScrollBar.AlwaysOff
@ -15,7 +23,7 @@ ApplicationWindow {
ListView {
width: parent.width
model: 22
model: 23
delegate: Rectangle {
Column {
anchors.centerIn: parent
@ -47,24 +55,26 @@ ApplicationWindow {
case 11:
return "ModularDemo.js"
case 12:
return "NetworkDemo.js"
return "NavigatorDemo.js"
case 13:
return "NotificationDemo.js"
return "NetworkDemo.js"
case 14:
return "PopoverDemo.js"
return "NotificationDemo.js"
case 15:
return "ScrollerDemo.js"
return "PopoverDemo.js"
case 16:
return "SimpleDemo.js"
return "ScrollerDemo.js"
case 17:
return "SliderDemo.js"
return "SimpleDemo.js"
case 18:
return "Snake.js"
return "SliderDemo.js"
case 19:
return "StorageDemo.js"
return "Snake.js"
case 20:
return "SwitchDemo.js"
return "StorageDemo.js"
case 21:
return "SwitchDemo.js"
case 22:
return "TextDemo.js"
}
}

View File

@ -21,6 +21,7 @@
<file alias="LayoutTestDemo.js">../../../doric-demo/bundle/src/LayoutTestDemo.js</file>
<file alias="ModalDemo.js">../../../doric-demo/bundle/src/ModalDemo.js</file>
<file alias="ModularDemo.js">../../../doric-demo/bundle/src/ModularDemo.js</file>
<file alias="NavigatorDemo.js">../../../doric-demo/bundle/src/NavigatorDemo.js</file>
<file alias="NetworkDemo.js">../../../doric-demo/bundle/src/NetworkDemo.js</file>
<file alias="NotificationDemo.js">../../../doric-demo/bundle/src/NotificationDemo.js</file>
<file alias="PopoverDemo.js">../../../doric-demo/bundle/src/PopoverDemo.js</file>