<template>
  <view class="container">
    <view class="top-tab">
      <u-tabs class="tab" :list="list" :current='current' @click="handlerChangeItem"
      :activeStyle="{
            color: '#007AFF',
            fontWeight: 'bold',
            transform: 'scale(1.05)'
        }"
        :inactiveStyle="{
            color: '#000',
            transform: 'scale(1)'
        }"
        itemStyle="height: 34px; width:19%;" lineColor="#007AFF"></u-tabs>
    </view>
    
    <view class="item-box">
      
      <u-empty v-if="init_list.length == 0" mode="data" icon="http://cdn.uviewui.com/uview/empty/data.png" ></u-empty>
      
    </view>
  </view>
</template>

<script>
  export default{
    data(){
      return{
        current:0,
        list: [
          {
            id: 0,
            name: '全部订单',
          },
          {
            id: 1,
            name: '待付款',
          },
          {
            id: 2,
            name: '待发货',
          },
          {
            id: 3,
            name: '退货/售后',
          },
        ],
        init_list:[],// 订单列表
      }
    },
    onLoad(option){
      this.current = option.type
    },
    methods:{
      // 选择导航栏
      handlerChangeItem(e){
        this.current = e.index
      }
    }
  }
</script>

<style lang="scss" scoped>
  .container{
  }
</style>
