我想顯示一個容器的「名單」:我的意思是我創建了一個容器(我稱之爲容器A)中顯示的數據:如何選擇煎茶觸摸容器2.3.1
ID停靠在容器的左側,名稱在頂部,任務名稱(例如)在底部,日期停靠在右側。
接下來我嘗試在另一個容器(容器B)中顯示這個容器:一些容器放在一個更大的容器內,這樣我可以顯示數據。
但我需要選擇一個容器A,如果我想刪除或編輯它。我該怎麼做?
非常感謝。
編輯:
編碼: 「容器A」(... /應用程序/視圖/ Cliente.js)
Ext.define('proyecto.view.Cliente', {
extend: 'Ext.Container',
xtype: 'cliente',
requires: ['Ext.TitleBar'],
config: {
title: 'Cliente',
iconCls: 'info',
xtype: 'container',
layout: 'vbox',
margin: 10,
padding: 5, border: 15,
items: [
{
docked: 'left',
xtype: 'container',
width: 100,
html: 'ID_cliente',
style: 'background-color: #00CED1'
},
{
xtype: 'container',
flex: 2,
html: 'Nombre',
style: 'background-color: #6495ED'
},
{
xtype: 'container',
flex: 1,
html: '<DIV ALIGN=right><span style="background-color:#4169E1">Asignaciones</span></DIV>',
},
]
}});
編碼: 「容器B」(... /應用程序/視圖/ListaClientes.js)
Ext.define('proyecto.view.ListaClientes', {
extend: 'Ext.Container',
xtype: 'listaclientes',
requires: ['Ext.TitleBar', 'proyecto.view.Cliente'],
config: {
title: 'Lista de Clientes',
iconCls: 'team',
scrollable: true,
items: [
{
xtype: 'toolbar',
title: 'Lista de clientes',
docked: 'top',
items: [
{
text: 'Nuevo'/*,
action: 'nuevocliente'*/
},
{
text: 'Editar'/*,
action: 'editarcliente',
enableOnSelection: true,
disabled: true */
},
{
xtype: 'spacer'
},
{
text: 'Eliminar'/*,
action: 'eliminarcliente',
enableOnSelection: true,
disabled: true */
}
]
},
{ //example visualization
xtype: 'cliente',
height: 80,
},
{
xtype: 'cliente',
height: 80,
},
{
xtype: 'cliente',
height: 80,
},
{
xtype: 'cliente',
height: 80,
}
]
}});
屏幕容器B:我不能在這裏上傳的屏幕,我新手:( http://s7.postimg.org/q0gppq8h7/Container_B.jpg
如果您可以包含屏幕截圖或其鏈接或某些代碼,那會更好。 – Ranveer
你好。我包括兩個容器的代碼和「列表」的圖片。我需要在此列表中選擇以編輯或刪除所選的容器,我希望這一點很清楚。英語不是我的母語。 – kikerst