
import Vue from "vue";
export default Vue.extend({
    template: `
        <span>
            <span v-if="subTotalRow"></span>
            <Icon type="md-checkmark" v-else-if="params.value === trueValue" color="green" :size="size"/>
            <Icon type="md-close" v-if="params.value === falseValue" color="red" :size="size"/>
        </span>
    `,
    name: 'boolean-cell',
    computed:{
        subTotalRow(){
            return this.params.data._subTotal_row
        }
    },
    data() {
        return {
            trueValue:'1',
            falseValue:'0',
            size:20,
            column: {}
        };
    },
    beforeMount() {
        this.column = this.params.colDef;
        //如果想要改变true和false的代值，需要在context里找到对应的原column
    },
    methods: {

    }
});