小程序开发

小程序开发
一、WXML四大特性
1.数据绑定

  • 列表项目

2.列表渲染

  • 列表项目

3.条件渲染

  • wxml中:wx:if wx:elif wx:else
  • js中:condition:Math.floor(Math.random()*3+1)1~3的随机数

Math.random()生成一个0~1的浮点数
Math.floor9()对浮点数下取整

4.模板及引用

原文地址:https://www.cnblogs.com/10manongit/p/12714987.html