From 2baa84a9ee26f3852853b2a9453b75154c51d5b7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E5=8A=B2=E9=B9=8F?= Date: Tue, 25 May 2021 11:08:19 +0800 Subject: [PATCH] add text demo --- doric-Qt/example/app/demo/DoricDemoBridge.cpp | 3 +++ doric-Qt/example/app/main.qml | 4 +++- doric-Qt/example/app/qml.qrc | 1 + 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/doric-Qt/example/app/demo/DoricDemoBridge.cpp b/doric-Qt/example/app/demo/DoricDemoBridge.cpp index 1a181441..f66643f3 100644 --- a/doric-Qt/example/app/demo/DoricDemoBridge.cpp +++ b/doric-Qt/example/app/demo/DoricDemoBridge.cpp @@ -53,6 +53,9 @@ void DoricDemoBridge::navigate(QVariant route) { case 12: name = "StorageDemo.js"; break; + case 13: + name = "TextDemo.js"; + break; } QString script = DoricUtils::readAssetFile("/doric/bundles", name); diff --git a/doric-Qt/example/app/main.qml b/doric-Qt/example/app/main.qml index ae4d6524..147b67e4 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: 13 + model: 14 delegate: Rectangle { Column { anchors.centerIn: parent @@ -48,6 +48,8 @@ ApplicationWindow { return "Snake.js" case 12: return "StorageDemo.js" + case 13: + return "TextDemo.js" } } } diff --git a/doric-Qt/example/app/qml.qrc b/doric-Qt/example/app/qml.qrc index 57f85702..168d1688 100644 --- a/doric-Qt/example/app/qml.qrc +++ b/doric-Qt/example/app/qml.qrc @@ -18,6 +18,7 @@ ../../../doric-demo/bundle/src/ScrollerDemo.js ../../../doric-demo/bundle/src/Snake.js ../../../doric-demo/bundle/src/StorageDemo.js + ../../../doric-demo/bundle/src/TextDemo.js ../../../doric-js/bundle/doric-sandbox.js