italent-task-tab-title

2.1.1 • Public • Published

创建任务发布框

为任务中心头部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之后,以上参数都是可选参数。

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
2.1.10latest

Version History

VersionDownloads (Last 7 Days)Published
2.1.10
2.1.00
2.0.80
2.0.70
2.0.60
2.0.50
2.0.40
2.0.31
2.0.20
2.0.10
2.0.00
1.0.311
1.0.300
1.0.290
1.0.280
1.0.270
1.0.250
1.0.240
1.0.230
1.0.220
1.0.211
1.0.200
1.0.190
1.0.180
1.0.171
1.0.160
1.0.150
1.0.140
1.0.130
1.0.120
1.0.110
0.0.120
0.0.110
0.0.100
0.0.90
0.0.80
0.0.70
0.0.60
0.0.51
0.0.40
0.0.20
0.0.30
0.0.10

Package Sidebar

Install

npm i italent-task-tab-title

Weekly Downloads

5

Version

2.1.1

License

ISC

Unpacked Size

32.5 kB

Total Files

16

Last publish

Collaborators

  • beisencorp