zbtang/React-Native-ViewPager

PagerTabIndicator 选中时,如何添加下划线

troy-sxj opened this issue · 0 comments

_renderTabIndicator() {
        let tabs = [{
            text: '附近',
        }, {
            text: '最热',
        }, {
            text: '最新',
        }];
        return <PagerTabIndicator
            style={styles.indicatorContainer}
            tabs={tabs}
            selectedIconStyle={styles.selectedIconStyle}
            textStyle={styles.tabTxt}
            selectedTextStyle={styles.selectedTabTxt}
            itemStyle={styles.tabItem}
            selectedItemStyle={styles.selectedTabItem}/>;

const styles = StyleSheet.create({
    indicatorContainer: {
        backgroundColor: 0xFFFFFFFF,
    },
    tabTxt: {
        color: '#2b3c4d',
        marginTop: 0,
        fontSize: 14,
    },
    selectedTabTxt: {
        color: '#ff7e00',
        marginTop: 0,
        fontSize: 14,
    },
    tabItem: {
        justifyContent: 'space-between',
        paddingBottom: 6,
        paddingTop: 6,
    },
    selectedTabItem: {
        justifyContent: 'space-between',
        paddingBottom: 6,
        paddingTop: 6,
    },
});

如何给PagerTabIndicator选中态,添加下划线,api里面没有找到相关方法