💡
由于是 view 的子类,因此支持 view 的所有属性。
text 是一个用于显示文本的View。
{
type: "text",
props: {
text: "Hello, OneScript!",
textSize: 20,
}
}props
| 属性 | 类型 | 描述 |
|---|---|---|
| text | string | 文本内容 |
| textColor | $color | 文本颜色 |
| textSize | double | 字体大小 |
| textAlign | $align | 文本对齐方式 |
| fontWeight | number | 字体粗细 |