gaoshp
2024-11-19 f29900986f01cf5d39b5755cec674825cef27961
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
<!--
 * @Descripttion: 统计数值组件演示
 * @version: 1.0
 * @Author: sakuya
 * @Date: 2021年6月23日10:28:17
 * @LastEditors:
 * @LastEditTime:
-->
 
<template>
    <el-main>
        <el-alert title="一个非常简单的组件, 目的就是省去重复写样式, 支持千分符/前后缀等." type="success" style="margin-bottom:20px;"></el-alert>
        <el-row :gutter="15">
            <el-col :lg="8">
                <el-card shadow="never">
                    <sc-statistic title="Title" value="112893" description="Description" tips="Tips" groupSeparator></sc-statistic>
                </el-card>
            </el-col>
            <el-col :lg="8">
                <el-card shadow="never">
                    <sc-statistic title="今日净利润" value="112893.00" prefix="¥" groupSeparator>
                        <sc-trend v-model="trendValue1"></sc-trend>
                    </sc-statistic>
                </el-card>
            </el-col>
            <el-col :lg="8">
                <el-card shadow="never">
                    <sc-statistic title="留言" value="112893" suffix="条" groupSeparator>
                        <sc-trend v-model="trendValue2"></sc-trend>
                    </sc-statistic>
                </el-card>
            </el-col>
        </el-row>
    </el-main>
</template>
 
<script>
    import scStatistic from '@/components/scStatistic';
 
    export default {
        name: 'statistic',
        components: {
            scStatistic
        },
        data() {
            return {
                trendValue1: 7.7,
                trendValue2: -18.9
            }
        },
        mounted() {
 
        },
        methods: {
 
        }
    }
</script>
 
<style scoped>
    .el-card {margin-bottom: 15px;}
    .up {color: #F56C6C;margin-left: 5px;}
    .down {color: #67C23A;margin-left: 5px;}
</style>