# italent-tabs

> #### 接入方法 ```javascript import React, { Component } from 'react'; import styled from 'styled-components'; import Tabs from '../../src/index' import channels from './mock' const TabsWrapper = styled.div`` export default class Demo extends Component {

Latest version **0.0.7** (published 2018-11-26) · ISC license · 0 weekly downloads

## Install

```sh
npm install italent-tabs
pnpm add italent-tabs
yarn add italent-tabs
bun add italent-tabs
```

## Health

**Score 5/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: insecure dependencies; abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.7 |
| Published | 2018-11-26 |
| First published | 2018-11-19 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 355.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | beisencorp |

## Links

- npm: https://www.npmjs.com/package/italent-tabs
- Repository: git@gitlab.beisencorp.com:italent/italent-tabs
- npm.io page: https://npm.io/package/italent-tabs

## Dependencies (2)

- [styled-components](https://npm.io/package/styled-components.md) ^3.4.10
- [react-click-outside](https://npm.io/package/react-click-outside.md) github:tj/react-click-outside

## Recent versions

- 0.0.7 (latest) — 2018-11-26
- 0.0.6 — 2018-11-25
- 0.0.5 — 2018-11-22
- 0.0.4 — 2018-11-21
- 0.0.3 — 2018-11-20
- 0.0.2 — 2018-11-20
- 0.0.1 — 2018-11-19

## README

### italent 动态业务组件

#### 接入方法
```javascript
import React, { Component } from 'react';
import styled from 'styled-components';
import Tabs from '../../src/index'
import channels from './mock'
const TabsWrapper = styled.div``
export default class Demo extends Component {

    fetchData = (channelId) => {
      //抛出频道id
        console.log(channelId)
    }
    render() {
        return <TabsWrapper>
            <Tabs channels={channels.channels}
                fetchFeedData={this.fetchData} />
        </TabsWrapper>
    }
}
```
* 数据格式
```javascript

    "channels": [
        {
            "id": 1,
            "name": "与我相关",
            "code": "",
            "type": 0,
            "subChannels": [
                {
                    "id": 2,
                    "name": "全部",
                    "code": null,
                    "type": 0,
                    "subChannels": null
                }
            ]
        },
        {
            "id": 50,
            "name": "",
            "code": "",
            "type": 1,
            "subChannels": [
                {
                    "id": 101,
                    "name": "工作计划",
                    "code": "",
                    "type": 0,
                    "subChannels": [
                        {
                            "id": 102,
                            "name": "全部",
                            "code": null,
                            "type": 0,
                            "subChannels": null
                        },
                        {
                            "id": 106,
                            "name": "分享",
                            "code": null,
                            "type": 0,
                            "subChannels": null
                        },
                        {
                            "id": 107,
                            "name": "签到",
                            "code": null,
                            "type": 0,
                            "subChannels": null
                        }
                    ]
                },
                {
                    "id": 151,
                    "name": "招聘",
                    "code": "",
                    "type": 0,
                    "subChannels": [
                        {
                            "id": 152,
                            "name": "全部",
                            "code": null,
                            "type": 0,
                            "subChannels": null
                        },
                        {
                            "id": 156,
                            "name": "筛选简历",
                            "code": null,
                            "type": 0,
                            "subChannels": null
                        },
                        {
                            "id": 157,
                            "name": "申请",
                            "code": null,
                            "type": 0,
                            "subChannels": null
                        }
                    ]
                }
                
            ]
        }
    ]

// 需要传入一个channel格式的数组

//一级标签 type = 0为普通文本格式  type=1为下列列表(主要针对动态菜单定制)

//支持通过subChannels传入子筛选条件
```

---
_Source: https://npm.io/package/italent-tabs · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
