WeChat applet development tab (TabBar at the bottom of the window) page switch implementation

Source: Internet
Author: User
This article describes how to switch the tabs (TabBar at the bottom of the window) of Applet development. It has good reference value. Next, let's take a look at it. This article mainly introduces the knowledge of page switching on the tabs of Applet development (TabBar at the bottom of the window. It has good reference value. Let's take a look at it with the small editor.

In applet development, it is very convenient to switch the tab bar at the bottom of the window to the page.

// App. json {"pages": ["pages/index", "pages/logs"], "window": {"backgroundTextStyle": "light ", "navigationBarBackgroundColor": "#999999", "navigationBarTitleText": "tab", "navigationBarTextStyle": "white"}, "tabBar": {"color": "# ccc ", "selectedColor": "# 35495e", "borderStyle": "white", "backgroundColor": "# f9f9f9", "list": [{"text": "homepage ", "pagePath": "pages/index", "iconPath": "images/home.png", "selectedIconPath": "images/home-actived.png" },{ "text ": "directory", "pagePath": "pages/catalogue", "iconPath": "images/note.png", "selectedIconPath": "images/note-actived.png "}, {"text": "My", "pagePath": "pages/mine", "iconPath": "images/profile.png", "selectedIconPath ": "images/profile-actived.png"}]}


PagePath is the page path. iconPath is the image path, and the icon size is limited to 40 KB.

SelectedIconPath: specifies the image path when the image is selected. the icon size is limited to 40 KB.

The maximum number of tabs is 5, and the minimum number is 2.

Write the page in the pages directory to switch.

The preceding figure shows the implementation of page switching on the tab (TabBar at the bottom of the window) of Applet development. For more information, see other related articles in the first PHP community!

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.