From 81950a771b06326cbd344783f56f64b7a8d22fe7 Mon Sep 17 00:00:00 2001 From: hjm <63528605@qq.com> Date: Mon, 5 Aug 2019 16:02:40 +0800 Subject: [PATCH] flex start --- public/react/src/modules/forums/MemoDetail.js | 29 ++++++++++++------- public/react/src/modules/forums/MemoList.js | 9 +++++- public/react/src/modules/forums/PostItem.js | 18 ++++++++---- 3 files changed, 39 insertions(+), 17 deletions(-) diff --git a/public/react/src/modules/forums/MemoDetail.js b/public/react/src/modules/forums/MemoDetail.js index f2d50f9bb..8441a8ac9 100644 --- a/public/react/src/modules/forums/MemoDetail.js +++ b/public/react/src/modules/forums/MemoDetail.js @@ -14,7 +14,7 @@ import moment from 'moment' import Comments from '../comment/Comments' import update from 'immutability-helper' -import Tooltip from 'material-ui/Tooltip'; +// import Tooltip from 'material-ui/Tooltip'; import RewardDialog from '../common/RewardDialog'; import {ImageLayerOfCommentHOC} from '../page/layers/ImageLayerOfCommentHOC' @@ -23,6 +23,7 @@ import MemoDetailKEEditor from './MemoDetailKEEditor' import MemoDetailMDEditor from './MemoDetailMDEditor' import { bytesToSize } from 'educoder' +import { Tooltip } from 'antd' const $ = window.$ function urlStringify(params) { let noParams = true; @@ -691,15 +692,23 @@ class MemoDetail extends Component {
- {memo.subject} - { memo.sticky && 置顶} - { !!memo.reward && - - {memo.reward} - } - -
+ {/* overflowHidden1 */} + {memo.subject + memo.subject} + { memo.sticky && 置顶} + { !!memo.reward && + + + + {memo.reward} + + + } + +
{ _current_user && (_current_user.admin === true || _current_user.user_id === author_info.user_id) &&
diff --git a/public/react/src/modules/forums/MemoList.js b/public/react/src/modules/forums/MemoList.js index 26cad1448..96af68767 100644 --- a/public/react/src/modules/forums/MemoList.js +++ b/public/react/src/modules/forums/MemoList.js @@ -17,16 +17,22 @@ import PostItem from './PostItem' import ForumsNavTab from './ForumsNavTab' -import { queryString } from 'educoder' +import { queryString, ThemeContext } from 'educoder' class MemoList extends Component { render() { const { match, history, currentPage, memo_count ,memo_list, renderMemoList, onPaginationChange } = this.props + let theme = this.context; return (
+
{!memo_list || memo_list.length === 0 ?
@@ -49,5 +55,6 @@ class MemoList extends Component { ); } } +MemoList.contextType = ThemeContext; export default ( MemoList ); diff --git a/public/react/src/modules/forums/PostItem.js b/public/react/src/modules/forums/PostItem.js index 02d9fa273..43b63c3fa 100644 --- a/public/react/src/modules/forums/PostItem.js +++ b/public/react/src/modules/forums/PostItem.js @@ -7,10 +7,12 @@ import PropTypes from 'prop-types'; import classNames from 'classnames'; -import { getImageUrl, toPath } from 'educoder'; +import { getImageUrl, toPath, ThemeContext } from 'educoder'; import moment from 'moment'; +import { Tooltip } from 'antd' + class PostItem extends Component { _toTenThousand(num) { @@ -31,17 +33,19 @@ class PostItem extends Component {

{/* target="_blank" */} - + 46 ? memo.subject : ''} + className="clearfix task-hide item_name fl" style={{maxWidth: '600px'}} > {memo.subject} { memo.sticky && 置顶 } { memo.reward && - - {memo.reward} - + + + {memo.reward} + + }

@@ -101,4 +105,6 @@ class PostItem extends Component { ); } } +PostItem.contextType = ThemeContext; + export default PostItem