dataCard.vue 1.3 KB
<template>
	<view>
		<view class="dis-flex flex-y-center flex-x-between">
			<text class="title_common">今日实时数据</text>
			<text class="col-9 f-24">04-15 17:20</text>
		</view>
		<view class="dis-flex flex-y-center flex-x-between">
			<view class="box active">
				<text class="f-24">预计收入</text>
				<view class="f-36 f-w-600">{{ formatPrice[0] }}<text class="f-24 f-w-500">{{ '.' + formatPrice[1] }}</text></view>
			</view>
			<view class="box">
				<text class="f-24">有效订单</text>
				<view class="f-36 f-w-600">50</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		name:"dataCard",
		props: {
			title: {
				type: String,
				default: ''
			},
			time: {
				type: String,
				default: ''
			},
			orderNum: {
				type: Number,
				default: 0
			},
			proReveenue: {
				type: String,
				default: ''
			}
		},
		computed: {
			formatPrice(){
				return this.proReveenue.split('.')
			}
		}
	}
</script>

<style lang="scss" scoped>
.box{
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 10rpx;
	width: 320rpx;
	height: 130rpx;
	background: #F6F7FB;
	border-radius: 12rpx;
	color: #3d3d3d;
	margin-top: 44rpx;
	&.active{
		background: #FFE8DA;
		border: 2rpx solid #FFB336;
	}
}
</style>