更新记录
1.0.0(2025-08-26)
下载此版本
1.0.0
平台兼容性
uni-app(4.66)
Vue2 |
Vue3 |
Chrome |
Safari |
app-vue |
app-nvue |
Android |
iOS |
鸿蒙 |
√ |
- |
- |
- |
√ |
- |
13.0 |
- |
- |
微信小程序 |
支付宝小程序 |
抖音小程序 |
百度小程序 |
快手小程序 |
京东小程序 |
鸿蒙元服务 |
QQ小程序 |
飞书小程序 |
快应用-华为 |
快应用-联盟 |
- |
- |
- |
- |
- |
- |
- |
- |
- |
- |
- |
uni-app x(4.66)
Chrome |
Safari |
Android |
iOS |
鸿蒙 |
微信小程序 |
- |
- |
- |
- |
- |
- |
其他
使用说明
介绍
由业务需求随手上传,很简单复制案例用就行了,前提先把自带的导航栏设置为自定义
"navigationStyle": "custom"
使用案例
<CustomNavbar
title="标题"
:workspaces="workspaces"
:currentWorkspaceId="currentWorkspaceId"
@back="onBack"
@workspace-select="onWorkspaceSelect"
/>
import CustomNavbar from '@/components/xiaohong-Navbar/CustomNavbar.vue';
components: {
CustomNavbar
},
workspaces: [], // 工作间列表数据
currentWorkspaceId: null, // 当前选中的工作间ID
// 处理返回事件
onBack() {
uni.navigateBack({
delta: 1
});
},
// 选择事件
onWorkspaceSelect(item) {
console.log('选中:', item);
this.currentWorkspaceId = item.workstationId;
},