如何在比较值时呈现字体真棒图标 - Ext JS

问题描述 投票:0回答:0

我有一个网格,在网格线上我想根据条件渲染一个很棒的字体图标。

text: UITEXT.GENERAL_STATUS,
dataIndex: 'status',
sortable: false,
flex: 0.5,
align: 'center',
renderer: function (value, record, dataIndex, cell, column) {
    if(value === 1){
        return 'x-fa fa-arrow-circle-up';
    }else if(value === 3){
        return 'x-fa fa-arrow-circle-down';
        }
    }
                                                     .                                                  
extjs extjs5
© www.soinside.com 2019 - 2024. All rights reserved.