1.layeruiå¦ä½ä½¿ç¨LayerUI
layeruiå¦ä½ä½¿ç¨LayerUI
lauiçåºæ¬ç¨æ³ä»ç»æ¹æ³:layui.define([mods]ï¼åè°)LocalStorageæ¯å¯¹æ¬å°åå¨åsessionStorageçå好å°è£ ï¼å¯ä»¥æ´æ¹ä¾¿å°ç®¡çæ¬å°æ°æ®ã
LocalStorageæä¹ åå¨:layui.data(tableï¼settings)ï¼é¤éç©çå é¤ï¼å¦åæ°æ®å°æ°¸è¿åå¨ã
sessionstoragesessionstorage:layui.sessiondata(tableï¼settings)ï¼å ³é页é¢æ¶ä¼å¤±æã注æ:laui2.2.5æ¯æ°çã
layui.device(å¯é¥)
æ¹æ³/å±æ§æè¿°
Layui.cacheéæå±æ§ãè·åä¸äºé ç½®å临æ¶ç¼åä¿¡æ¯ã
Layui.extend(options)æ©å±æ¨¡åå«åï¼å¦layui.extend({ test:/RES/js/test})
éålayui.each(objï¼fn)对象(æ°ç»ï¼å¯¹è±¡ï¼DOM对象çã)ï¼å¯ä»¥ç¨æ¥æ¿æ¢forè¯å¥ã
Layui.getStyle(nodeï¼name)è·åä¸ä¸ªåå§DOMèç¹çæ ·å¼å±æ§å¼ï¼æ¯å¦:Layui.getstyle(document.bodyï¼font-size)
layui.img(url,防红防红通达信源码攻击波强弱度callback,error)å¾çé¢å è½½Layui.img(urlãåè°ãé误)å¾åé¢å è½½
Layui.sort(objï¼keyï¼desc)æ ¹æ®æ个æå对æ°ç»ä¸ç对象è¿è¡éæ°æåºï¼æ¯å¦:Layui.sort([{ a:3}ï¼{ a:1}ï¼{ a:5}]ï¼ä¸)
Layui.router()è·ålocation.hashè·¯ç±ï¼ä½ç®åå¨Layuiä¸ä¸èµ·ä½ç¨ã对äºå页åºç¨ç¨åºæ¥è¯´ï¼å®ä¼å¾æ¹ä¾¿ã
Layui.hint()å°ä¸äºå¼å¸¸ä¿¡æ¯æå°å°æ§å¶å°ï¼åªæerroræ¹æ³:layui.hint()ãé误(é误)
é²æ¢äºä»¶å泡ã
Layui.onevent(modnameï¼eventsï¼callback)èªå®ä¹æ¨¡åäºä»¶ï¼å±äºæ¯è¾é«çº§çåºç¨ãæå ´è¶£çåå¦å¯ä»¥ççlayui.jsçæºä»£ç å表å模åã
Layui.event(modnameï¼eventsï¼params)æ§è¡èªå®ä¹æ¨¡åäºä»¶ï¼å¹¶ä¸oneventä¸èµ·ä½¿ç¨ã
layui.factory(modName)ç¨äºè·å模å对åºçå®ä¹åè°å½æ°ã
å¨æ¨¡å空ä¹é´å½å
layuiç模åæ¥å£å°è¢«ç»å®å¨layui对象ä¸ï¼å ¶å é¨ç±layui.define()æ¹æ³å®æãæ¯ä¸ªæ¨¡åå°æä¸ä¸ªå¯ä¸çå称ï¼ä¸è½è¢«å ç¨ãæä»¥ä½ ä¸éè¦æ å¿æ¨¡åç空æ¿é´è¢«æ±¡æï¼é¤éä½ ä¸»å¨å äºæuiã{ 模åå称}ãå¯ä»¥éè¿layui.useæ¹æ³è°ç¨æ¨¡åï¼ç¶åéè¿layui对象è·å模åæ¥å£ã
å¦ä½ä½¿ç¨å é¨jQuery
//主å¨å è½½jquery模å
layui.use([jqueryå±]ï¼å½æ°(){
Var//å ³é®ç¹
ï¼layer=layui.layer
//å°±åä½ å¹³æ¶ç¨jQueryä¸æ ·ã
$(æ£æ).追å (ä½ å¥½jquery
});
pså¦ä½å¿«éæ¢åºç²¾è´ï¼
åå§ç©ä½æ®µæ°ç°å·²ç»è½ä¿®æ¹å å·²ç»å»ºå¥½æ¨¡ååä¿®æ¹å级段æ°ä¼ä½¿æ¨¡ååºç°é误ç´æ¥éæ©è§å¾å¤ªéå©è¾¹ç¼çº¿EditMeshééæ©Bevelå½ä»¤ä¹åè§ä½¿äºéå©å¤åæ»è¾¹è§åæ»ç¹å¼é¢æ¹æ ¼æ¥è°æ´åè§æ®µæ°å大å°ä¹å³è¾¹å±æ§æ éè°èoffset大å°Segments段æ°å ¶å®ä¹èªå·±è¯ä¸å°å¿æå±æ§æ å ³æDisplay-UIElements--ChannelBox/LayerEditoræé©å¼å¯å±æ§æ äºPS.æç¨ç¥éç¨ææåªåäºæ没ç¨è¿æè§å¾åºè¯¥ä¹ä¼å·®å¤å§
iOS7appstore带边æ¡çæé®æ¯æä¹å®ç°çï¼
å¯ä»¥ç¨viewçlayerå±æ§æ¥åçãå¦æåªæ¯ç®åå°å ä¸ä¸ªè¾¹æ¡çè¯ï¼å¯ä»¥è¿æ ·ï¼
UIButton*yourButton=;
//åå§åå·¥ä½ï¼è®¾ç½®æåï¼frameççï¼ç¥
//æé®è¾¹æ¡å®½åº¦
yourButton.layer.borderWidth=1.5;
//设置åè§
yourButton.layer.cornerRadius=4.5;
//设置é¢è²ç©ºé´ä¸ºrgbï¼ç¨äºçæColorRef
CGColorSpaceRefcolorSpace=CGColorSpaceCreateDeviceRGB();
//æ°å»ºä¸ä¸ªçº¢è²çColorRefï¼ç¨äºè®¾ç½®è¾¹æ¡ï¼å个æ°ååå«æ¯r,g,b,alphaï¼
CGColorRefborderColorRef=CGColorCreate(colorSpace,(CGFloat){ 1,0,0,1});
//设置边æ¡é¢è²
yourButton.start.layer.borderColor=borderColorRef;
å¦å¤ï¼è¿éæä¸ä¸ªç²¾å½©çä¾åï¼æ¨èä¸ä¸ï¼
/ios/UIButton-Bootstrap/e8cfab
osç³»ç»æ¶æï¼
第ä¸ãæä½ç³»ç»å±ï¼OSï¼
第äºãåç§åºï¼Librariesï¼åAndroidè¿è¡ç¯å¢ï¼RunTimeï¼
第ä¸ãåºç¨ç¨åºæ¡æ¶ï¼ApplicationFrameworkï¼
第åãåºç¨ç¨åºï¼Applicationï¼