1
我是新來煎茶觸摸2,我想有這樣的:面板在面板在煎茶觸摸2
- 列表(例如,用於待辦事項,只是爲了嘗試ST2)在那裏我可以點擊編輯或將其設置爲完成等
我不知道我做的是正確的,但我想我有一個包含左側的列表和右側的詳細信息視圖的面板。縱觀文檔的Conatiner:
//this is the Panel we'll be adding below
var aboutPanel = Ext.create('Ext.Panel', {
html: 'About this app'
});
//this is the Panel we'll be adding to
var mainPanel = Ext.create('Ext.Panel', {
fullscreen: true,
layout: 'hbox',
defaults: {
flex: 1
},
items: {
html: 'First Panel',
style: 'background-color: #5E99CC;'
}
});
//now we add the first panel inside the second
mainPanel.add(aboutPanel);
我想我也許能使用config
屬性配置我的面板:
Ext.define("SimpleTodo.view.Main", {
extend: 'Ext.Panel',
config: {
items: [
{
xtype: 'panel',
config: {
html: 'Panel 1 ...'
}
},
{
xtype: 'panel',
config: {
html: 'Panel 2 ...'
}
}
]
}
});
失敗:一個空白屏幕。如果我將html
屬性添加到config
我顯示HTML,但是我在做什麼我的錯誤items
?
您可能還注意到,我有一個左側列表和右側的詳細信息。這對平板電腦非常有用,但是我怎樣才能讓它成爲手機?我是否需要使用配置文件和單獨的視圖?
其實,那對我來說1個混亂。 「面板」與「Ext.Panel」相同嗎?我以爲他們是別名或什麼的,但如果我使用Ext.Panel,我得到一個錯誤 –
哦,關於'config'和沒有'config'的東西,我怎麼知道我是否應該添加屬性到'config:{.. 。''或者只是把它放在對象屬性中? –
'panel'是一個xtype(類的別名),'Ext.Panel'是一個REAL類 –