有 Java 编程相关的问题?

你可以在下面搜索框中键入要查询的问题!


共 (1) 个答案

  1. # 1 楼答案

    Ext.application({
    name : 'SwarmXTemplateExample2',
    
    launch : function() {
        Ext.create('Ext.dataview.List', {
            fullscreen: true,
            data: [
                { isDog: true, name: 'spot' },
                { isDog: false, name: 'jasper' },
                { isDog: true, name: 'gram' },
                { isDog: false, name: 'alex' },
                { isDog: false, name: 'snowball' }
            ],
            itemTpl: Ext.create('Ext.XTemplate',
                
                '<tpl if="values.isDog">Yes  <tpl else> No </tpl>',
                {
                    doNameCasing: function (name) {
                      return name.charAt(0).toUpperCase() + name.substr(1).toLowerCase();
                    }
                }
            )
        })
       }
     });