dataDetail.vue
2.2 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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
<template>
<view class="detail_content">
<!-- 时间列表 -->
<view class="time_list">
<view
v-for="item in timeList"
:key="item.id"
class="time_item"
:class="{active: current === item.id}"
@click="current = item.id"
>
{{ item.text }}
</view>
</view>
<!-- 收入列表 -->
<view class="revenue">
<DataComputed v-show="current === 0" :showTitle="false" bgColor="transparent" :marginTop="0" />
<view v-show="current === 3" class="month">
4<text class="f-36 l-h-48">月</text>
</view>
<view v-show="current !== 0">
<view class="dis-flex flex-dir-column flex-y-center">
<text class="f-w-600 col-3d f-48 l-h-64">123456</text>
<text class="f-28 col-9 l-h-38 m-top10">总收入</text>
</view>
</view>
</view>
<view class="px-20" style="background-color: #fff;">
<RevenueCard v-for="item in 5" :key="item" />
</view>
</view>
</template>
<script>
import DataComputed from '@/components/data/dataComputed.vue'
import RevenueCard from '@/components/data/revenueCard.vue'
export default {
name:"dataDetail",
components: { DataComputed, RevenueCard },
data() {
return {
current: 0,
timeList: [
{ id: 0, text: '今日', time: new Date() },
{ id: 1, text: '近7日', time: '' },
{ id: 2, text: '近30日', time: '' },
{ id: 3, text: '近1年', time: '' }
]
}
}
}
</script>
<style lang="scss" scoped>
.detail_content{
padding: 20rpx 30rpx 0;
.time_list{
display: flex;
align-items: center;
justify-content: space-between;
margin-bottom: 68rpx;
.time_item{
width: 160rpx;
height: 60rpx;
background: #FFF0C3;
color: #666;
font-size: 28rpx;
line-height: 60rpx;
border-radius: 12rpx;
text-align: center;
&.active{
color: #333;
background: linear-gradient( 45deg, #FEE14D 0%, #FFC24D 100%);
}
}
}
.revenue{
position: relative;
display: flex;
align-items: center;
justify-content: center;
height: 200rpx;
background: radial-gradient(ellipse at 10% 20%, #e186ff33 0%, #86fbff33 90%);
border-radius: 12rpx 12rpx 0rpx 0rpx;
.month{
position: absolute;
top: -44rpx;
left: 40rpx;
color: #3d3d3d;
font-size: 72rpx;
font-weight: 500;
line-height: 96rpx;
}
}
}
</style>