From 287015ae05bee80cb3f88a6d3c9fe3a80ac2f451 Mon Sep 17 00:00:00 2001 From: "pengfei.zhou" Date: Wed, 8 Dec 2021 11:38:05 +0800 Subject: [PATCH] Update template file --- doric-cli/assets-lib/example/src/Example.ts | 5 +++++ doric-cli/assets/$.ts | 5 ++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/doric-cli/assets-lib/example/src/Example.ts b/doric-cli/assets-lib/example/src/Example.ts index 4792eecd..9a8976ea 100644 --- a/doric-cli/assets-lib/example/src/Example.ts +++ b/doric-cli/assets-lib/example/src/Example.ts @@ -8,6 +8,8 @@ import { Color, navbar, modal, + AssetsResource, + image, } from "doric"; import { demoPlugin } from "__$__"; @@ -18,6 +20,9 @@ class Example extends Panel { } build(rootView: Group) { vlayout([ + image({ + image: new AssetsResource("logo_doric.png"), + }), text({ text: "Click to call native plugin", textSize: 20, diff --git a/doric-cli/assets/$.ts b/doric-cli/assets/$.ts index dbb0c6f7..d11671ab 100644 --- a/doric-cli/assets/$.ts +++ b/doric-cli/assets/$.ts @@ -1,4 +1,4 @@ -import { Panel, Group, vlayout, layoutConfig, Gravity, text, Text, Color, navbar } from "doric"; +import { Panel, Group, vlayout, layoutConfig, Gravity, text, Text, Color, navbar, AssetsResource, image } from "doric"; @Entry class __$__ extends Panel { @@ -9,6 +9,9 @@ class __$__ extends Panel { let number: Text let count = 0 vlayout([ + image({ + image: new AssetsResource("logo_doric.png"), + }), number = text({ textSize: 40, text: '0',