现在的位置: 首页 > 综合 > 正文

ExtJs 继承

2017年12月25日 ⁄ 综合 ⁄ 共 336字 ⁄ 字号 评论关闭

ExtJs 继承

Ext.define("SupClass",{
		config:{
			name:"sharp"
		},
		sayHello:function(){
			alert("hello world");
		},
		constructor:function(config){
			var th = this;
			th.initConfig(config);
		}
	});
	
	
	
	
	Ext.define("SubClass",{
		extend:"SupClass",
		constructor:function(config){
			var th = this;
			th.initConfig(config);
		}
	});
	console.info(SupClass.prototype);
	//Ext.create("SubClass").sayHello();

抱歉!评论已关闭.