格式化的文本,只能作为<text>、<a>和<span>的子组件
1050+版本支持<span> ,1100+版本支持<image>
| 名称 | 类型 | 默认值 | 必填 | 描述 |
|---|---|---|---|---|
| id | <string> | - | 否 | 唯一标识 |
| style | <string> | - | 否 | 样式声明 |
| class | <string> | - | 否 | 引用样式表 |
| for | <array> | - | 否 | 根据数据列表,循环展开当前标签 |
| if | <boolean> | - | 否 | 根据数据 boolean 值,添加或移除当前标签 |
| 名称 | 类型 | 默认值 | 必填 | 描述 |
|---|---|---|---|---|
| color | <color> | rgba(0, 0, 0, 0.54) | 否 | 文本颜色 |
| font-size | <length> | 30px | 否 | 文本尺寸 |
| font-style | normal | italic | normal | 否 | - |
| font-weight | normal | bold | lighter | border | <number> 1050+ | normal | 否 | 当前平台仅支持normal与bold两种效果,当值为数字时,低于550为前者,否则为后者。 |
font-family 1030+ | <string> | - | 否 | 文本字体。可设置一个有先后顺序的,由字体名或者字体族名组成的列表,以逗号分隔。列表中第一个已安装或者通过 font-face 指定的字体,会被选中作为文本的字体。 |
| text-decoration | underline | line-through | none | none | 否 | - |
不支持
查看示例代码