1.0.16 • Published 4 years ago

@beisen-phoenix/mobile-tabs v1.0.16

Weekly downloads
-
License
ISC
Repository
gitlab
Last release
4 years ago

描述

移动端tabs组件,包括普通tab和button-tab

Tabs

namedescriptiontypedefault
typetab类型string类型,可选值包括 primary、secondaryprimary
showLine是否显示下划线booleantrue
initialIndex默认选中的索引number0
activeIndex通过受控方式实现自定义当前激活的是哪个number
datastabs数据array,{label: string,value:string}[]
onClick回调函数function(label: string, value: string) => void
extraCls自定义class,用来自定义样式string

ButtonTabs

namedescriptiontypedefault
initialIndex默认选中的索引number0
datastabs数据array[]
onClick回调函数function(label: string, value: string) => void
extraCls自定义class,用来自定义样式string

ButtonTabs 的相关说明

该类型的tab长相类似于tag,用户可以自己设置每个tab的默认背景颜色、自已颜色、选中时的背景颜色以及字体颜色,通过datas这个属性可以做到:

const datas = [
        {
            label:'First Tab',
            value: '1',
            color:'red',
            bgColor:'yellow',
            activeColor:'green',
            activeBgColor:'black'
        },
        {
            label:'Second Tab Hello',
            value: '2',
            color:'white',
            bgColor:'green',
            activeColor:'pink',
            activeBgColor:'black'
        },
        {
            label:'Third Tab Hello World',
            value: '3',
            color:'white',
            bgColor:'yellow',
            activeColor:'blue',
            activeBgColor:'pink'
        },
        {
            label:'Fourth Tab Hello World China',
            value: '4'
        },
        {
            label:'Fifth Tab Hello World China Beijing',
            value: '5'
        },
    ]
1.0.16

4 years ago

1.0.15

4 years ago

1.0.14

4 years ago

1.0.13

5 years ago

1.0.12

5 years ago

1.0.11

5 years ago

1.0.10

5 years ago

1.0.9

5 years ago

1.0.8

5 years ago

1.0.7

5 years ago

1.0.6

5 years ago

1.0.5

5 years ago

1.0.4

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago