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 :
And I will post the whole user doc when I finish it .