Ext.create使用(上)

本文介绍前两种使用方法:

 1 通过full name, alias 或者 alternate name实例化一个类
 2 
 3  // 别名
 4  // alias   
 5  var window = Ext.create('widget.window', {
 6      width: 600,
 7      height: 800,
 8      ...
 9  });
10 
11  // 备用名
12  // alternate name  
13  var window = Ext.create('Ext.Window', {
14      width: 600,
15      height: 800,
16      ...
17  });
18 
19  // 全类名
20  // full class name  
21  var window = Ext.create('Ext.window.Window', {
22      width: 600,
23      height: 800,
24      ...
25  });
26 
27  // 带有xclass属性的单个对象
28  // single object with xclass property:      
29  var window = Ext.create({
30      xclass: 'Ext.window.Window', // any valid value for 'name' (above)      对于 'name' ,以上的任何有效值(别名、备用名、全类名)
31      width: 600,
32      height: 800,
33      ...
34  });

 

posted @ 2019-06-18 16:28  松松敲代码  阅读(2198)  评论(0编辑  收藏  举报