123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354 |
- <template>
- <view>
- <van-tabs :active="active" @change="onChange" swipeable sticky :ellipsis="false">
- <van-tab title="全部"><order-all></order-all></van-tab>
- <van-tab title="待付款"><order-type :OrderData="[1,2,3]"></order-type></van-tab>
- <van-tab title="待收货"></van-tab>
- <van-tab title="退款/售后">内容 4</van-tab>
- <van-tab title="待评价">内容 4</van-tab>
- </van-tabs>
- </view>
- </template>
- <script>
- import OrderAll from "@/components/orders/order-all/order-all.vue";
- export default {
- components: {OrderAll},
- data() {
- return {
- active: this.query.pagetype ? parseInt(this.query.pagetype): 0,
- };
- },
- props: {
- },
- methods: {
- onLoad(options) {
- // console.log(options.pagetype,"pagetype")
- if(options.pagetype){
- this.active = parseInt(options.pagetype)
- }
- },
- onChange(event) {
- console.log(event)
- this.active = event.detail.index
- // console.log(this.query().pagetype,'eeeee')
- },
- query() {
- return this.$route.query
- }
- }
- }
- </script>
- <style lang="scss">
- page { background-color: #8f8f94; }
- </style>
|