This repository has been archived on 2024-07-22. You can view files and clone it, but cannot push or open issues or pull requests.
Doric/doric-demo/src/ComponetDemo.ts

36 lines
1.0 KiB
TypeScript
Raw Normal View History

2021-05-14 19:24:07 +08:00
import { layoutConfig, LayoutSpec, Panel, Root, scroller, vlayout } from "doric";
import { richTitleView, } from "./components/RichTitleView";
import logo from "./images/logo_w.png"
@Entry
class ComponentDemo extends Panel {
build(root: Root) {
scroller(
vlayout(
[
richTitleView().applyChild({
title: {
text: "This is title"
},
subTitle: {
text: "This is subtitle",
},
icon: {
imageBase64: logo,
}
}),
2021-05-14 19:32:19 +08:00
2021-05-14 19:24:07 +08:00
],
{
layoutConfig: {
widthSpec: LayoutSpec.MOST,
heightSpec: LayoutSpec.FIT,
},
space: 10,
}),
{
layoutConfig: layoutConfig().most(),
}
).in(root)
}
}