From 8c0b4d0b11a76971e0e558b864b97e84aabb6a3e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E5=8A=B2=E9=B9=8F?= Date: Mon, 7 Jun 2021 16:23:31 +0800 Subject: [PATCH] add notification 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 0fdc2f8b..354e0eb1 100644 --- a/doric-Qt/example/app/demo/DoricDemoBridge.cpp +++ b/doric-Qt/example/app/demo/DoricDemoBridge.cpp @@ -59,27 +59,30 @@ void DoricDemoBridge::navigate(QVariant route) { name = "NetworkDemo.js"; break; case 13: - name = "PopoverDemo.js"; + name = "NotificationDemo.js"; break; case 14: - name = "ScrollerDemo.js"; + name = "PopoverDemo.js"; break; case 15: - name = "SimpleDemo.js"; + name = "ScrollerDemo.js"; break; case 16: - name = "SliderDemo.js"; + name = "SimpleDemo.js"; break; case 17: - name = "Snake.js"; + name = "SliderDemo.js"; break; case 18: - name = "StorageDemo.js"; + name = "Snake.js"; break; case 19: - name = "SwitchDemo.js"; + name = "StorageDemo.js"; break; case 20: + name = "SwitchDemo.js"; + break; + case 21: name = "TextDemo.js"; break; } diff --git a/doric-Qt/example/app/main.qml b/doric-Qt/example/app/main.qml index 31c616bf..3b32066b 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: 21 + model: 22 delegate: Rectangle { Column { anchors.centerIn: parent @@ -49,20 +49,22 @@ ApplicationWindow { case 12: return "NetworkDemo.js" case 13: - return "PopoverDemo.js" + return "NotificationDemo.js" case 14: - return "ScrollerDemo.js" + return "PopoverDemo.js" case 15: - return "SimpleDemo.js" + return "ScrollerDemo.js" case 16: - return "SliderDemo.js" + return "SimpleDemo.js" case 17: - return "Snake.js" + return "SliderDemo.js" case 18: - return "StorageDemo.js" + return "Snake.js" case 19: - return "SwitchDemo.js" + return "StorageDemo.js" case 20: + return "SwitchDemo.js" + case 21: return "TextDemo.js" } } diff --git a/doric-Qt/example/app/qml.qrc b/doric-Qt/example/app/qml.qrc index 930bdc61..2fbd2cbf 100644 --- a/doric-Qt/example/app/qml.qrc +++ b/doric-Qt/example/app/qml.qrc @@ -22,6 +22,7 @@ ../../../doric-demo/bundle/src/ModalDemo.js ../../../doric-demo/bundle/src/ModularDemo.js ../../../doric-demo/bundle/src/NetworkDemo.js + ../../../doric-demo/bundle/src/NotificationDemo.js ../../../doric-demo/bundle/src/PopoverDemo.js ../../../doric-demo/bundle/src/ScrollerDemo.js ../../../doric-demo/bundle/src/SimpleDemo.js