feat(utils): 添加 tabBarList 导出以获取 tabbar 列表

添加 tabBarList 导出项,方便其他模块直接获取 tabbar 配置列表
This commit is contained in:
feige996 2025-06-03 12:39:32 +08:00
parent f4fa5127d7
commit a5121bfef6
2 changed files with 3 additions and 1 deletions

View File

@ -17,7 +17,7 @@ export default defineUniPages({
'z-paging/components/z-paging$1/z-paging$1.vue',
},
},
// 如果不需要tabBar可以注释掉这个配置,或者直接删除
// 如果不需要tabBar请使用 spa 模板。pnpm create xxx -t spa
tabBar: {
color: '#999999',
selectedColor: '#018d71',

View File

@ -11,6 +11,8 @@ export const getLastPage = () => {
return pages[pages.length - 1]
}
export const tabBarList = tabBar?.list || []
/** 判断当前页面是否是 tabbar 页 */
export const getIsTabbar = () => {
try {