WxNavbar
A navbar component for wechat miniprogram.
Install / Use
/learn @Indomi/WxNavbarREADME
wx-navbar
小程序顶部导航栏自定义组件 A navbar component for wechar miniprogram.

使用
1. app.json设置
{
"window": {
"navigationStyle": "custom"
}
}
设置后所有页面都会失去顶部导航栏(右上角胶囊除外)
2. 在需要使用的页面 xxx.json中设置
{
"usingComponents": {
"navbar": "xxx/components/navbar/navbar"
}
}
3. 页面wxml中使用
<navbar options="{{options}}" />
其中
options = {
title: '示例', //正中央显示标题,必填
showCapsule: true, //是否显示左上角胶囊,必填
back: {
isShow: true, //左上角是否显示返回按钮,必填
path: '/pages/index/index' //返回到的页面路径,非必填,不填默认返回上一层
},
home: {
isShow: true, //左上角是否显示主页按钮,必填
path: '' //返回到的页面路径,必填
}
}
声明:
图标来源于 [阿里巴巴图标库](https://www.iconfont.cn/)
Related Skills
node-connect
346.8kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
107.6kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
346.8kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
346.8kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
