Tab组件说明文档
参数说明
const props = {
hidden: false,
bsStyle: 'block',
activeKey: '0',
tabItems:[
{
idx: 'tab0',
eventKey: 0,
title: '全部档案',
active: true,
}
],
autoAdaptive:false,
maxTabLength:3,
hiddenTip:false,
sideTip:false,
callBack: (eventKey,event) => console.log(eventKey, event)
}
组件使用方法
1.安装npm组件包
npm install @beisen/tab-component --save-dev
2.引用组件
import Tab from "@beisen/tab-component"
- 传入参数
该参数为上述参数,传入方式使用: data={参数}
state = {
bsStyle: 'block',
activeKey: '0',
tabItems:[
{
idx: 'tab0',
eventKey: 0,
title: '全部档案',
active: true,
children: '000'
},
{
idx: 'tab1',
eventKey: 1,
title: '招聘档案',
active: false,
children: '111'
},
{
idx: 'tab2',
eventKey: 2,
title: '绩效',
active: false,
children: '222'
}
],
maxTabLength:3,
autoAdaptive:false,
hiddenTip:false,
sideTip:false,
callBack: (eventKey,event) => console.log(eventKey, event)
}
使用组件
<Tab {...this.state} />