From a910f61c2a7a9cd6af26684a1e1e227c8f1ae09c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E5=8A=B2=E9=B9=8F?= Date: Sun, 25 Apr 2021 15:02:36 +0800 Subject: [PATCH] add network demo --- doric-Qt/doric/demo/DoricDemoBridge.cpp | 7 +++++-- doric-Qt/doric/qml.qrc | 1 + doric-Qt/doric/resources/main.qml | 8 +++++--- 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/doric-Qt/doric/demo/DoricDemoBridge.cpp b/doric-Qt/doric/demo/DoricDemoBridge.cpp index fe67f66b..618d5b49 100644 --- a/doric-Qt/doric/demo/DoricDemoBridge.cpp +++ b/doric-Qt/doric/demo/DoricDemoBridge.cpp @@ -30,12 +30,15 @@ void DoricDemoBridge::navigate(QVariant route) { name = "ModalDemo.js"; break; case 5: - name = "PopoverDemo.js"; + name = "NetworkDemo.js"; break; case 6: - name = "SimpleDemo.js"; + name = "PopoverDemo.js"; break; case 7: + name = "SimpleDemo.js"; + break; + case 8: name = "Snake.js"; break; } diff --git a/doric-Qt/doric/qml.qrc b/doric-Qt/doric/qml.qrc index 938b7e02..c4aed130 100644 --- a/doric-Qt/doric/qml.qrc +++ b/doric-Qt/doric/qml.qrc @@ -13,6 +13,7 @@ ../../doric-demo/bundle/src/ImageDemo.js ../../doric-demo/bundle/src/LayoutDemo.js ../../doric-demo/bundle/src/ModalDemo.js + ../../doric-demo/bundle/src/NetworkDemo.js ../../doric-demo/bundle/src/PopoverDemo.js ../../doric-demo/bundle/src/SimpleDemo.js ../../doric-demo/bundle/src/Snake.js diff --git a/doric-Qt/doric/resources/main.qml b/doric-Qt/doric/resources/main.qml index de946a61..181d3bb7 100644 --- a/doric-Qt/doric/resources/main.qml +++ b/doric-Qt/doric/resources/main.qml @@ -15,7 +15,7 @@ ApplicationWindow { ListView { width: parent.width - model: 8 + model: 9 delegate: Rectangle { Column { anchors.centerIn: parent @@ -33,10 +33,12 @@ ApplicationWindow { case 4: return "ModalDemo.js" case 5: - return "PopoverDemo.js" + return "NetworkDemo.js" case 6: - return "SimpleDemo.js" + return "PopoverDemo.js" case 7: + return "SimpleDemo.js" + case 8: return "Snake.js" } }