ImageLayer2

dev_cs
hjm 5 years ago
parent f0391bb23c
commit aacbb90166

@ -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'

@ -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)
export default memo(ImageLayer2)

@ -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;
}
`}</style>
<ImageLayer2 parentSel=".workAppraise" childSel="a.imageTarget"></ImageLayer2>
<div className={"workAppraise"}>
{(description || (attachments && attachments.length != 0)) && <div className={"stud-class-set edu-back-white padding20-30"}>
<div className={"color-grey-6 mb15 font-16"}>

@ -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{
</a>
<div className="fl pr OtherSide-info">
<span className="trangle"></span>
<ImageLayerHook parentSel={`#Leftdialogue${this.props.keys}`} parentSel={`#Leftdialogue${this.props.keys}`}>
</ImageLayerHook>
<ImageLayer2 parentSel={`#Leftdialogue${this.props.keys}`} parentSel={`#Leftdialogue${this.props.keys}`}>
</ImageLayer2>
<div className="sms break_word markdown-body" id={`Leftdialogue${this.props.keys}`} dangerouslySetInnerHTML={{__html: markdownToHTML(this.props.objeysl.content).replace(/▁/g, "▁▁▁")}}></div>
<div className="edu-txt-right mt5">
<a className="color-grey-c" onClick={()=>this.mydelete(this.props.objeysl.sender.id,this.props.objeysl.id)} >删除</a>

@ -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{
</a>
<div className="fr pr ThisSide-info">
<span className="trangle"></span>
<ImageLayerHook parentSel={`#Rightdialogue${this.props.keys}`} parentSel={`#Rightdialogue${this.props.keys}`}>
</ImageLayerHook>
<ImageLayer2 parentSel={`#Rightdialogue${this.props.keys}`} parentSel={`#Rightdialogue${this.props.keys}`}>
</ImageLayer2>
<div className="sms break_word markdown-body" id={`Rightdialogue${this.props.keys}`} dangerouslySetInnerHTML={{__html: markdownToHTML(this.props.objeysl.content).replace(/▁/g, "▁▁▁")}}></div>
<div className="edu-txt-left mt5">
<a className="color-grey-c" onClick={()=>this.mydelete(this.props.objeysl.sender.id,this.props.objeysl.id)}

@ -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{
<div className="df mt10 color-grey-9" style={{ justifyContent: 'center' }} >
<span className="fl mr20 edu-txt-center" style={{width:"160px"}}>示例图片</span>
<span className="fl edu-txt-center mr20" style={{width:"160px"}}>
<ImageLayerHook parentSel={'#imageLayerBtn'} parentSel={'#imageLayerBtn'}
></ImageLayerHook>
<ImageLayer2 parentSel={'#imageLayerBtn'} parentSel={'#imageLayerBtn'}
></ImageLayer2>
<a href="javascript:void(0)" id="imageLayerBtn" src={imageUrl || imageUrl2} className="color-orange" style={{borderBottom:"1px solid #ff6800"}}>查看大图</a>
</span>
</div>

Loading…
Cancel
Save