V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
V2EX 提问指南
KillThunder
V2EX  ›  问与答

extjs item 能用循环吗?

  •  
  •   KillThunder · 2017-03-21 16:30:56 +08:00 · 1134 次点击
    这是一个创建于 2598 天前的主题,其中的信息可能已经有所发展或是发生改变。

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

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

    items: [{
    xtype : '...',
    name : '...',
    id : '...',
    bind : {
    value : '{...}'
    }
    }]
    }
    }
    我现在怎么才能得到 items ?
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   800 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 25ms · UTC 22:00 · PVG 06:00 · LAX 15:00 · JFK 18:00
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.