KillThunder
V2EX  ›  问与答

extjs item 能用循环吗?

  •  
  •   KillThunder · Mar 21, 2017 · 1604 views
    This topic created in 3338 days ago, the information mentioned may be changed or developed.

    extjs 在 item 里能用循环吗?现在我从后台得到了一个对象,这个对象里有 list ,想在 items 里其中一个元素进行循环,求大声帮忙

    3 replies    2017-03-21 17:45:27 +08:00
    KillThunder
        1
    KillThunder  
    OP
       Mar 21, 2017
    把大神打成大声了...
    leopku
        2
    leopku  
       Mar 21, 2017   ❤️ 1
    不清楚 extjs item 细节
    可以试试 Array.prototype.map.call(blablabla.list, function(item){ console.log(item); }) 有没有效
    KillThunder
        3
    KillThunder  
    OP
       Mar 21, 2017
    @leopku
    doInitItems : function () {
    Ext.apply(this, {
    layout: 'anchor',
    bodyPadding: 10,
    title: '编辑记录',

    items: [{
    xtype : '...',
    name : '...',
    id : '...',
    bind : {
    value : '{...}'
    }
    }]
    }
    }
    我现在怎么才能得到 items ?
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   5689 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 35ms · UTC 06:58 · PVG 14:58 · LAX 23:58 · JFK 02:58
    ♥ Do have faith in what you're doing.