From 713e2a32294dd062d43376200e747a299c2182a5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com> Date: Thu, 29 Aug 2019 11:45:02 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/modules/user/usersInfo/InfosTopics.js | 68 +++++++++++-------- .../src/modules/user/usersInfo/usersInfo.css | 10 +-- 2 files changed, 46 insertions(+), 32 deletions(-) diff --git a/public/react/src/modules/user/usersInfo/InfosTopics.js b/public/react/src/modules/user/usersInfo/InfosTopics.js index 13bd93ebd..3a5d0c080 100644 --- a/public/react/src/modules/user/usersInfo/InfosTopics.js +++ b/public/react/src/modules/user/usersInfo/InfosTopics.js @@ -1,7 +1,7 @@ import React, { Component } from 'react'; import { SnackbarHOC } from 'educoder'; import {BrowserRouter as Router,Route,Switch,Link} from 'react-router-dom'; -import {Tooltip,Menu,Pagination,Spin, Dropdown} from 'antd'; +import {Tooltip,Menu,Pagination,Spin, Dropdown,Checkbox} from 'antd'; import axios from 'axios'; import {getImageUrl,WordsBtn} from 'educoder'; import moment from 'moment'; @@ -21,7 +21,8 @@ class InfosTopics extends Component{ sort_by:"updated_at", sort_direction:"desc", page:1, - data:undefined + data:undefined, + checkBoxValues:[] } } @@ -112,13 +113,20 @@ class InfosTopics extends Component{ ) } + onCheckBoxChange=(checkedValues)=>{ + debugger + this.setState({ + checkBoxValues:checkedValues + }) + } render(){ let{ category, course_list_id, isSpin, data, - page + page, + sort_direction } = this.state; let categorylist=[ @@ -140,20 +148,14 @@ class InfosTopics extends Component{ const menu = (
); return( @@ -206,8 +208,10 @@ class InfosTopics extends Component{共 {data&&data.count} 个 - 已选择 {data&&data.count} 个 + 已选择 {this.state.checkBoxValues.length} 个
- {types==="publicly"?{item.creator_name}:""} + {types==="publicly"?{item.creator_name}:""} {item.quotes_count} 次引用 {item.solve_count} 次答题 {moment(item.updated_at).fromNow()} @@ -287,6 +299,8 @@ class InfosTopics extends Component{