Skip to content

Commit ea379d8

Browse files
committed
feat: 为TabBar添加默认样式
1 parent f63464b commit ea379d8

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/components/TabBar/TabBar.tsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ const TabBar = forwardRef<TabBarRef, TabBarProps>((props, ref) => {
148148
});
149149

150150
return (
151-
<View style={[{ height: 55 }, style]} onLayout={handleLayout}>
151+
<View style={[styles.tabBarDefaultStyle, style]} onLayout={handleLayout}>
152152
<ScrollView
153153
ref={scrollRef}
154154
horizontal
@@ -203,6 +203,11 @@ const TabBar = forwardRef<TabBarRef, TabBarProps>((props, ref) => {
203203
TabBar.displayName = 'TabBar';
204204

205205
const styles = StyleSheet.create({
206+
tabBarDefaultStyle: {
207+
height: 55,
208+
borderBottomColor: '#eee',
209+
borderBottomWidth: 1,
210+
},
206211
sliderContainer: {
207212
position: 'absolute',
208213
left: 0,

0 commit comments

Comments
 (0)