| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105 |
- <template>
- <view class="content">
- <view class="navbar">
- <view v-for="(item, index) in navList" :key="index" class="nav-item"
- :class="{ current: tabCurrentIndex === index }" @click="navTo(index)">{{ item.text }}</view>
- </view>
- <swiper :indicator-dots="true" :autoplay="true" :interval="3000" :duration="1000" :class="{current:tabCurrentIndex===0}">
- <swiper-item v-for="(item,index) in navList">
- <view class="swiper-item">1111</view>
- </swiper-item>
- </swiper>
- </view>
- </template>
- <script>
- export default {
- data() {
- return {
- tabCurrentIndex: 0, //当前选择
- navList: [{
- state: 0,
- text: '待付款',
- loadingType: 'more',
- orderList: [],
- page: 1, //当前页数
- limit: 10 //每次信息条数
- },
- {
- state: 1,
- text: '待发货',
- loadingType: 'more',
- orderList: [],
- page: 1, //当前页数
- limit: 10 //每次信息条数
- },
- {
- state: 2,
- text: '待收货',
- loadingType: 'more',
- orderList: [],
- page: 1, //当前页数
- limit: 10 //每次信息条数
- },
- {
- state: 3,
- text: '待评价',
- loadingType: 'more',
- orderList: [],
- page: 1, //当前页数
- limit: 10 //每次信息条数
- },
- {
- state: 4,
- text: '已完成',
- loadingType: 'more',
- orderList: [],
- page: 1, //当前页数
- limit: 10 //每次信息条数
- }
- ]
- }
- },
- methods: {
- navTo(index){
- this.tabCurrentIndex = index
- }
- }
- }
- </script>
- <style lang="scss">
- .content {
- background: $page-color-base;
- height: 100%;
- }
- .navbar{
- display: flex;
- padding: 0 5px;
- height: 40px;
- background-color: #FFFFFF;
- box-shadow: 0 1px 5px rgba(0, 0, 0, 0.06);
- position: relative;
- z-index: 100;
-
- .nav-item{
- flex: 1;
- display: flex;
- text-align: center;
- justify-content: center;
- font-size: 15px;
- height: 100%;
- position: relative;
- &.current{
- border-bottom: 2rpx solid #F0AD4E;
- color:#F0AD4E ;
-
- }
-
-
-
- }
- }
-
- </style>
|