diff --git a/src/components/common/tabBar/index.less b/src/components/common/tabBar/index.less index 919efc288..008c0627e 100644 --- a/src/components/common/tabBar/index.less +++ b/src/components/common/tabBar/index.less @@ -37,8 +37,8 @@ .@{component}__item-image { display: block; - width: 52rpx; - height: 52rpx; + width: 22px; + height: 22px; } .@{component}__item-text { diff --git a/src/components/common/tabBar/index.ts b/src/components/common/tabBar/index.ts index 771f2364d..728e1d5ff 100644 --- a/src/components/common/tabBar/index.ts +++ b/src/components/common/tabBar/index.ts @@ -4,11 +4,20 @@ export default OakComponent({ // 背景色 bgColor: '', // 背景图 - bgImg: '', + bgImgUrl: '', // 当前选中索引 selectedIndex: 0, // tab 项 - list: [] as { redDot: boolean; text: string; pagePath: string }[], + list: [] as { + redDot: boolean; + text: string; + pagePath: string; + iconName?: string; + selectedIconName?: string; + iconPath?: string; + selectedIconPath?: string; + iconSize?: string; + }[], color: '#666', selectedColor: '', }, diff --git a/src/components/common/tabBar/index.xml b/src/components/common/tabBar/index.xml index 5e6c68fa4..1d1567cea 100644 --- a/src/components/common/tabBar/index.xml +++ b/src/components/common/tabBar/index.xml @@ -1,10 +1,26 @@ + style="{{bgColor?'background-color:'+bgColor+';':''}} {{bgImg?'background-image: url('+bgImgUrl+');':''}}"> - + + + + + + + + + + + + + + + + +