zoukankan      html  css  js  c++  java
  • Extjs Grid 各种Demo

    grid的一个渲染效果

    Ext.define('cfWeb.view.accountSetting.OrgManageView',{
        alias : 'widget.orgManageView',
        extend : 'Ext.panel.Panel',
        layout:'fit',
        items:[{
            xtype : 'gridpanel',
            store : {
                data :[
                    {'orgName' : 'org1','cloudPart':'智慧城管','userOperate':'1'},
                    {'orgName' : 'org2','cloudPart':'智慧城管','userOperate':'3'},
                    {'orgName' : 'org3','cloudPart':'智慧城管','userOperate':'2'},
                ],
                fields :[
                    {name : 'orgName'},
                    {name : 'cloudPart'},
                    {name : 'userOperate'}
                ]
            },
            columns :[
                {header : '名称',dataIndex : 'orgName',flex :1},
                {header : '所属云',dataIndex : 'cloudPart',flex :1},
                {
                 header : '操作',
                 dataIndex : 'userOperate',
                 flex : 2,
                 renderer : function(value) {
                                if (value=='1') {
                                    return "<span style='color:green'>激活</span>";
                                } else {
                                    return "<span style='color:red'>冻结</span>";
                                }
                            }
                }
            ]
        }],
        
        initComponent : function(){
            this.callParent(arguments);
        }
    });

    结果

  • 相关阅读:
    .net开发环境的选择
    html头部的一些信息
    SQLHelper类
    C#实现文件下载
    js类
    Winform小知识点
    emacs 代码缩进
    自己喜欢的shell终端配置
    time_wait过多的优化
    Emacs 电子邮件组件RMAIL
  • 原文地址:https://www.cnblogs.com/yukino/p/3937309.html
Copyright © 2011-2022 走看看