-1

私はhtmlテンプレート要素を持っています。最初に設定したのに、ビューの下部に読み込まれています。ビューの上に配置したい。何か案が?tplそのテンプレート要素は

マイコード

config: {
    title: 'Info ',
    styleHtmlContent: true,
    scrollable: true,

    tpl: ['<table><tr><td><img src="{image}" height="60" width="60" id="{id}" /></td></tr>',
        '<tr><td>{model}</td></tr>',
        '<tr><td>{price}</td></tr>',
        '<tpl for="color">',
        '<tpl for="infos">',
        '<tr><td>{name}: <tpl for="item_names"> ],
    store: 'Item',

    items:[

        {
            xtype: 'fieldset',

            items : [

                {
                    xtype : 'selectfield',
                    name : 'quantity',
                    label:'Quantity',
                    id: 'quantity'
                },{
                 other elements
                  }


                ]

            }
    ]
4

3 に答える 3

0

これを試して、

config: {

 scrollable:true,
 styleHtmlContent:true,

 items:[
{
 xtype: 'panel',
 title: 'Info ',
 style: 'margin-top: 0%;',
 height: '20%', // whatever height you want for templete
 width: '20%',  //  whatever width you want for templete
 styleHtmlCls:'details',
tpl:['<table><tr><td><img src="{image}" height="60" width="60" id=" {id}" /></td></tr>',
    '<tr><td>{model}</td></tr>',
    '<tr><td>{price}</td></tr>',
    '<tpl for="color">',
    '<tpl for="infos">',
    '<tr><td>{name}: <tpl for="item_names">'],
store: 'Item',
},     
{
xtype: 'fieldset',                     
items : [                            
 {
    xtype : 'selectfield',
    name : 'quantity',
    label:'Quantity',
    id: 'quantity'
 },{
     other elements
    }   
 ]

 }
   ]
},

これがあなたに役立つことを願っています。

于 2013-04-01T09:18:33.227 に答える
0

別のコンポーネントを作成し、そのコンポーネント内に tpl をラップすることでそれを行うことができます。次に、そのコンポーネントをビューのアイテムとして含めることができます。

items:[
    {
        xtype: 'panel',
        tpl: [
             '<table><tr><td><img src="{image}" height="60" width="60" id="{id}" / </td></tr>',
             '<tr><td>{model}</td></tr>',
             '<tr><td>{price}</td></tr>',
             '<tpl for="color">',
             '<tpl for="infos">',
             '<tr><td>{name}: <tpl for="item_names">'
        ],

        store: 'Item'

    },

    {
        xtype: 'fieldset',

        items : [

            {
                xtype : 'selectfield',
                name : 'quantity',
                label:'Quantity',
                id: 'quantity'
            },{
                other elements                  
             }
        ]

    }
]
于 2013-04-01T10:00:26.113 に答える
0

テーブルcssの設定を試みます:

table { display: block; top: 0px;}
于 2013-04-01T09:15:35.157 に答える