Files
medical-mall/components/consumer/EmptyState.uvue

23 lines
628 B
Plaintext

<template>
<view class="empty-state">
<image class="empty-img" :src="image" v-if="image" />
<text class="empty-text">{{ text }}</text>
<slot name="action"></slot>
</view>
</template>
<script lang="uts">
export default {
props: {
text: { type: String, default: '暂无数据' },
image: { type: String, default: '/static/default.png' }
}
}
</script>
<style scoped>
.empty-state { display:flex; flex-direction:column; align-items:center; justify-content:center; padding:60rpx 20rpx }
.empty-img { width:160rpx; height:160rpx; margin-bottom:24rpx }
.empty-text { color:#999; font-size:28rpx }
</style>