Commit 8605b3a1 authored by 邓沁's avatar 邓沁

update

parent f2fb0721
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
"pages": [ "pages": [
"pages/index/index", "pages/index/index",
"pages/home/home", "pages/home/home",
"pages/borrowDetail/borrowDetail",
"example/index", "example/index",
"example/button/button", "example/button/button",
"example/list/list", "example/list/list",
......
Page({
data: {
array: ['美国', '中国', '巴西', '日本'],
index: 0,
date: '2016-09-01',
time: '12:01'
},
bindPickerChange: function(e) {
console.log('picker发送选择改变,携带值为', e.detail.value)
this.setData({
index: e.detail.value
})
},
bindDateChange: function(e) {
this.setData({
date: e.detail.value
})
},
bindTimeChange: function(e) {
this.setData({
time: e.detail.value
})
}
});
\ No newline at end of file
{}
\ No newline at end of file
<view class="page">
<view class="page__hd">
<view class="page__title">Picker</view>
<view class="page__desc">选择器,这里使用小程序原生的picker。</view>
</view>
<view class="page__bd">
<view class="weui-btn-area">
<picker bindchange="bindPickerChange" value="{{index}}" range="{{array}}">
<button type="default">单列选择器</button>
</picker>
<picker class="weui-btn" mode="time" value="{{time}}" start="09:01" end="21:01" bindchange="bindTimeChange">
<button type="default">时间选择器</button>
</picker>
<picker class="weui-btn" mode="date" value="{{date}}" start="2015-09-01" end="2017-09-01" bindchange="bindDateChange">
<button type="default">日期选择器</button>
</picker>
</view>
</view>
</view>
\ No newline at end of file
page{
background-color: #FFFFFF;
}
\ No newline at end of file
Page({ Page({
data: { data: {
inputShowed: false, inputShowed: false,
inputVal: "" inputVal: "",
array:[{itemName:'new'},2,3,4,5,6]
}, },
onLoad: function () { onLoad: function () {
this.setData({ this.setData({
icon20: base64.icon20, icon60: '../../images/avatar.png'
icon60: base64.icon60
}); });
}, },
showInput: function () { showInput: function () {
......
...@@ -41,30 +41,16 @@ ...@@ -41,30 +41,16 @@
</view> </view>
</view> </view>
<view class="weui-panel weui-panel_access"> <view class="weui-panel weui-panel_access">
<view class="weui-panel__bd"> <view class="weui-panel__bd" wx:for="{{array}}" wx:for-item="itemName" wx:for-index="idx">
<navigator url="" class="weui-media-box weui-media-box_appmsg" hover-class="weui-cell_active"> <view class="weui-media-box weui-media-box_appmsg" hover-class="weui-cell_active">
<view class="weui-media-box__hd weui-media-box__hd_in-appmsg"> <view class="weui-media-box__hd weui-media-box__hd_in-appmsg">
<image class="weui-media-box__thumb" src="{{icon60}}" /> <image class="weui-media-box__thumb" src="{{icon60}}" />
</view> </view>
<view class="weui-media-box__bd weui-media-box__bd_in-appmsg"> <view class="weui-media-box__bd weui-media-box__bd_in-appmsg">
<view class="weui-media-box__title">标题一</view> <view class="weui-media-box__title">{{idx}}</view>
<view class="weui-media-box__desc">由各种物质组成的巨型球状天体,叫做星球。星球有一定的形状,有自己的运行轨道。</view> <view class="weui-media-box__desc">{{itemName.itemName||itemName}}</view>
</view> </view>
</navigator>
<navigator url="" class="weui-media-box weui-media-box_appmsg" hover-class="weui-cell_active">
<view class="weui-media-box__hd weui-media-box__hd_in-appmsg">
<image class="weui-media-box__thumb" src="{{icon60}}" />
</view>
<view class="weui-media-box__bd weui-media-box__bd_in-appmsg">
<view class="weui-media-box__title">标题二</view>
<view class="weui-media-box__desc">由各种物质组成的巨型球状天体,叫做星球。星球有一定的形状,有自己的运行轨道。</view>
</view>
</navigator>
</view>
<view class="weui-panel__ft">
<view class="weui-cell weui-cell_access weui-cell_link">
<view class="weui-cell__bd">查看更多</view>
<view class="weui-cell__ft weui-cell__ft_in-access"></view>
</view> </view>
</view> </view>
</view> </view>
\ No newline at end of file
...@@ -11,3 +11,22 @@ ...@@ -11,3 +11,22 @@
.weui-panel{ .weui-panel{
margin-top: 0px; margin-top: 0px;
} }
.weui-media-box__hd_in-appmsg {
margin-right:.5em;
width:100px;
height:100px;
line-height:100px;
text-align:center;
}
.weui-media-box__desc {
color:#999;
font-size:13px;
line-height:1.2;
overflow:hidden;
text-overflow:ellipsis;
display:-webkit-box;
-webkit-box-orient:vertical;
-webkit-line-clamp:2;
}
...@@ -24,13 +24,24 @@ ...@@ -24,13 +24,24 @@
"current": -1, "current": -1,
"list": [] "list": []
}, },
"plugin": {
"current": -1,
"list": []
},
"game": { "game": {
"currentL": -1, "currentL": -1,
"list": [] "list": []
}, },
"miniprogram": { "miniprogram": {
"current": -1, "current": 0,
"list": [] "list": [
{
"id": 0,
"name": "1",
"pathName": "pages/borrowDetail/borrowDetail",
"query": ""
}
]
} }
} }
} }
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment