pages删除按照我的来
This commit is contained in:
@@ -4,8 +4,16 @@
|
||||
<block slot="backText">返回</block>
|
||||
<block slot="content">加油记录</block>
|
||||
</cu-custom>
|
||||
<scroll-view scroll-x class="bg-white nav">
|
||||
<view class="flex text-center">
|
||||
<view class="cu-item flex-sub" :class="index==TabCur?'text-orange cur':''" v-for="(item,index) in tabList" :key="index"
|
||||
@tap="tabSelect" :data-id="index">
|
||||
{{item}}
|
||||
</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
<view class="margin">
|
||||
<OrderItem class="cu-list menu-avatar comment " :item="order" />
|
||||
<OrderItem class="cu-list menu-avatar comment " v-for="(item,index) in tabList" :key="index" v-if="index==TabCur" :item="order" />
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
@@ -18,6 +26,11 @@
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
tabList:[
|
||||
'全部','待支付','已支付','退款'
|
||||
],
|
||||
TabCur: 0,
|
||||
scrollLeft: 0,
|
||||
order: {
|
||||
istate: 0,
|
||||
vol: 3,
|
||||
@@ -33,7 +46,10 @@
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
|
||||
tabSelect(e) {
|
||||
this.TabCur = e.currentTarget.dataset.id;
|
||||
this.scrollLeft = (e.currentTarget.dataset.id - 1) * 60
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user