Usage of tabs on the top of MUI (tab-top-webview-main ),
Preface
MUI is a high-performance front-end framework closest to the native APP experience. It has important functions: pull-down refresh, slide navigation, sliding trigger menu, top (bottom) tab, etc.
A small bug encountered recently when I used MUI for mobile app applications. By the way, I studied this tab-top-webview-main. Here I will share it with you.
1
Homepage code
<! Doctype html>
2
Subpage code
<! DOCTYPE html>
3
Code explanation
Var group = new webviewGroup ("tab-top-webview-main.html", {items: [{id: "tab-top-subpage-1.html", // This is the path url for subpage 1: "tab-top-subpage-1.html", extras: {}}, {id: "tab-top-subpage-2.html", // This is the path url of child page 2: "tab-top-subpage-2.html", extras: {}}]})
1. The data-wid = "" attribute of Hyperlink a on the subpage tab must be set to the path of the corresponding subpage tab.
<A class = "mui-control-item mui-active" href = "# item1mobile" data-wid = "tab-top-subpage-1.html"> recommended </a>
2. Here, the first parameter of new webviewGroup ("tab-top-webview-main.html", {}) needs to pass in the id of a page. Note that this page id is the page that contains the top tab, that is, the page where the current js is located.
new webviewGroup("tab-top-webview-main.html", {}
3. In the items array, the id of the imported sub-page corresponding to the sub-page tab is input. Several sub-pages are added when there are several sub-pages separated by commas.
If you have other requirements, you can go to the MUI website to find the help documentation http://dev.dcloud.net.cn/mui/. there are many other small features, so I will continue to update the documentation ~~~