cli:update cli config

This commit is contained in:
pengfei.zhou
2020-01-07 14:03:07 +08:00
committed by osborn
parent 1ea382d8d5
commit 8fc72c95bc
12 changed files with 33 additions and 60 deletions

43
doric-cli/target/$.ts Normal file
View File

@@ -0,0 +1,43 @@
import { Panel, Group, vlayout, layoutConfig, Gravity, IVLayout, text, Text, Color, navbar } from "doric";
@Entry
class __$__ extends Panel {
onShow() {
navbar(context).setTitle("__$__")
}
build(rootView: Group): void {
let number: Text
let count = 0
vlayout([
number = text({
textSize: 40,
text: '0',
}),
text({
text: "Click to count",
textSize: 20,
backgroundColor: Color.parse('#70a1ff'),
textColor: Color.WHITE,
onClick: () => {
number.text = `${++count}`
},
layoutConfig: layoutConfig().just(),
width: 200,
height: 50,
}),
])
.apply({
layoutConfig: layoutConfig().just().configAlignment(Gravity.Center),
width: 200,
height: 200,
space: 20,
border: {
color: Color.BLUE,
width: 1,
},
gravity: Gravity.Center,
} as IVLayout)
.in(rootView)
}
}