index.vue 756 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. <template>
  2. <view class="order">
  3. <!-- header -->
  4. <cu-custom isBack custom bgColor="bg-gradual-blue"><view slot="content">我的订单</view></cu-custom>
  5. <!-- section -->
  6. <view class="section">
  7. <cu-tab :value="defaultKey" @change="change" :list="list" />
  8. </view>
  9. </view>
  10. </template>
  11. <script>
  12. export default{
  13. data(){
  14. return {
  15. defaultKey:0,
  16. list:[
  17. {id:1,label:"全部"},
  18. {id:2,label:"待支付"},
  19. {id:3,label:"待发货"},
  20. {id:4,label:"运输中"},
  21. {id:5,label:"已完成"},
  22. {id:6,label:"待评价"}
  23. ],
  24. }
  25. },
  26. onLoad(options){
  27. let {key}=options;
  28. this.defaultKey=key;
  29. },
  30. methods:{
  31. change(index,item){
  32. this.defaultKey=index;
  33. }
  34. }
  35. }
  36. </script>
  37. <style lang="scss">
  38. </style>