1.ligerUIä¸ligerDialogåligerWindowçåºå«
ligerUIä¸ligerDialogåligerWindowçåºå«
ä»APIæ¥çï¼å®ä»¬ä¹é´è§ä¹æ²¡ææ ¹æ¬æ§çåºå«ï¼ä¸é¢ç对æ¯å¾ï¼æè¿éåªååºäºAPIææ¡£ä¸åæ°ç对æ¯å¾ï¼ä¸¤ä¸ªç±»å ¶ä»çAPIä¹ä¸å¾ä¸æ åµå·®ä¸å¤ï¼DialogçAPIæ¯è¾å¤ï¼ä½å ä¹é½æ¶µçäºWindowä¸çAPIï¼å¯ä»¥èªè¡è®¿é®ä¸é¢çç½åæ¥çï¼
/WindowçAPIéé¢æ¯Dialogå¤åºäºä¸æ ·ä¸è¥¿ï¼é£å°±æ¯äºä»¶åè°å½æ°ã
为ä»ä¹ä»ä»¬çAPIè¿ä¹æ¥è¿ï¼ä¸ºå¥ä¸æ¯ä¸ä¸ªä¸è¥¿å¢ï¼ä¸é¢ææ¾å°äºå®çæºç ï¼
/ligerui/LigerUI/tree/Release/Source/lib/ligerUI/js/pluginså¨ ligerWindow.js ä¸ï¼æåç°ç¬¬è¡ï¼å¦ä¸
l.controls.Window.ligerExtend(l.core.Win,源码照片制作源码 {åæ ·æå¨ ligerDialog.js ä¸ï¼è¡ï¼æåæ ·çä¸å¥è¯ï¼å¦ä¸
l.controls.Dialog.ligerExtend(l.core.Win, {è¿è¡¨ç¤ºDialogä¸Windowæ¯ç»§æ¿èªåä¸ä¸ªç¶ç±» l.core.Winï¼éåææ¥çäº js/core/base.jsï¼å¨è¿ä¸ªæ件çè¡æçå°äº liger.core.Win ççå®é¢ç®ãliger.core.Win 并没æåå¾å¤çäºæ ï¼åªå®ç°é®ç½©åè½åå®ä¹ä¸äºæ½è±¡æ¥å£ã
æåæåéæ°åå»é è¯»äº ligerDialog.js ç代ç ï¼ä»ç¬¬ è¡å¼å§ä¸ç´å°ç»æï¼è¿ææ¯ Dialog ä¸ Window æ大çåºå«æå¨ï¼Dialog æ¯åä¾å¯¹è±¡ï¼ä¸å»ºè®®å¨ä½¿ç¨çæ¶å继æ¿ä¸æ©å±ï¼è Window æ¯ä¸ä¸ªå¤ä¾ç±»ï¼å 许ç´æ¥ç»§æ¿å¹¶æ©å±ã
ææ¿åºæºç éé¢ 5个 æåºæ¬çå½æ°ï¼æ¥è¯´æ Dialog æ¯åä¾ç±»çäºå®ï¼
$.ligerDialog.open = function (p){
// å®ä¾åä¸ä¸ª l.controls.Dialog 对象
// å é¨å¯ä»¥è¿½è¿°å°ç¬¬è¡ï¼ä½¿ç¨ liger.run() å½æ°æé Dialog å®ä¾
return $.ligerDialog(p);
};
$.ligerDialog.close = function ()
{
// æ ¹æ® Dialogç±»å æ¥å°å°ææç dialog å®ä¾å¯¹è±¡
var dialogs = l.find(l.controls.Dialog.prototype.__getType());
// 循ç¯æ¯ä¸ä¸ª dialogå®ä¾å¹¶éæ¯
for (var i in dialogs)
{
var d = dialogs[i];
d.destroy.ligerDefer(d, 5);
}
// éèé®ç½©å±
// å¨ligerUIä¸ï¼ææççªå£ä½¿ç¨çæ¯ä¸ä¸ªå ¨å±çmask
// ç¸å ³ä»£ç å¯ä»¥ç js/core/base.js è¡
l.win.unmask();
};
$.ligerDialog.show = function (p)
{
var dialogs = l.find(l.controls.Dialog.prototype.__getType());
if (dialogs.length)
{
for (var i in dialogs)
{
// å¦æå·²ç»åå¨ dialogå®ä¾ï¼é£ä¹å°±ç´æ¥ä½¿ç¨å®ä¾å¯¹è±¡
// æ¾ç¤ºå·²åå¨çdialogï¼å¹¶è¿å
dialogs[i].show();
return;
}
}
// å¦æä¸åå¨ dialogå®ä¾ï¼ååå§åä¸ä¸ªå®ä¾å¹¶è¿å
return $.ligerDialog(p);
};
$.ligerDialog.hide = function ()
{
var dialogs = l.find(l.controls.Dialog.prototype.__getType());
// éèdialogå®ä¾ä¹æ¯ç¸åçæ¹å¼
for (var i in dialogs)
{
var d = dialogs[i];
d.hide();
}
};
$.ligerDialog.tip = function (options)
{
// åå§åé项åæ°
options = $.extend({
showType: 'slide',
width: ,
modal: false,
height:
}, options || { });
$.extend(options, {
fixedType: 'se',
type: 'none',
isDrag: false,
isResize: false,
showMax: false,
showToggle: false,
showMin: false
});
// æé ä¸ä¸ªDialogå®ä¾
return $.ligerDialog.open(options);
};
æ ¹æ®ä¸é¢ç代ç 解读ï¼ç»è®ºå°±å¾æ¸ æ°äºï¼
Dialogæ¯ä¸ä¸ªåä¾å¯¹è±¡ï¼ä¸å»ºè®®ç»§æ¿ä¸æ©å±
Windowæ¯å¤ä¾ç±»ï¼å 许继æ¿å¹¶æ©å±
æè§å¾ligerUI对Windowç设计没æ Ext 设计å¾å¥½ï¼Dialogåºä½ä¸ºWindowçä¸ä¸ªåä¾å¯¹è±¡æç¸å¯¹åçï¼Extå°±æ¯è¿ä¹åçãæå ´è¶£çè¯ï¼å¯ä»¥äºè§£ä¸Extï¼Extæ¯ç®åæ认为å端UIç»ä»¶å设计å¾æ好çä¸ä¸ªæ¡æ¶ã
2024-11-18 22:11
2024-11-18 21:40
2024-11-18 21:14
2024-11-18 21:07
2024-11-18 20:38
2024-11-18 20:20
2024-11-18 20:15
2024-11-18 20:02