settingsOrder.vue 942 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. <template>
  2. <view class="pages">
  3. <div class="tabs">
  4. <div class="tabs-content" v-for="(item, index) in tabList" :key="index" :class="{'tabs-content-active':index==current}" @click="changeTabs(index)">
  5. {{item}}
  6. </div>
  7. </div>
  8. <div class="no-data">--没有更多数据了--</div>
  9. </view>
  10. </template>
  11. <script>
  12. export default {
  13. data() {
  14. return {
  15. tabList:['全部订单','待处理','处理中','已处理','已取消'],
  16. current:0,
  17. }
  18. },
  19. methods: {
  20. changeTabs(index){
  21. this.current = index;
  22. }
  23. }
  24. }
  25. </script>
  26. <style lang="scss" scoped>
  27. .tabs{
  28. display: flex;
  29. justify-content: space-evenly;
  30. align-items: center;
  31. height: 50px;
  32. background: #fff;
  33. .tabs-content{
  34. }
  35. .tabs-content-active{
  36. color: #00aaff;
  37. border-bottom: 2px solid #00aaff;
  38. }
  39. }
  40. .no-data{
  41. color: #00aaff;
  42. text-align: center;
  43. margin-top: 40px;
  44. }
  45. .pages{
  46. // height: 100vh;
  47. // width: 100vw;
  48. // background: #f5f5f5;
  49. }
  50. </style>