iOS render

This commit is contained in:
pengfei.zhou
2019-07-31 14:18:20 +08:00
parent 20986340d7
commit 674335324b
24 changed files with 452 additions and 34 deletions

View File

@@ -11,6 +11,8 @@ class CounterView extends ViewHolder {
counter = new Text
build(root: Group) {
const vlayout = new VLayout
vlayout.width = 200
vlayout.height = 200
this.number.textSize = 40
this.number.layoutConfig = {
alignment: new Gravity().center()
@@ -25,7 +27,8 @@ class CounterView extends ViewHolder {
}
vlayout.addChild(this.number)
vlayout.addChild(this.counter)
root.bgColor = Color.parse('#00ff00')
vlayout.bgColor = Color.parse('#ff00ff')
root.addChild(vlayout)
}
@@ -48,6 +51,7 @@ class CounterVM extends ViewModel<CountModel, CounterView> {
}
}
@Entry
class MyPage extends VMPanel<CountModel, CounterView>{
getVMClass() {
@@ -371,7 +375,6 @@ class SnakeVM extends ViewModel<SnakeModel, SnakeView>{
}
}
}
@Entry
class SnakePanel extends VMPanel<SnakeModel, SnakeView>{
getVMClass() {