forked from Gitlink/forgeplus-react
renderHtml
This commit is contained in:
parent
2f418c6cd7
commit
8120a2d4e2
|
@ -289,7 +289,7 @@ class CoderRootDirectory extends Component {
|
|||
<div className="commonBox-info">
|
||||
{readMeContent[0].content ? (
|
||||
<RenderHtml
|
||||
className="break_word_comments"
|
||||
className="break_word_comments imageLayerParent"
|
||||
value={readMeContent[0].content}
|
||||
/>
|
||||
) : (
|
||||
|
|
|
@ -246,7 +246,7 @@ class CoderRootFileDetail extends Component {
|
|||
) : (
|
||||
md && readOnly ?
|
||||
<div className="files-md">
|
||||
<RenderHtml className="file-md" value={description} />
|
||||
<RenderHtml className="file-md imageLayerParent" value={description} />
|
||||
</div>
|
||||
:
|
||||
<Meditor
|
||||
|
|
|
@ -2,7 +2,8 @@ import React, { Component } from 'react';
|
|||
import { Tooltip } from 'antd';
|
||||
import { getImageUrl } from 'educoder';
|
||||
import { Link } from 'react-router-dom';
|
||||
import '../css/index.scss'
|
||||
import '../css/index.scss';
|
||||
import Nodata from '../Nodata';
|
||||
import './list.css';
|
||||
import img_parise from '../Images/parise.png';
|
||||
|
||||
|
@ -62,7 +63,7 @@ class IndexItem extends Component {
|
|||
</div>
|
||||
</div>
|
||||
)
|
||||
}) : ""
|
||||
}) : <Nodata _html="暂无数据~"></Nodata>
|
||||
)
|
||||
return (
|
||||
<div className="project-list minH-670">
|
||||
|
|
|
@ -195,7 +195,7 @@ class MessageCount extends Component {
|
|||
};
|
||||
|
||||
commentCtx = (v) => {
|
||||
return <RenderHtml className="break_word_comments" value={v} />;
|
||||
return <RenderHtml className="break_word_comments imageLayerParent" value={v} />;
|
||||
};
|
||||
|
||||
render() {
|
||||
|
|
|
@ -282,11 +282,9 @@ class MergeForm extends Component {
|
|||
<Button
|
||||
type="default"
|
||||
className="ml30"
|
||||
href={
|
||||
merge_type === "new"
|
||||
? `/projects/${owner}/${projectsId}/pulls`
|
||||
: `/projects/${owner}/${projectsId}/pulls/${mergeId}/detail`
|
||||
}
|
||||
onClick={()=>{
|
||||
this.props.history.push(merge_type === "new" ? `/projects/${owner}/${projectsId}/pulls` : `/projects/${owner}/${projectsId}/pulls/${mergeId}/detail`)
|
||||
}}
|
||||
>
|
||||
<span className="plr10">取消</span>
|
||||
</Button>
|
||||
|
|
|
@ -182,7 +182,7 @@ class Detail extends Component {
|
|||
};
|
||||
|
||||
commentCtx = (v) => {
|
||||
return <RenderHtml className="break_word_comments markdownsContent" value={v} />;
|
||||
return <RenderHtml className="break_word_comments imageLayerParent" value={v} />;
|
||||
};
|
||||
|
||||
render() {
|
||||
|
|
|
@ -86,7 +86,7 @@ class children_comments extends Component {
|
|||
};
|
||||
|
||||
commentCtx = (v) => {
|
||||
return <RenderHtml className="break_word_comments" value={v} />;
|
||||
return <RenderHtml className="break_word_comments imageLayerParent" value={v} />;
|
||||
};
|
||||
|
||||
Paginations =()=> {
|
||||
|
|
|
@ -51,7 +51,7 @@ class children_journals extends Component {
|
|||
};
|
||||
|
||||
commentCtx = (v) => {
|
||||
return <RenderHtml className="break_word_comments" value={v} />;
|
||||
return <RenderHtml className="break_word_comments imageLayerParent" value={v} />;
|
||||
};
|
||||
|
||||
Paginations =()=> {
|
||||
|
|
|
@ -263,7 +263,7 @@ class comments extends Component {
|
|||
}
|
||||
|
||||
commentCtx = (v) => {
|
||||
return <RenderHtml className="break_word_comments" value={v} />;
|
||||
return <RenderHtml className="break_word_comments imageLayerParent" value={v} />;
|
||||
};
|
||||
Paginations = ()=>{
|
||||
const { page, limit, search_count } = this.state;
|
||||
|
|
|
@ -16,6 +16,7 @@ export function ImageLayerOfCommentHOC(options = {}) {
|
|||
}
|
||||
|
||||
onDelegateClick = (event) => {
|
||||
console.log("imgclick",event);
|
||||
const imageSrc = event.target.src || event.target.getAttribute('src') || event.target.getAttribute('href')
|
||||
// 判断imageSrc是否是图片
|
||||
const fileName = event.target.innerHTML.trim()
|
||||
|
@ -37,8 +38,8 @@ export function ImageLayerOfCommentHOC(options = {}) {
|
|||
|
||||
componentDidMount() {
|
||||
this.props.wrappedComponentRef && this.props.wrappedComponentRef(this.refs['wrappedComponentRef'])
|
||||
|
||||
setTimeout(() => {
|
||||
|
||||
setTimeout(() => {
|
||||
$(options.parentSelector || ".commentsDelegateParent")
|
||||
.delegate(options.imgSelector || ".J_Comment_Reply .comment_content img, .J_Comment_Reply .childrenCommentsView img", "click", this.onDelegateClick);
|
||||
}, 1200)
|
||||
|
|
Loading…
Reference in New Issue