📄 index.js
字号:
Class('App', 'linb.Com',{ Instance:{ //base Class for linb.Com base:["linb.UI"], //requried class for the App //"linb.Tips","linb.UI.Resizer","linb.UI.Border","linb.UI.Shadow" required:["linb.UI.Div", "linb.UI.Button"], events:{"onReady":"_onready"}, _onready:function () { SPA=this; //set com factory profile linb.ComFactory.setProfile(CONF.ComFactoryProfile); }, _button9_onclick:function (profile, e, value) { var host=this; linb.ComFactory.getCom('module1',function(){ var ns=this; host.div16.append(ns.getUIComponents(),false); }); }, _button10_onclick:function (profile, e, value) { var host=this; linb.ComFactory.getCom('module2',function(){ var ns=this; host.div17.append(ns.panelMain,false); }); }, iniComponents:function(){ // [[code created by jsLinb UI Builder var host=this, children=[], append=function(child){children.push(child.get(0))}; append((new linb.UI.Div) .host(host,"div16") .setLeft(100) .setTop(100) .setWidth(268) .setHeight(210) .setCustomStyle({"KEY":"border:dashed 1px;"}) ); append((new linb.UI.Button) .host(host,"button10") .setLeft(470) .setTop(340) .setCaption("\u52a0\u8f7d\u6a21\u57572") .onClick("_button10_onclick") ); append((new linb.UI.Div) .host(host,"div17") .setLeft(390) .setTop(100) .setWidth(268) .setHeight(210) .setCustomStyle({"KEY":"border:dashed 1px;"}) ); append((new linb.UI.Div) .host(host,"div20") .setLeft(100) .setTop(50) .setWidth(380) .setHeight(40) .setHtml("\u4ece\u5176\u4ed6\u7684js\u6587\u4ef6\u4e2d\u52a0\u8f7d\u754c\u9762\u6a21\u5757\uff0c\u5e76\u5c06\u5b83\u5c55\u793a\u5728\u4e00\u4e2a\u9875\u9762\u4e0a\u9762") ); append((new linb.UI.Button) .host(host,"button9") .setLeft(160) .setTop(340) .setCaption("\u52a0\u8f7d\u6a21\u57571") .onClick("_button9_onclick") ); append((new linb.UI.Div) .host(host,"div21") .setLeft(100) .setTop(20) .setWidth(370) .setHeight(30) .setHtml("\u52a8\u6001\u52a0\u8f7d\u4e0d\u540c\u7684\u754c\u9762\u6a21\u5757") .setCustomStyle({"KEY":"font-weight:bold;font-size:14px;"}) ); append((new linb.UI.Button) .host(host,"button36") .setLeft(250) .setTop(410) .setWidth(160) .setCaption("\u52a0\u8f7d\u53e6\u5916\u4e00\u4e2a\u5bf9\u8bdd\u6846\u6a21\u5757") .onClick("_button36_onclick") ); return children; // ]]code created by jsLinb UI Builder }, _button36_onclick:function (profile, e, value) { var host=this; linb.ComFactory.newCom('App.Module3' ,function(){ this.show(linb([document.body])); }); } }});
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -