1, pre-loading modal introduction
(1) Preload modal can be considered as a modal box containing the load indicator (preloader) and the related title.
(2) One of its functions is to prompt some background activities (like Ajax requests). The other is to block any user actions during this activity.
2, preload the use of modal (default caption)
If you use so that you do not specify title, the default caption is displayed. The default title is "Loading", which can be modified when the APP is initialized. Refer to my previous article: Framework7-Modify the Modal box default text (title, Confirmation | Cancel button, login box prompt)
$$ ('. Open-preloader '). On (' click ', function () {
Myapp.showpreloader ();
settimeout (function () {
Myapp.hidepreloader ();
}, 2000);
});
3, preload the use of modal (custom headers)
In addition to unifying the caption text when FRAMEWORK7 is initialized, I can also set the title separately each time I use the preload modal.
$$ ('. Open-preloader-title '). On (' click ', function () {
Myapp.showpreloader (' Uploading photos ... ')
settimeout (function () {
Myapp.hidepreloader ();
}, 2000);
});