03 2017 档案

摘要:page({ data:{ s1:{a:"",b:"b"} }, changeData:function(e){ var cData=this.data.s1; cData.a="1";//先修改json值 this.setData({ //再set值 s1:cData }) } }) 阅读全文
posted @ 2017-03-16 09:53 CoKeny 阅读(6517) 评论(0) 推荐(0)
摘要://index.wxml <view class="item"> <p>单选</p> <block wx:for="{{box}}" wx:for-item="box" wx:for-index="index"> <view wx:if="{{choose==index}}"> <view bind 阅读全文
posted @ 2017-03-15 10:36 CoKeny 阅读(9828) 评论(0) 推荐(0)
摘要://index.xml <form bindsubmit="formBindsubmit" bindreset="formReset"> <view style="display:flex;"> <label>用户名:</label> <input name="userName" placehold 阅读全文
posted @ 2017-03-15 09:52 CoKeny 阅读(1318) 评论(0) 推荐(0)
摘要://index.xml //微信是封装过if语句的,你只要在index.js中设置好值,然后就可以直接想这样拿来判断了,还有这是class=“view”效果放在判断语句中是没有效果的<view class="page"><view class="view" ><view wx:if="{{you}} 阅读全文
posted @ 2017-03-13 15:46 CoKeny 阅读(57250) 评论(0) 推荐(0)
摘要://index.css .view_outside{ display: -webkit-flex; flex-direction: row/column; //row横向 column纵向 } .view_in{ flex: 1; } //index.wxml <view class="view_o 阅读全文
posted @ 2017-03-13 10:19 CoKeny 阅读(4844) 评论(3) 推荐(0)
摘要:最终效果图 源码 //index.wxml <view class="container"> <view class="header"> <image class="avatar" src="{{userInfo.avatarUrl}}" /> <view class="nickname">{{us 阅读全文
posted @ 2017-03-09 11:20 CoKeny 阅读(262) 评论(0) 推荐(0)
摘要:<!--垂直滚动,这里必须设置高度--> <scroll-view scroll-y="true" style="height: 200px"> <view style="background: red; width: 100px; height: 100px" ></view> <view sty 阅读全文
posted @ 2017-03-08 15:57 CoKeny 阅读(31888) 评论(0) 推荐(1)