1.0.17 • Published 7 years ago
easi-courseframe v1.0.17
- 安装 
npm install easi-courseframe --save- 使用
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) => {
  },
}- 参数说明
| 参数 | 描述 | 类型 | 是否必须 | 
|---|---|---|---|
| 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 | 
- getTargetCourseList(data) 函数说明 - 传入函数参数
 - // data 为 obj 类型 key 为课件id value 为课件详情 { '6a249e8f-d054-40e7-9573-c334bb691223': courseItem }
- fetchCourseList(params, sucFun, failFun) 函数说明 - 传入函数参数说明
 - params = { parentId: [string] } sunFun = function failFun = function- sucFun(data) 传入参数说明
 - data = [courseItem1, courseItem2, ...]
- fetchSearchCourse(params, sucFun, failFun) 函数说明 - 传入函数参数说明
 - params = { searchNameKey: [string] } sunFun = function failFun = function- sucFun(data) 参数说明
 - data = [courseItem1, courseItem2, ...]