import React, { Component } from 'react'; import { Redirect } from 'react-router'; import { BrowserRouter as Router, Route, Link, Switch } from "react-router-dom"; import PropTypes from 'prop-types'; import classNames from 'classnames' const $ = window.$; const _origin = window.location.origin; class CommentItemKEEditor extends Component { componentDidUpdate(prevProps) { const { item, currentReplyComment } = this.props; if ( prevProps.showReplyEditorFlag != this.props.showReplyEditorFlag && currentReplyComment && currentReplyComment.id == item.id ) { this.showOrHideEditor(currentReplyComment) } } // 如果未初始化,会先初始化 showOrHideEditor = (comment) => { const { user } = this.props; console.log('initReply ', comment) const $ = window.$; var id = comment.id var reply_message_el = `#reply_message_${id}` var reply_iconup_el = `#reply_iconup_${id}` if($(reply_message_el).html() == "") { $(".reply_to_message").html(""); $(reply_message_el).html(`