提交 19c852e7 编写于 作者: 恪愚's avatar 恪愚

优化calendar组件返回数据,优化alphabet组件返回数据

上级 f1af29a2
......@@ -56,5 +56,10 @@ Component({
}
}
},
selector(e){
this.triggerEvent('selector',{
city_data:e.currentTarget.dataset.city
})
}
}
})
......@@ -6,7 +6,7 @@
<view class="section-item-header">
{{item.alphabet}}
</view>
<view wx:for="{{item.datas}}" wx:key="unique" wx:for-item="cell" wx:for-index="cellIndex" class="section-item-cells">
<view wx:for="{{item.datas}}" wx:key="unique" wx:for-item="cell" wx:for-index="cellIndex" class="section-item-cells" data-city="{{cell}}" bindtap="selector">
<view class="section-item-cell {{cellIndex!=(item.datas.length-1)?'border-bottom':''}}">
<text>{{cell}}</text>
</view>
......
......@@ -41,14 +41,10 @@ Page({
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
// try{
// var res=wx.getSystemInfoSync()
// this.apHeight=16
// this.offsetTop=80
// this.setData({
// windowHeight:res.windowHeight+'px'
// })
// }catch(e){}
},
selector(e){
console.log(e.detail.city_data)
},
......
<y-alphabet list="{{list}}"></y-alphabet>
\ No newline at end of file
<y-alphabet list="{{list}}" bind:selector="selector"></y-alphabet>
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册