1.Extjs ä¹ initComponent å constructorçåºå«
2.extjs å¼å¾å¦ä¹ å
Extjs ä¹ initComponent å constructorçåºå«
Extjs æä¾çç»ä»¶è¿æ¯æºä¸°å¯çï¼ ä½æ¯ææ¶åéæ±æ´ä¸°å¯ã
å½Extjs åççç»ä»¶æ æ³å®ç°æ们çè¦æ±çæ¶åï¼ å°±éè¦æ©å±Extjs çç»ä»¶å®ç°èªå¶ç»ä»¶äºã
é¤äºè¿ç§ä½¿ç¨ç¶åµï¼ ææ¶å对äºä¸äºç¸åå´æ使ç¨å¾å¤çé ç½®ï¼ å¯è½åæå®ç¬ç«åºæ¥ï¼åç¬è®¾ä¸ºä¸ç§ç»ä»¶ä¾å¤§å®¶è°ç¨ï¼ èçå¼åæ¶é´åæé«ä»£ç éç¨åº¦ã
initComponent å constructor å°±æ¯Extjs æä¾ç¨æ¥å®ç°ç»§æ¿åæ©å±çæ¹å¼ã
1. initComponentè¿ä¸ªæ¹æ³æ¯å¨Ext.Componentçæé å½æ°(constructor)ä¸è°ç¨çï¼åªæç´æ¥æé´æ¥ç»§æ¿èª Ext.Componentçç±»æä¼å¨constructoréè°ç¨initComponentæ¹æ³
çä¸ä¸ Ext.AbstractComponentçæºç æ件 src/AbstractComponent.js
å¨ constructoræ¹æ³ä¸è°ç¨äºinitComponent
2.
1ï¼èªå®ä¹ç±»ä¸ç initComponentãå½æ°ä¸å¿ é¡»è°ç¨ callParent();å¦å è°ç¨è æ æ³åå§åè¿ä¸ªå¯¹è±¡
2ï¼é对button è¿æ ·çæ©å±ç»ä»¶æ¥è¯´ï¼èªå®ä¹ç±»ä¸ç constructor ï¼éè¦è°ç¨callParent( arguments);å¦å è°ç¨è æ æ³åå§åè¿ä¸ªå¯¹è±¡
[html] view plaincopyprint?目源码e码易语言多开中控源码
this.callParent(arguments);
this.callParent(arguments);
è¿éçarguments æ¯éè¦çã
(å¨Extjs 4 ä¹åççæ¬ä¸ï¼ å¯è½ä¼çå°æ¯è¾å¤çXXX.superclass.constructor.call åæ³)
sencha çå®ç½ä¸æä¸ç¯é对è¿ä¸¤ä¸ªåºå«ç讨论ï¼
/forum/showthread.php?-constructor-Vs-initComponent
ä¸è¿è¯æ³æ¯åºäºExtjs 3 æ¥è®¨è®ºçï¼ ç¬è è§å¾ä½ç¨ä¸æ¯å¾å¤§ã
extjs å¼å¾å¦ä¹ å
å¦æéè¦çè¯ï¼å¼å¾å¦ä¹ä¸ç¨åè°cssï¼éä½äºå·¥ä½éï¼
ææ¡£åä¾åé½å ¨ï¼æ¯å¼æºçï¼æ¹ä¾¿æ¥çæºç ï¼
ç»ä»¶ä¸°å¯ï¼å¯ä»¥èªè¡å°è£ ç»ä»¶ï¼
æ´»è·çExtjså¼å交æµq群ï¼
2024-11-23 02:59
2024-11-23 02:30
2024-11-23 02:26
2024-11-23 02:14
2024-11-23 02:05
2024-11-23 01:54
2024-11-23 01:05
2024-11-23 00:34