Component develop with JavaScript

    This is a component library , wrote by myself , include alert , confirm , list , navigationBar , tabBar . The alert component and the confirm component are completed . But I think they are not perfect enough . And I will go on to make them more perfect . 

    OK , I just post the demo . All you need is just import the JS doc into your project before you use it . You know . But , there is one problem I need to explain to you , that it is not like you use the system alert that way . Means when you use it it will NOT stop the main thread which is I had spent so much time try to work out but never did . So you will see when you use it . Go ahead . 

    Now I tell you how to use it in code . After you import it , and you just need to code one line like : 

Component( "alert", "Root" );

Component( "confirm", "Everybody's life is hard , we're all doing the best we can . There's no point in comparing yourself to other people ! " );

    About alert : there are three parameters , first one is required , it is used to ID the component ; Second one is optional ,  the message of alert ; The third is optional , the handler , which is you want to call before the component is disappeared . 

    About confirm : it is just like alert , but it has the fourth parameter , it is the cancel handler which is you want to call before you click cancel button . 

    And it looks like : 

alert

    


    And I will post the whole user doc when I finish it . 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值