First MUI document address: http://dev.dcloud.net.cn/mui/ui/. MUI's UI components are relatively simple and easy to find in documents, and not too much to say.
1 in app development, using the html5+ API, you must mui.plusready the method.
2 commonly used a tags and window.herf jump method to change to
Mui.openwindow ({
URL: ' File path ',
ID: ' ID of the file you own '
})
3 Ajax sections. The MUI itself encapsulates the Ajax that can be crossed. Broadly similar to the JQ Ajax
Mui.ajax ({
URL: "",
Type: ',
Data: {},
DataType: ' JSON ',
Success:function (Result) {
}
});
Note that data is transmitted in a slightly different way. Data: {Id:id,bank:bank} is preceded by a field that is pre-booked with the background, followed by the value to be passed.
4 Refreshes the parent page. Is that you jump from A to B, and then you go back to a,a and the data changes.
First, when the child page is initialized, the Beforeback method is registered;
Mui.init ({
Beforeback:function () {
Gets the list interface of the webview var list = Plus.webview.currentWebview (). opener ();
// trigger a custom event (refresh) for the list interface for data refresh
Mui.fire (list, ' Refresh ');
Returns true to continue the page shutdown logic return true;
}
});
To add an event listener to the parent page
Window.addeventlistener (' Refresh ', function (e) {
Location.reload ();
document.getElementById (' Indexheader '). InnerHTML = ' Hello world ';
})
HTML5 Development app (some features of MUI)