<template>
	<view class="nodata" v-if="show">
		<image :src="emptyImage?emptyImage:baseImg" mode="widthFix" class="empty_image"></image>
		<text :style="{color:textColor}">{{ text }}</text>
	</view>
</template>

<script>
export default {
	props: {
		text: {
			type: String,
			default: '暂无数据'
		},
		textColor:{
			type: String,
			default: '#AAA'
		},
		emptyImage: {
			type: String,
		},
		show: {
			type: Boolean,
			default: false
		}
	},
	data() {
		return {
			baseImg:
				'data:image/png;base64,[encoded data, 13260 characters]'
		};
	},
	methods: {}
};
</script>

<style lang="scss">
.nodata {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	// height: calc(60vh);
	// width: calc(100vw);
	color: #666;
	font-size: 0.9rem;
}
.empty_image {
		width: 200rpx !important;
		margin-bottom: 50rpx;
	}
</style>
