<template>
	<view class="noData" :style="{position: position}">
		<view class="noData_info">
			<template v-if="picUrl">
				<image mode="widthFix" class="img" :src="picUrl" :alt="title" />
			</template>
			<text class="title">{{ title }}</text>
		</view>
	</view>
</template>

<script>
	export default {
		props: {
			picUrl: {
				type: String
			},
			title: {
				type: String,
				default: '暂无数据'
			},
			position: {
				type: String,
				default: 'absolute'
			}
		},
		data() {
			return {}
		}
	}
</script>

<style lang="scss">
	.noData {
		display: flex;
		top: 0;
		right: 0;
		bottom: 0;
		left: 0;
		
		
		.noData_info {
			align-self: center;
			margin: 180rpx auto;
			
			.img {
				margin: 0 auto 40rpx auto;
				height: 180rpx;
				width: 180rpx;
			}
			
			.title {
				text-align: center;
				font-size: 30rpx;
				font-weight: 400;
				line-height: 1;
				color: $B18181;
			}
		}
	}
</style>
