uView 的tabs
This commit is contained in:
		
							parent
							
								
									959992b6ab
								
							
						
					
					
						commit
						c149973199
					
				@ -1,13 +1,41 @@
 | 
				
			|||||||
<template>
 | 
					<template>
 | 
				
			||||||
  <view>
 | 
					  <view>
 | 
				
			||||||
 | 
					    <!-- 1.搜索栏 -->
 | 
				
			||||||
    <ygSearch></ygSearch>
 | 
					    <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>
 | 
					  </view>
 | 
				
			||||||
</template>
 | 
					</template>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
<script>
 | 
					<script>
 | 
				
			||||||
export default {
 | 
					export default {
 | 
				
			||||||
  onLoad (option){
 | 
					  data(){
 | 
				
			||||||
    console.log(option) 
 | 
					    return{
 | 
				
			||||||
 | 
					      tabs: [
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					          name: "待收货",
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					          name: "待付款",
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					          name: "待评价",
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
 | 
					      ],
 | 
				
			||||||
 | 
					      tabsCurrent: 0,
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					  onLoad (id){
 | 
				
			||||||
 | 
					    console.log(id) 
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					  methods: {
 | 
				
			||||||
 | 
					    onTapsChange(index){
 | 
				
			||||||
 | 
					      this.tabsCurrent = index
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
</script>
 | 
					</script>
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user