uView 的tabs

This commit is contained in:
jqtmviyu@gmail.com 2021-02-25 20:30:23 +08:00
parent 959992b6ab
commit c149973199

View File

@ -1,13 +1,41 @@
<template>
<view>
<!-- 1.搜索栏 -->
<ygSearch></ygSearch>
<!-- 2. tabs -->
<view class="tabs">
<u-tabs :list="tabs" :current="tabsCurrent" inactive-color="#666" active-color="#eb4450" @change="onTapsChange"></u-tabs>
</view>
</view>
</template>
<script>
export default {
onLoad (option){
console.log(option)
data(){
return{
tabs: [
{
name: "待收货",
},
{
name: "待付款",
},
{
name: "待评价",
},
],
tabsCurrent: 0,
}
},
onLoad (id){
console.log(id)
},
methods: {
onTapsChange(index){
this.tabsCurrent = index
}
}
}
</script>