From aacbb90166fc106adf6b5cb2d88427627575a85a Mon Sep 17 00:00:00 2001 From: hjm <63528605@qq.com> Date: Thu, 19 Sep 2019 10:52:03 +0800 Subject: [PATCH] ImageLayer2 --- public/react/src/common/educoder.js | 2 +- .../src/common/hooks/{ImageLayerHook.js => ImageLayer2.js} | 4 ++-- .../src/modules/courses/busyWork/CommonWorkAppraise.js | 3 ++- public/react/src/modules/message/js/Leftdialogue.js | 6 +++--- public/react/src/modules/message/js/Rightdialogue.js | 6 +++--- .../src/modules/user/modal/RealNameCertificationModal.js | 6 +++--- 6 files changed, 14 insertions(+), 13 deletions(-) rename public/react/src/common/hooks/{ImageLayerHook.js => ImageLayer2.js} (96%) diff --git a/public/react/src/common/educoder.js b/public/react/src/common/educoder.js index fcd0ba7e4..ec4659de7 100644 --- a/public/react/src/common/educoder.js +++ b/public/react/src/common/educoder.js @@ -63,7 +63,7 @@ export { default as Clappr } from './components/media/Clappr' export { default as AliyunUploader } from './components/media/AliyunUploader' -export { default as ImageLayerHook } from './hooks/ImageLayerHook' +export { default as ImageLayer2 } from './hooks/ImageLayer2' // 外部 export { default as CBreadcrumb } from '../modules/courses/common/CBreadcrumb' diff --git a/public/react/src/common/hooks/ImageLayerHook.js b/public/react/src/common/hooks/ImageLayer2.js similarity index 96% rename from public/react/src/common/hooks/ImageLayerHook.js rename to public/react/src/common/hooks/ImageLayer2.js index f41cfb0d2..2b1979c74 100644 --- a/public/react/src/common/hooks/ImageLayerHook.js +++ b/public/react/src/common/hooks/ImageLayer2.js @@ -2,7 +2,7 @@ import React, { useState, useEffect, memo } from 'react'; import ImageLayer from '../../modules/page/layers/ImageLayer'; import { isImageExtension } from 'educoder'; const $ = window.$; -function ImageLayerHook(props) { +function ImageLayer2(props) { const [showImage, setShowImage] = useState(false) const [imageSrc, setImageSrc] = useState('') @@ -45,4 +45,4 @@ function ImageLayerHook(props) { ) } -export default memo(ImageLayerHook) \ No newline at end of file +export default memo(ImageLayer2) \ No newline at end of file diff --git a/public/react/src/modules/courses/busyWork/CommonWorkAppraise.js b/public/react/src/modules/courses/busyWork/CommonWorkAppraise.js index 04ccb3ea1..dc82de540 100644 --- a/public/react/src/modules/courses/busyWork/CommonWorkAppraise.js +++ b/public/react/src/modules/courses/busyWork/CommonWorkAppraise.js @@ -2,7 +2,7 @@ import React,{Component} from "React"; import { Form, Select, Input, Button,Checkbox,Upload,Icon,message,Modal, Table, Divider, Tag,DatePicker,Radio,Tooltip} from "antd"; import {Link} from 'react-router-dom'; import locale from 'antd/lib/date-picker/locale/zh_CN'; -import { WordsBtn, MarkdownToHtml, markdownToHTML } from 'educoder'; +import { WordsBtn, MarkdownToHtml, markdownToHTML, ImageLayer2 } from 'educoder'; import axios from 'axios'; import Modals from '../../modals/Modals'; import CoursesListType from '../coursesPublic/CoursesListType'; @@ -197,6 +197,7 @@ class CommonWorkAppraise extends Component{ border-bottom: none !important; } `} +
{(description || (attachments && attachments.length != 0)) &&
diff --git a/public/react/src/modules/message/js/Leftdialogue.js b/public/react/src/modules/message/js/Leftdialogue.js index c809bc9c9..eb9f18189 100644 --- a/public/react/src/modules/message/js/Leftdialogue.js +++ b/public/react/src/modules/message/js/Leftdialogue.js @@ -5,7 +5,7 @@ import { } from "antd"; import axios from 'axios'; import moment from 'moment'; -import {getImageUrl,markdownToHTML,ImageLayerHook} from 'educoder'; +import {getImageUrl,markdownToHTML,ImageLayer2} from 'educoder'; import "../css/messagemy.css" import WriteaprivateletterModal from '../messagemodal/WriteaprivateletterModal'; //私信页面 @@ -51,8 +51,8 @@ class Leftdialogue extends Component{
- - + +
this.mydelete(this.props.objeysl.sender.id,this.props.objeysl.id)} >删除 diff --git a/public/react/src/modules/message/js/Rightdialogue.js b/public/react/src/modules/message/js/Rightdialogue.js index a414f5d52..cc4511fad 100644 --- a/public/react/src/modules/message/js/Rightdialogue.js +++ b/public/react/src/modules/message/js/Rightdialogue.js @@ -5,7 +5,7 @@ import { } from "antd"; import axios from 'axios'; import moment from 'moment'; -import {getImageUrl,markdownToHTML,ImageLayerHook} from 'educoder'; +import {getImageUrl,markdownToHTML,ImageLayer2} from 'educoder'; import "../css/messagemy.css" import WriteaprivateletterModal from '../messagemodal/WriteaprivateletterModal'; //私信页面 @@ -51,8 +51,8 @@ class Rightdialogue extends Component{
- - + +
this.mydelete(this.props.objeysl.sender.id,this.props.objeysl.id)} diff --git a/public/react/src/modules/user/modal/RealNameCertificationModal.js b/public/react/src/modules/user/modal/RealNameCertificationModal.js index 412cb58c7..9af082fea 100644 --- a/public/react/src/modules/user/modal/RealNameCertificationModal.js +++ b/public/react/src/modules/user/modal/RealNameCertificationModal.js @@ -2,7 +2,7 @@ import React, { Component } from "react"; import { message, Icon, Input, Form, Upload} from "antd"; import axios from 'axios' import ModalWrapper from "../../courses/common/ModalWrapper" -import { City, getUploadActionUrl, getImageUrl, ImageLayerHook, getUploadActionUrlOfAuth } from 'educoder' +import { City, getUploadActionUrl, getImageUrl, ImageLayer2, getUploadActionUrlOfAuth } from 'educoder' import '../account/common.css' import authImg from '../../../images/account/auth.png' @@ -308,8 +308,8 @@ class RealNameCertificationModal extends Component{