2.1.1 • Published 5 years ago
italent-task-tab-title v2.1.1
创建任务发布框
为任务中心头部tab下拉。
安装
npm i italent-task-tab-title -S
前提
1 里头还有自己维护的图标,所以需要引入 @beisen/pb-svg/icomoon/style.css;
使用
import React, {Component} from 'react';
import Title from '../../src/index.js'
import '@beisen/pb-svg/icomoon/style.css';
export default class Demo extends Component{
handleTabSelect=(tabId)=>{
console.log(tabId)
}
handleDropSelect=(dropId,tabId)=>{
console.log(dropId,tabId)
}
render(){
const tabTitle=[{
id:0,
color: '#4F73FF',
bgIcon:'font-task-title-tab1',
titleText:'任务',
selected:true,
dropDownItems:[
{
id:0,
title:'我负责的',
selected:true,
},{
id:1,
title:'我派发的',
selected:false
},{
id:2,
title:'我参与的',
selected:false
},{
id:3,
title:'全部任务',
selected:false
},{
id:4,
title:'我完成的',
selected:false
}
]
},{
id:1,
selected:false,
color:'#0CC991',//icon背景图
bgIcon:'font-task-title-tab2',
titleText:'任务追踪',
dropDownItems:[]
}
]
return <Title data={tabTitle} onTabSelect={this.handleTabSelect} onDropSelect={this.handleDropSelect}/>
}
}
参数
data:一堆默认值;
onTabSelect:tab选择的回调;
onDropSelect:下拉选择的回调
有了window.BSGlobal的loginUserInfo之后,以上参数都是可选参数。
2.1.1
5 years ago
2.1.0
5 years ago
2.0.8
5 years ago
2.0.7
5 years ago
2.0.6
6 years ago
2.0.5
6 years ago
2.0.4
6 years ago
2.0.3
6 years ago
2.0.2
6 years ago
2.0.1
6 years ago
2.0.0
6 years ago
1.0.31
6 years ago
1.0.30
6 years ago
1.0.29
6 years ago
1.0.28
6 years ago
1.0.27
6 years ago
1.0.25
6 years ago
1.0.24
6 years ago
1.0.23
6 years ago
1.0.22
6 years ago
1.0.21
6 years ago
1.0.20
6 years ago
1.0.19
6 years ago
1.0.18
6 years ago
1.0.17
6 years ago
1.0.16
6 years ago
1.0.15
6 years ago
1.0.14
6 years ago
1.0.13
6 years ago
1.0.12
6 years ago
1.0.11
6 years ago
0.0.12
6 years ago
0.0.11
6 years ago
0.0.10
6 years ago
0.0.9
6 years ago
0.0.8
6 years ago
0.0.7
6 years ago
0.0.6
6 years ago
0.0.5
6 years ago
0.0.4
6 years ago
0.0.2
6 years ago
0.0.3
6 years ago
0.0.1
6 years ago