注册小程序帐号css
激活邮箱html
信息登记node
登陆小程序管理后台-多人协同开发,须要在管理后台绑定开发者信息ios
完善小程序信息es6
绑定开发者web
是框架设计的一套标签语言,结合组件、wxs和事件系统,能够构建出页面结构算法
<view hidden="{{flag ? true : false}}"> <text data-name="{{theName}}"></text> </view>
<view> <block wx:for="{{items}}" wx:for-item="item" wx:key="index"> </block> // block标签不是一个组件,只是一个包装元素,在页面渲染时是不会被渲染出来的 </view>
// index.wxml <template name="tempItem"> <view> 姓名: {{name}} </view> </template> <template is="tempItem" data="{{...item}}"> </template> // index.js Page({ data:{ item: { name: '张三' } } })
<view wx:if="{{conditioin === 1}}"> 米饭1 </view> <view wx:elif="{{conditioin === 2}}"> 米饭2 </view> <view wx:else> 米饭3 </view>
// index.wxml <import src="a.wxml"></import> <template is="a"></template> // a.wxml <view>hello world1111</view> <template name="a"> hello world2222 </template> // 渲染结果 hello world2222
// index.wxml <include src="a.wxml"></import> <template is="a"></template> // a.wxml <view>hello world111</view> <template name="a"> hello world2222 </template> // 渲染结果 hello world111
屏幕分辨率: X * Y PPI = 开平方( X² + Y²) / 屏幕尺寸 iphone6为例: 开平方(750² + 1334²) / 4.7 = 325.6
// 标签 index.wxml // wxs有做用域, wxs 标签和 wxs文件内定义的变量对外都是不可见的 <wxs module="m1"> module.exports = { msg: 'hello' } </wxs> <view>{{ m1.msg }}</view>
// 文件 .wxs后缀 // index.wxml <wxs src="./m2.wxs" module="m2"></wxs> <view>{{m2.msg}}</view> // m2.wxs module.exports = require('./m1.wxs') // m1.wxs module.exports = { msg: 'hello world' }