简体   繁体   中英

How to set toolbar in Wechat Applet

I want to set toolbar with 3 or 4 icon buttons. When an icon is clicked, a slider with a select box should appear. Is a toolbar component and a select dropdown slider component available in the Wechat Mini program?

Customised tool bar

var sys= wx.getSystemInfoSync() 
var menu = wx.getMenuButtonBoundingClientRect() 

var statusHeight = menu.statusBarHeight
var titleHeight = menu.height
var titleRowWidth = sys.right - menu.right
var titleColumnHeight = menu.top - menu.statusBarHeight

在此处输入图像描述

Fisrt,open the file "app.json". Updating the value of "navigateionStyle" as "custom",and then the pageHeader will display.You can custom the top part of page.But the menu "button" like capsule at right-top of page will exist there.So you could calculate some parameters.

Maybe,the image will help you understand this. ABout your searchBar,you can use this method to create your custom labels.If you need to use it in some pages,you can package this as a custom component.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM