Home > WeChat Applet > Mini Program Development > Interpretation and analysis of WeChat applet components: 5. text

Interpretation and analysis of WeChat applet components: 5. text

巴扎黑
Release: 2017-03-19 18:31:35
Original
1991 people have browsed it

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>
Copy after login

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(){
// 页面关闭
}
})
Copy after login



textThe main attributes of the text:

##font-sizeFont size colorFont colorfont-styleFont stylemargin-topFont top marginmargin-bottomFont bottom margin

Properties

Description

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!

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template