text文本组件 特点:
1> 支持转义符"\";
2> <text/> 组件内只支持 <text/> 嵌套。中间不能嵌套其他任何组件;
3> 该组件中的内容可以通过长按进行选中的其他组件中的内容都不支持长按选中。
界面渲染代码:
[css] view plain copy
.btn {
margin-top: 30px;
display: flex;
flex-direction: column;
justify-content: space-around;
align-items: center;
margin-left: 20px;
margin-right: 20px;
}
text {
margin-top: 10px;
font-size: 25px;
}
[javascript] view plain copy
//logs.js
var util = require('../../utils/util.js')
Page({
data: {
// <text>{{text}}</text>
text:"这里的内容是通过js设置的变量"
}
})
二:progress进度条
progress进度条控件:
主要用于一项任务的完成进度例如:数据下载进度、视频播放进度、安装进度等。
1.控件参数 2.属性对控件的影响show-info和active默认为false如果为true的时候可以不写属性值也可以写为active=“true”