<template>
	<view class="list">
		<view v-for="(item,index) in list" :key="index">
			<order-item @printOrder="print" :key="index" :data="item" :index="index"></order-item>
		</view>
		<view v-if="!list.length">
			<my-img-empty tips="亲，你还没有订单哦~"></my-img-empty>
		</view>
	</view>
</template>

<script setup>
	import orderItem from './order-item.vue';
	const props=defineProps({
		list:{
			type:Array,
			default:()=>[]
		}
	})
	const emits=defineEmits(['printOrder'])
	function print(item) {
		emits('printOrder',item)
	}
</script>

<style lang="scss" scoped>
	.list {
		padding: 32rpx 28rpx;
	}
</style>