From db833e83a57935f205a8fcea5bdf9104dde3586c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com> Date: Fri, 28 Feb 2020 15:38:15 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4=E8=AF=BE=E5=A0=82=E8=80=81?= =?UTF-8?q?=E5=B8=88=E6=9D=83=E9=99=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../courses/members/CourseGroupChooser.js | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/public/react/src/modules/courses/members/CourseGroupChooser.js b/public/react/src/modules/courses/members/CourseGroupChooser.js index 655754dc4..32868f15d 100644 --- a/public/react/src/modules/courses/members/CourseGroupChooser.js +++ b/public/react/src/modules/courses/members/CourseGroupChooser.js @@ -2,7 +2,7 @@ import React, { useState, useEffect } from 'react' import { trigger } from 'educoder' import { Input, Checkbox } from "antd"; -/** +/** arg_course_groups 选中的id数组 joinCourseGroup 选中时触发 joinCourseGroup(checkedValues, item, index) 传入item:数据对象,index: 数据对象index checkAllValue 是否全选 @@ -33,13 +33,13 @@ function CourseGroupChooser({ course_groups, isAdminOrCreator = true, item, inde that.setState({groupSearchValue: e.target.value}) that.onCheckAllChange(e, item, index) - onCheckAllChange(e, item, index) - that.joinCourseGroup(checkedValues, item, index) - joinCourseGroup(checkedValues, item, index) + that.joinCourseGroup(checkedValues, item, index) - joinCourseGroup(checkedValues, item, index) that.state.checkAllArray[index] - checkAllValue */ console.log('arg_course_groups', arg_course_groups) - + const urlStyle = {"left":"unset", minWidth: '262px'}; if (alwaysShow == true) { @@ -54,17 +54,18 @@ function CourseGroupChooser({ course_groups, isAdminOrCreator = true, item, inde

): '' } - - joinCourseGroup(checkedValues, item, index)} + + joinCourseGroup(checkedValues, item, index)} value={arg_course_groups.length && arg_course_groups[0].id ? arg_course_groups.map(item => item.id): arg_course_groups} disabled={!isAdminOrCreator} className="mainGroup" > {course_groups && course_groups.length > 1 &&
  • {/* 防止被外面group包裹 */} onCheckAllChange(e, item, index)} value={[checkAllValue]}> - {}} + disabled={!isAdminOrCreator} + style={{ marginRight: '6px' }} onClick={() => {}} >全选
  • } @@ -84,7 +85,7 @@ function CourseGroupChooser({ course_groups, isAdminOrCreator = true, item, inde ) }) } - +