我想使用Extjs 6.5.2尝试hello world示例。 当我尝试运行以下代码时
var containerPanel = Ext.create('Ext.panel.Panel', {
renderTo: 'app-div1',
width: 400,
height: 200,
title: 'Container Panel',
layout: 'column',
suspendLayout: true // Suspend automatic layouts while we do several different things that could trigger a layout on their own
});
containerPanel.add({
xtype: 'panel',
title: 'Child Panel 1',
height: 100,
columnWidth: 0.5
});
containerPanel.add({
xtype: 'panel',
title: 'Child Panel 2',
height: 100,
columnWidth: 0.5
});
containerPanel.suspendLayout = false;
containerPanel.updateLayout();
浏览器控制台抛出错误
ext/modern/modern/src/layout/container/Column.js net::ERR_FILE_NOT_FOUND
即使我尝试在app.js
Ext.application({
name: 'MyApp',
extend: 'MyApp.Application',
requires: [
'MyApp.*',
'Ext.panel.Panel',
'Ext.layout.container.Column'
]
});
我发现ext-6.5.2-trial.zip
container
中未包含\ext\modern\modern\src\layout
个文件夹。
我可以在使用Ext.panel.Panel
组件之前知道我是否遗漏了任何步骤?
谢谢。
答案 0 :(得分:1)
对于经典,您需要在[{"id":"0",
"collapsed":false,
"rowHeight":15,
"userLevel":"0"
},{
"id":"4",
"collapsed":false,
"rowHeight":15,
"name":"(1 - jnb) Bjerre, Janine Nedergaard ",
"userLevel":"3"
},{
"id":"270",
"parent":"4",
"rowHeight":15,
"periods":[{
"id":"270_2",
"stoke":"none",
"start":"1512370800000",
"end":"1512464400000",
"fill":"#DCE4EF",
"personID":4,
"id_task":"270"
},{
"id":"474_3",
"stoke":"none",
"start":"1512543600000",
"end":"1512547200000",
"fill":"#DCE4EF",
"personID":4,
"id_task":"474"
},{
"id":"140_6",
"stoke":"none",
"start":"1512548100000",
"end":"1512743400000",
"fill":"#DCE4EF",
"personID":4,"id_task":"140"}]
},{
"id":"488",
"parent":"4",
"rowHeight":15,
"periods":[{"
id":"488_4",
"stoke":"none",
"start":"1512543600000",
"end":"1512547200000",
"fill":"#DCE4EF",
"personID":4,
"id_task":"488"
},{
"id":"485_7",
"stoke":"none",
"start":"1512554400000",
"end":"1512561600000",
"fill":"#DCE4EF",
"personID":4,
"id_task":"485"
},{
"id":"247_8",
"stoke":"none",
"start":"1512564960000",
"end":"1512568560000",
"fill":"#FFFFFF",
"personID":4,
"id_task":"247"}]
},{
"id":"372",
"parent":"4",
"rowHeight":15,
"periods":[{
"id":"372_5",
"stoke":"none",
"start":"1512547200000",
"end":"1512556200000",
"fill":"#DCE4EF",
"personID":4,
"id_task":"372"
},{
"id":"222_9",
"stoke":"none",
"start":"1512565200000",
"end":"1512568800000",
"fill":"#DCE4EF",
"personID":4,
"id_task":"222"}]
},{
"id":"313",
"parent":"4",
"rowHeight":15,
"periods":[{
"id":"313_10",
"stoke":"none",
"start":"1512566400000",
"end":"1512570000000",
"fill":"#FFFFFF",
"personID":4,
"id_task":"313"}]
},{
"id":"26",
"collapsed":false,
"rowHeight":15,
"name":"(aal) Aalb\u00e6k, Arne ",
"userLevel":"3"
},{
"id":"423",
"parent":"26",
"rowHeight":15,
"periods":[{
"id":"423_12",
"stoke":"none",
"start":"1512370800000",
"end":"1512401400000",
"fill":"#DCE4EF",
"personID":26,
"id_task":"423"}]
},{
"id":"6",
"collapsed":false,
"rowHeight":15,
"name":"(tc) Clausen, Tom ",
"userLevel":"1"
},{
"id":"436",
"parent":"6",
"rowHeight":15,
"periods":[{
"id":"436_14",
"stoke":"none",
"start":"1512367200000",
"end":"1512738000000",
"fill":"#DCE4EF",
"personID":6,
"id_task":"436"}],
},{
"id":"508",
"parent":"6",
"rowHeight":15,
"periods":[{
"id":"508_15",
"stoke":"none",
"start":"1512370800000",
"end":"1512471600000",
"fill":"#DCE4EF",
"personID":6,
"id_task":"508"}]
}]
app.js
和Ext.panel.Panel
中删除这2行。如果您需要,可以在Ext.layout.container.Column
次视图中提出要求。
在Gantt Chart工具包中没有classic
布局,但在modern
中存在column
布局 classic
。
请参阅此 Ext.layout.container.Column ,这与column
上的layout:column
媒体相关。
Ext.panel.Panel