Usage of tabs on the top of MUI (tab-top-webview-main ),

Source: Internet
Author: User

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 ~~~

 

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.