zhaoxiaoqiang
2021-07-28 9e6e98a8c6541354619f15e81009082db8d3ad14
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
<!--
 * @Author: 小明丶
 * @Date: 2019-08-20 14:23:30
 * @LastEditors: 小明丶
 * @LastEditTime: 2020-11-16 16:50:58
 * @Description: 数据展示
 -->
<template>
    <section class="datacard-box flex-around-g text-center-g" :style="{background:$store.state.backColor}">
        <!-- <img src="static/img/circle-top.png" class="img top" alt="">
        <img src="static/img/circle-bottom.png" class="img bottom" alt=""> -->
        <div v-for="(item,index) in list" :key="index">
            <h4 class="title">{{ item.num || '0' }}</h4>
            <p class="label">{{ item.title || '' }}</p>
        </div>
 
    </section>
</template>
<script>
    export default {
        name: 'v-datacard',
        props:{
            list:{
                type:Array,
                default: () => {
                       return [
                            {
                                title:'交易额',
                                num:'126,500'
                            },
                            {
                                title:'交易单数',
                                num:'3,211'
                            },
                            {
                                title:'交易商户数',
                                num:'126'
                            }
                        ]
                    }
            }
        }
    }
</script>
<style lang="less" scoped>
.datacard-box{
    position: relative;
    height:105px;
    background:rgba(66,61,93,1);
    box-shadow:0px 6px 10px 0px rgba(66,61,93,0.3);
    border-radius:3px;
    color: @c-text-fff;
    background-image: url('../../../static/img/circle-top.png'),url('../../../static/img/circle-bottom.png');
    background-position: 0 0,100% 100%;
    background-size: 78px 65px,54px 41px;
    background-repeat: no-repeat;
    .title{
        font-size: @font-20;
        margin-bottom: 10px;
    }
    .label{
        font-size: @font-12;
    }
    // .img{
    //     position: absolute;
    //     &.top{
    //         top: 0;
    //         left: 0;
    //         width: 78px;
    //         height: 65px;
    //     }
    //     &.bottom{
    //         right: 0;
    //         bottom: 0;
    //         width: 54px;
    //         height: 41px;
    //     }
    // }
}
</style>