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/js-framework/index.test.ts
2019-07-18 16:29:24 +08:00

29 lines
557 B
TypeScript

import { Text, Alignment, Color, VLayout, Registor, Panel, log, logw, loge } from "./index"
const v = new Text
v.width = 20
v.height = 30
v.left = 5
v.top = 5
v.bgColor = Color.parse('#00ff00')
v.config = {
alignment: Alignment.start
}
console.log(v.toModel())
const layout = new VLayout
layout.space = 10
console.log(layout.viewId)
console.log(layout.toModel())
@Registor
export class MyPage extends Panel {
build() {
return layout
}
log() {
log("Hello.HEGO")
logw("Hello.HEGO")
loge("Hello.HEGO")
}
}