pplok #22

Manually merged
theluyuan merged 4 commits from pplok into master 2019-12-19 09:33:21 +08:00
3 changed files with 17 additions and 10 deletions
Showing only changes of commit 0925c24540 - Show all commits

View File

@ -2,7 +2,14 @@ Component({
properties: {
},
data: {
id:0
},
methods: {
select(a){
// console.log(a.target.dataset.id)
this.setData({
id:a.target.dataset.id
})
}
}
})

View File

@ -1,10 +1,10 @@
<scroll-view class="navigation" scroll-y="{{true}}" >
<view class="on">热门商品</view>
<view>美容健身</view>
<view>美容健身</view>
<view>美容健身</view>
<view>美容健身</view>
<view>美容健身</view>
<view>美容健身</view>
<view>美容健身</view>
<scroll-view class="navigation" scroll-y="{{true}}" bind:tap="select" >
<view data-id="0" class="{{id == 0?'on' : ''}}">热门商品</view>
<view data-id="1" class="{{id == 1?'on' : ''}}">美容健身</view>
<view data-id="2" class="{{id == 2?'on' : ''}}">美容健身</view>
<view data-id="3" class="{{id == 3?'on' : ''}}">美容健身</view>
<view data-id="4" class="{{id == 4?'on' : ''}}">美容健身</view>
<view data-id="5" class="{{id == 5?'on' : ''}}">美容健身</view>
<view data-id="6" class="{{id == 6?'on' : ''}}">美容健身</view>
<view data-id="7" class="{{id == 7?'on' : ''}}">美容健身</view>
</scroll-view>

View File

@ -16,7 +16,7 @@
},
"compileType": "miniprogram",
"libVersion": "2.9.4",
"appid": "wx5766b7aac7c938b3",
"appid": "wxb9033316008de1ce",
"projectname": "deguodaigou",
"debugOptions": {
"hidedInDevtools": []