From 4c427fc257f82fc3e506dd731479e3221b8d8e9a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E5=8A=B2=E9=B9=8F?= Date: Thu, 27 May 2021 18:42:33 +0800 Subject: [PATCH] add modular demo --- doric-Qt/example/app/demo/DoricDemoBridge.cpp | 17 ++++++++++------- doric-Qt/example/app/main.qml | 18 ++++++++++-------- doric-Qt/example/app/qml.qrc | 1 + 3 files changed, 21 insertions(+), 15 deletions(-) diff --git a/doric-Qt/example/app/demo/DoricDemoBridge.cpp b/doric-Qt/example/app/demo/DoricDemoBridge.cpp index a297e16b..efb45f81 100644 --- a/doric-Qt/example/app/demo/DoricDemoBridge.cpp +++ b/doric-Qt/example/app/demo/DoricDemoBridge.cpp @@ -44,27 +44,30 @@ void DoricDemoBridge::navigate(QVariant route) { name = "ModalDemo.js"; break; case 9: - name = "NetworkDemo.js"; + name = "ModularDemo.js"; break; case 10: - name = "PopoverDemo.js"; + name = "NetworkDemo.js"; break; case 11: - name = "ScrollerDemo.js"; + name = "PopoverDemo.js"; break; case 12: - name = "SimpleDemo.js"; + name = "ScrollerDemo.js"; break; case 13: - name = "Snake.js"; + name = "SimpleDemo.js"; break; case 14: - name = "StorageDemo.js"; + name = "Snake.js"; break; case 15: - name = "SwitchDemo.js"; + name = "StorageDemo.js"; break; case 16: + name = "SwitchDemo.js"; + break; + case 17: name = "TextDemo.js"; break; } diff --git a/doric-Qt/example/app/main.qml b/doric-Qt/example/app/main.qml index 720ec08f..aa412253 100644 --- a/doric-Qt/example/app/main.qml +++ b/doric-Qt/example/app/main.qml @@ -15,7 +15,7 @@ ApplicationWindow { ListView { width: parent.width - model: 17 + model: 18 delegate: Rectangle { Column { anchors.centerIn: parent @@ -41,20 +41,22 @@ ApplicationWindow { case 8: return "ModalDemo.js" case 9: - return "NetworkDemo.js" + return "ModularDemo.js" case 10: - return "PopoverDemo.js" + return "NetworkDemo.js" case 11: - return "ScrollerDemo.js" + return "PopoverDemo.js" case 12: - return "SimpleDemo.js" + return "ScrollerDemo.js" case 13: - return "Snake.js" + return "SimpleDemo.js" case 14: - return "StorageDemo.js" + return "Snake.js" case 15: - return "SwitchDemo.js" + return "StorageDemo.js" case 16: + return "SwitchDemo.js" + case 17: return "TextDemo.js" } } diff --git a/doric-Qt/example/app/qml.qrc b/doric-Qt/example/app/qml.qrc index 4e7563e2..935ca886 100644 --- a/doric-Qt/example/app/qml.qrc +++ b/doric-Qt/example/app/qml.qrc @@ -18,6 +18,7 @@ ../../../doric-demo/bundle/src/LayoutDemo.js ../../../doric-demo/bundle/src/LayoutTestDemo.js ../../../doric-demo/bundle/src/ModalDemo.js + ../../../doric-demo/bundle/src/ModularDemo.js ../../../doric-demo/bundle/src/NetworkDemo.js ../../../doric-demo/bundle/src/PopoverDemo.js ../../../doric-demo/bundle/src/SimpleDemo.js