add text demo

This commit is contained in:
王劲鹏 2021-05-25 11:08:19 +08:00 committed by osborn
parent da73ee5347
commit 2baa84a9ee
3 changed files with 7 additions and 1 deletions

View File

@ -53,6 +53,9 @@ void DoricDemoBridge::navigate(QVariant route) {
case 12: case 12:
name = "StorageDemo.js"; name = "StorageDemo.js";
break; break;
case 13:
name = "TextDemo.js";
break;
} }
QString script = DoricUtils::readAssetFile("/doric/bundles", name); QString script = DoricUtils::readAssetFile("/doric/bundles", name);

View File

@ -15,7 +15,7 @@ ApplicationWindow {
ListView { ListView {
width: parent.width width: parent.width
model: 13 model: 14
delegate: Rectangle { delegate: Rectangle {
Column { Column {
anchors.centerIn: parent anchors.centerIn: parent
@ -48,6 +48,8 @@ ApplicationWindow {
return "Snake.js" return "Snake.js"
case 12: case 12:
return "StorageDemo.js" return "StorageDemo.js"
case 13:
return "TextDemo.js"
} }
} }
} }

View File

@ -18,6 +18,7 @@
<file alias="ScrollerDemo.js">../../../doric-demo/bundle/src/ScrollerDemo.js</file> <file alias="ScrollerDemo.js">../../../doric-demo/bundle/src/ScrollerDemo.js</file>
<file alias="Snake.js">../../../doric-demo/bundle/src/Snake.js</file> <file alias="Snake.js">../../../doric-demo/bundle/src/Snake.js</file>
<file alias="StorageDemo.js">../../../doric-demo/bundle/src/StorageDemo.js</file> <file alias="StorageDemo.js">../../../doric-demo/bundle/src/StorageDemo.js</file>
<file alias="TextDemo.js">../../../doric-demo/bundle/src/TextDemo.js</file>
</qresource> </qresource>
<qresource prefix="/doric"> <qresource prefix="/doric">
<file alias="doric-sandbox.js">../../../doric-js/bundle/doric-sandbox.js</file> <file alias="doric-sandbox.js">../../../doric-js/bundle/doric-sandbox.js</file>