⚠️
即将到来。
constraint 对标Android中的ConstraintLayout,是一种强大的布局方式,可以通过约束来定义子视图的位置。
constraint是OneScript的默认布局,当您未制定布局类型时,系统会默认使用constraint布局。
$widget.setView({
type: "constraint",
props: {},
layout: {
width: "match_parent",
height: "match_parent",
},
views: [
{
type: "text",
props: {
text: "Hello, OneScript!",
},
layout: {
start: 10,
top: 10,
}
}
]
})