text
Text, supporting only nesting within component.
Property | Type | Default | Description |
selectable | Boolean | false | Selectable or not. |
space | String | Show continuous spaces. | |
decode | Boolean | false | Decode or not. |
number-of-lines | number | Multi-line omission, value must be greater than or equal to 1, same behavior as the -webkit-line-clamp attribute of css. |
Space Effective Value:
Value | Description |
nbsp | Space size as per font setting. |
ensp | Half-size space of character. |
emsp | Space size of character. |
Sample Code
copy
<view class="page">
<view class="text-view">
<text>{{text}}</text>
</view>
</view>
copy
Page({
data: {
text: 'Hello Mini Program',
},
})