<!-- 订单列表2 -->
<template>
	<filter>
		<empty-view v-if="!data.login" mode="permission"  content="请先登录再查看订单" btnTxt="立即登录"
			@btnClick="$util.navTo('/login/login')">
		</empty-view>

		<view class="list-wrapper" v-else>
			<order-tabbar ref="tabbarRef" :tabs="data.tabsList" v-model:curIndex="data.tabIndex"
				v-if="data.tabsList.length > 0" ></order-tabbar>

			<order-list-item ref="mescrollItem" :index="data.tabIndex" :refresh="data.refresh">
			</order-list-item>
		</view>
    </filter>
</template>

<script setup lang="ts">
	import orderTabbar from "./components/order-tabbar.vue";
	import orderListItem from "./components/order-list-item";
	import useOrderList from "@/composables/order/useOrderList";
    import filter from '@/components/filter/filter.vue';
	import { onLoad} from "@dcloudio/uni-app";
	const {
		data,
		tabbarRef
	} = useOrderList();
	onLoad((option)=>{
		// console.log("option",option)
		// data.tabIndex=option.index
	})
</script>

<style lang="scss">
	page {
		background: #eef7f7;
	}

	:deep(.u-mode-center-box) {
		border-radius: 20rpx;
	}
</style>
<style lang="scss" scoped>
	.list-wrapper {}
</style>
