KillThunder
V2EX  ›  问与答

extjs item 能用循环吗?

  •  
  •   KillThunder · Mar 21, 2017 · 1954 views
    This topic created in 3514 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
    KillThunder
    OP
    Mar 21, 2017
    1
    把大神打成大声了...
    leopku
    leopku
    Mar 21, 2017❤️1
    2
    不清楚 extjs item 细节
    可以试试 Array.prototype.map.call(blablabla.list, function(item){ console.log(item); }) 有没有效
    KillThunder
    KillThunder
    OP
    Mar 21, 2017
    3
    @leopku
    doInitItems : function () {
    Ext.apply(this, {
    layout: 'anchor',
    bodyPadding: 10,
    title: '编辑记录',

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