pplok #22
@ -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
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
@ -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>
|
@ -16,7 +16,7 @@
|
||||
},
|
||||
"compileType": "miniprogram",
|
||||
"libVersion": "2.9.4",
|
||||
"appid": "wx5766b7aac7c938b3",
|
||||
"appid": "wxb9033316008de1ce",
|
||||
"projectname": "deguodaigou",
|
||||
"debugOptions": {
|
||||
"hidedInDevtools": []
|
||||
|
Loading…
Reference in New Issue
Block a user