iOS render
This commit is contained in:
@@ -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() {
|
||||
|
Reference in New Issue
Block a user