first
This commit is contained in:
34
pagesOrder/index/compoents/order-list.vue
Normal file
34
pagesOrder/index/compoents/order-list.vue
Normal file
@@ -0,0 +1,34 @@
|
||||
<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="hasAjax&&!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:()=>[]
|
||||
},
|
||||
hasAjax:{
|
||||
type:Boolean,
|
||||
default:false
|
||||
}
|
||||
})
|
||||
const emits=defineEmits(['printOrder'])
|
||||
function print(item) {
|
||||
emits('printOrder',item)
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.list {
|
||||
padding: 32rpx 28rpx;
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user