请检查这个小提琴,看看我是如何在 Ext.onReady 函数中编写代码的。虽然这段代码运行良好,但如果我需要在 ExtJs 视图中编写相同的代码,我该如何修改现有代码以在视图中包含网格和组功能。
当我在里面编写代码时,Ext.onReady 函数,我可以定义一组向下的几行,我可以定义一个工具栏,然后使用 Ext.create() 声明网格,然后将所有这些包含在网格中。但是我怎样才能在视图中实现相同的效果???
Ext.define('MyView',
{
extend: 'Ext.window.Window',
alias: 'widget.myView',
id: 'my-window',
title: 'Test',
width: 600,
height: 400,
minWidth: 600,
minHeight: 400,
modal: true,
layout:
{
type: 'vbox',
align: 'stretch'
},
items:
[{
xtype: grid // At this point, how can i declare group feature and include it??
}]
});