dataCard.vue
1.3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
<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>