Files
aiot-uniapp/src/components/fg-tabbar/tabbarList.ts
2025-06-21 13:30:41 +08:00

58 lines
1.4 KiB
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

// 是否使用自定义的tabbar?
export const CUSTOM_TABBAR_ENABLE = false
// CUSTOM_TABBAR_ENABLE 为 true 时,可以不填 iconPath 和 selectedIconPath
// CUSTOM_TABBAR_ENABLE 为 false 时,可以不填 icon 和 iconType
export const tabbarList = [
{
iconPath: 'static/tabbar/home.png',
selectedIconPath: 'static/tabbar/homeHL.png',
pagePath: 'pages/index/index',
text: '首页',
icon: 'home',
iconType: 'wot',
},
{
iconPath: 'static/tabbar/example.png',
selectedIconPath: 'static/tabbar/exampleHL.png',
pagePath: 'pages/about/about',
text: '关于',
icon: 'i-carbon-code',
iconType: 'unocss',
},
// {
// pagePath: 'pages/my/index',
// text: '我的',
// icon: '/static/logo.svg',
// iconType: 'local',
// },
// {
// pagePath: 'pages/mine/index',
// text: '我的',
// icon: 'iconfont icon-my',
// iconType: 'iconfont',
// },
]
// midButton 仅App和H5支持
const midButton = {
iconPath: '/static/logo.svg',
text: '发布',
}
const _tabbar = {
color: '#999999',
selectedColor: '#018d71',
backgroundColor: '#F8F8F8',
borderStyle: 'black',
height: '50px',
fontSize: '10px',
iconWidth: '24px',
spacing: '3px',
list: tabbarList as any,
// midButton 仅App和H5支持h5中测试也没生效
// midButton: midButton,
}
export const tabBar = CUSTOM_TABBAR_ENABLE ? undefined : _tabbar