首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >将按钮添加到itemTpl sencha touch

将按钮添加到itemTpl sencha touch
EN

Stack Overflow用户
提问于 2012-12-31 05:16:47
回答 1查看 1.9K关注 0票数 0

我是新来的。

下面是我的代码

代码语言:javascript
复制
     Ext.define('bluebutton.view.BlueButton.CouponList', {
        extend: 'Ext..DataView',
        xtype: 'couponlistcard',
        requires: [
            'Ext.field.Select',
            'Ext.field.Search',
            'bluebutton.view.BlueButton.MemberDetail',
             'Ext.plugin.ListPaging',
            'Ext.plugin.PullRefresh'

        ],
        config: {

            styleHtmlContent: true,
            scrollable: 'vertical',

             store : { xclass : 'bluebutton.store.BlueButton.MemberList'},
            grouped: true,
            indexBar: true,
             autoLoad: false,
           disclosure: true,
           cls:'customHeader',

            id :'memberlist',
            items: [
                {



                }

            ],
            emptyText: '<p class="no-search-results">No member record found matching that search</p>',
            itemTpl: Ext.create(
                'Ext.XTemplate',

   '<div style="float:left;width=33%;margin:2px;"><div class="demo-weather">',
                            '<tpl for=".">',
                                '<div class="day">',
                                    '<div class="date">{memberId}</div>',
                                    '<tpl for="weatherIconUrl">',
                                        '<img src="{value}">',
                                    '</tpl>',
                                    '<span class="temp">{memberId}&deg;<span class="temp_low">{memberId}&deg;</span></span>',
                                    'button here?????'
                                '</div>',
                            '</tpl>',
                        '</div></div>'





            ),



        },


    });

顺便说一下,我正在提前使用MVC model.Thanks。

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2013-01-17 10:52:22

列表模板不是为使用组件而设计的,但是您应该能够在数据视图中使用它们。另一种方法是将按钮的div添加到模板中,然后使用模板上的成员函数可以创建按钮并将其呈现到div中。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/14094748

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档