/**
* Created by xiangc on 2017/8/8.
*/
<template>
    <el-table
            :data="baseInfo"
            :span="24"
            :row-class-name="'row-class'"
    >
        <el-table-column
                prop="key"
                label="基础信息"
        ></el-table-column>
        <el-table-column
                prop="value"
                label=""
        ></el-table-column>
    </el-table>
</template>

<script>
    export default {
        data: function () {
            return {
                baseInfo: [{
                    key: '现金',
                    value: 0,
                }, {
                    key: '签单',
                    value: 0,
                }, {
                    key: '实收',
                    value: 0,
                }, {
                    key: '利润',
                    value: 0,
                }],
            }
        },
        props: {
            xianjin: 0,
            qiandan: 0,
            shishou: 0,
            lirun: 0,
        },
        methods: {
            update:function () {
                this.baseInfo = [{
                    key: '现金',
                    value: this.xianjin,
                }, {
                    key: '签单',
                    value: this.qiandan,
                }, {
                    key: '实收',
                    value: this.shishou,
                }, {
                    key: '利润',
                    value: this.lirun,
                }];
            }
        },
        watch:{
            xianjin: function () {
                this.update();
            },
            qiandan: function () {
                this.update();
            },
            shishou: function () {
                this.update();
            },
            lirun: function () {
                this.update();
            }
        }
    }
</script>

<style scoped>

</style>