# text
## Instructions
文本组件。用于包裹文本内容。
在app-uvue和app-nvue中,文本只能写在text中,而不能写在view的text区域。
虽然app-uvue中写在view的text区域的文字,也会被编译器自动包裹一层text组件,看起来也可以使用。但这样会造成无法修改该text文字的样式,详见uvue的 样式不继承 章节
### Syntax
- 使用 ``(或 ``,当需要包裹子节点时)。
- 遇到平台差异时,建议使用条件编译(`#ifdef / #endif`)显式处理。
#### Properties
| 属性名 | 类型 | 默认值 | 说明 | 平台差异说明 |
| --- | --- | --- | --- | --- |
| selectable | Boolean | false | 文本是否可选 | 小红书小程序不支持 |
| user-select | Boolean | false | 文本是否可选 | 微信小程序 |
| space | String | | 显示连续空格 | 钉钉小程序不支持 |
| decode | Boolean | false | 是否解码 | 百度、钉钉小程序不支持 |
#### Events
See official docs for full events list: `https://doc.dcloud.net.cn/uni-app-x/component/text.html`
#### Platform Compatibility
See official docs for platform support table: `https://doc.dcloud.net.cn/uni-app-x/component/text.html`
### Examples
### Example (Example 1)
```vue
{{text}}
```
### Example (Example 2)
```vue
{{text}}
```
### Example (Example 3)
```vue
```
Reference: [Official Documentation](https://doc.dcloud.net.cn/uni-app-x/component/text.html)