Interpretation and analysis of Applet components: 5. text,
Text component description:
Text is the text displayed in the applet.
The following is the WXML code:
[XML]View plain text Copy code
I am a text component
{Text }}
The following is the JS code:
[JavaScript]View plain text Copy code
Page ({/*** initialize data */data: {text: "I am the text bound to the js file"}, onLoad: function (options) {// parameters brought about by page initialization options for page jump}, onReady: function () {// page rendering completed}, onShow: function () {// page display }, onHide: function () {// page hiding}, onUnload: function () {// page closing }})
Main Attributes of text:
Attribute |
Description |
Font-size |
Font size |
Color |
Font color |
Font-style |
Font style |
Margin-top |
Top margin of font |
Margin-bottom |
Font bottom margin |
The above is the explanation and analysis of the mini-program components: 5. details of text. For more information, see other related articles in the first PHP community!