| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374 |
- <template>
- <view class="page">
- <u-sticky>
- <View class=" tabs">
- <u-tabs :list="tabList" :scrollable="false"
- lineWidth="30"
- lineColor="#FFE05C"
- :activeStyle="{
- color: '#333333',
- fontWeight: 'bold',
- transform: 'scale(1.05)'
- }"
- :current="tabIndex" @click="clickTab"></u-tabs>
- </View>
- </u-sticky>
- <!-- 订单列表 -->
- <view :style="{'height':windowHeight}" >
- <swiper :style="{'height':windowHeight}" :current="tabIndex" @change="swiperChange">
- <swiper-item class="swiperItem" v-for="(item,index) in tabList" :key="index" >
- <view>
- <mescroll-item ref="MescrollItem" :i="index" :index="tabIndex" :tabs="tabList" :height="windowHeight">
- </mescroll-item>
- </view>
- </swiper-item>
- </swiper>
- </view>
- </view>
- </template>
- <script>
- import MescrollItem from "./module/mescrollUni-item.vue";
- export default {
- components: {
- MescrollItem
- },
- data() {
- return {
- windowHeight:'',
- tabIndex:0,
- tabList: [{
- name: '可使用'
- }, {
- name: '已使用'
- }, {
- name: '已过期'
- }],
- };
- },
- onLoad() {
- let sysInfo = uni.getSystemInfoSync()
- this.windowHeight =sysInfo.windowHeight-44+'px'//除标题栏栏外的屏幕可用高度
- },
- methods: {
- clickTab(e){
- this.tabIndex = e.index
- },
- swiperChange(e){
- this.tabIndex = e.detail.current
- // if (this.$refs.MescrollItem[e.detail.current].orderList.length>0){
- // this.$refs.MescrollItem[e.detail.current].downCallback()
- // }
- },
- }
- }
- </script>
- <style scoped lang="scss">
- @import '../../common/css/common.css';
- @import './index.rpx.scss';
- </style>
|