# easi-courseframe

> 课件选择弹窗

Latest version **1.0.17** (published 2018-09-08) · ISC license · 0 weekly downloads

## Install

```sh
npm install easi-courseframe
pnpm add easi-courseframe
yarn add easi-courseframe
bun add easi-courseframe
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.17 |
| Published | 2018-09-08 |
| First published | 2018-09-05 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 3 |
| Unpacked size | 297.3 KB |
| Known vulnerabilities | 0 (+11 in 2 direct dependencies) |
| Install scripts | no |
| Author | mickey |
| Maintainers | mickey314625122 |

## Links

- npm: https://www.npmjs.com/package/easi-courseframe
- Repository: git@gitlab.gz.cvte.cn:hemeiqi/easi-courseframe
- npm.io page: https://npm.io/package/easi-courseframe

## Dependencies (3)

- [react](https://npm.io/package/react.md) 16.0.0
- [lodash](https://npm.io/package/lodash.md) 4.17.4
- [react-dom](https://npm.io/package/react-dom.md) 16.0.0

## Recent versions

- 1.0.17 (latest) — 2018-09-08
- 1.0.16 — 2018-09-08
- 1.0.15 — 2018-09-08
- 1.0.14 — 2018-09-08
- 1.0.13 — 2018-09-05
- 1.0.12 — 2018-09-05
- 1.0.11 — 2018-09-05
- 1.0.10 — 2018-09-05
- 1.0.9 — 2018-09-05
- 1.0.8 — 2018-09-05
- 1.0.7 — 2018-09-05
- 1.0.6 — 2018-09-05
- 1.0.5 — 2018-09-05
- 1.0.4 — 2018-09-05
- 1.0.3 — 2018-09-05
- … 3 more at https://npm.io/package/easi-courseframe/versions

## README

1. 安装
  
```
npm install easi-courseframe --save
```

2. 使用

```
import CourseFrame from 'easi-courseframe';

const courseFrameParams = {
  maxCourseNum: 10, 
  dialogTitle: '选择要分享的课件',
  frameId: 'cTree-dialog',
  targetCourseList: {},
  closeFun: () => {
    this.toggleCTreeNew(false);
  },
  getTargetCourseList: (data) => {
    console.log(data)
  },
  fetchCourseList: (params, sucFun, failFun) => {
  },
  fetchSearchCourse: (params, sucFun, failFun) => {
  },
}

```

1. 参数说明

参数 | 描述 | 类型 | 是否必须
--- | --- | --- | ---
maxCourseNum | 最大选择课件数量 | int | true
dialogTitle | 弹窗名称 | string | false
frameId | 弹窗id | string | false
targetCourseList | 默认已选中列表 | obj | false
closeFun | 弹窗关闭函数 | fun | true
getTargetCourseList | 获取已经选中列表 | fun | true
fetchCourseList | 获取一层所有课件列表 | fun | true
fetchSearchCourse | 搜索课件 | fun | true


4. getTargetCourseList(data) 函数说明

    1. 传入函数参数
   
    ```
    // data 为 obj 类型 key 为课件id value 为课件详情
    {
      '6a249e8f-d054-40e7-9573-c334bb691223': courseItem
    }

    ```

5. fetchCourseList(params, sucFun, failFun) 函数说明
   
    1. 传入函数参数说明
    
    ```
    params = {
      parentId: [string]
    }
    sunFun = function
    failFun = function
    ```

    2. sucFun(data) 传入参数说明

    ```
    data = [courseItem1, courseItem2, ...]
    ```

   

6. fetchSearchCourse(params, sucFun, failFun) 函数说明
   
    1. 传入函数参数说明

    ```
    params = {
      searchNameKey: [string]
    }
    sunFun = function
    failFun = function
    ```

    2. sucFun(data) 参数说明
   
    ```
    data = [courseItem1, courseItem2, ...]
    ```

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