textTextComponent description:
text text is the text displayed in the WeChat applet.
The following is the WXML code:
[XML] Plain text view Copy code
<view > <text>我是文本组件</text> </view> <text>{{text}}</text>
The following is the JS code:
[JavaScript] Plain text view Copy code
Page({ /** * 初始化数据 */ data:{ text:"我是在js文件中绑定的文本" }, onLoad:function(options){ // 页面初始化 options为页面跳转所带来的参数 }, onReady:function(){ // 页面渲染完成 }, onShow:function(){ // 页面显示 }, onHide:function(){ // 页面隐藏 }, onUnload:function(){ // 页面关闭 } })
textThe main attributes of the text:
Properties |
Description |
Font size | |
Font color | |
Font style | |
Font top margin | |
Font bottom margin |
The above is the detailed content of Interpretation and analysis of WeChat applet components: 5. text. For more information, please follow other related articles on the PHP Chinese website!