feat: update demo

This commit is contained in:
pengfei.zhou
2021-12-07 18:11:15 +08:00
committed by osborn
parent 2077378bf9
commit b1b8366e08
5 changed files with 13 additions and 17 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 339 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 339 KiB

View File

@@ -1,4 +1,4 @@
import { Base64Resource, Group, Panel, coordinator, text, gravity, Color, LayoutSpec, log, vlayout, scroller, layoutConfig, image, ScaleType, Image, modal, RemoteResource, MainBundleResource } from "doric";
import { Base64Resource, Group, Panel, coordinator, text, gravity, Color, LayoutSpec, log, vlayout, scroller, layoutConfig, image, ScaleType, Image, modal, RemoteResource, MainBundleResource, AssetResource } from "doric";
import { colors, label } from "./utils";
import { img_base64 } from "./image_base64";
@@ -28,8 +28,8 @@ class ImageDemo extends Panel {
label('Button'),
image({
image: Environment.platform === 'Android'
? new DrawableResource("doric_icon_back")
: new MainBundleResource("Hanabi.ttf"),
? new AssetResource("assets/The_Parthenon_in_Athens.jpeg")
: new MainBundleResource("assets/The_Parthenon_in_Athens.jpeg"),
}),
image({
image: new RemoteResource("https://p.upyun.com/demo/webp/webp/jpg-0.webp"),

View File

@@ -200,12 +200,12 @@ class TextDemo extends Panel {
text({
text: "Icon Font text from assets/fonts/ \ue631 ",
textSize: 10,
font: 'fonts/assets_iconfont'
font: 'assets/fonts/assets_iconfont'
}),
text({
text: "Icon Font text from assets/fonts/ \ue631 ",
textSize: 30,
font: 'fonts/assets_iconfont.ttf'
font: 'assets/fonts/assets_iconfont.ttf'
}),
text({
text: "This is line Spaceing 0,\nSecond line",