c-no-data.vue 1.3 KB
<template>
	<view class="c-no-data" :style="[wrapStyle]">
		<view class="image">
			<u-image :src="vuex_baseImgUrl+'/no_data.png'" width="480rpx" height="480rpx"></u-image>
		</view>
		<view class="title" :style="[topStyle]">{{ title }}</view>
	</view>
</template>

<script>
	export default {
		name: 'c-no-data',
		props: {
			src: {
				type: String,
				default: ''
			},
			// 标题
			title: {
				type: String,
				default: '暂无数据'
			},
			paddingTop: {
				type: String,
				default: "180"
			},
		},
		data() {
			return {
				// vuex_baseImgUrl: this.vuex_baseImgUrl
			};
		},
		watch: {

		},
		computed: {
			wrapStyle() {
				let style = {};
				style.paddingTop = this.paddingTop + 'rpx';
				return style;
			},

			topStyle() {
				let style = {};
				style.top = (Number(this.paddingTop) + 360) + 'rpx';
				return style;
			},

		},
		methods: {
			

		}
	};
</script>

<style scoped lang="scss">
	.c-no-data {
		width: 100%;
		position: relative;

		.image {
			width: 480rpx;
			margin: 0 auto;
		}

		.title {
			width: 100%;
			position: absolute;
			top: 560rpx;
			left: 0rpx;
			text-align: center;
			font-size: 24rpx;
			line-height: 52rpx;
			color: #909097;
		}
	}
</style>