弹出创建的模态,但是模态中显示图片/说明

时间:2019-08-14 03:29:07

标签: javascript reactjs

创建了一个目录,一旦单击“更多信息”按钮,就会显示一个弹出模式,但是图像或说明会显示在弹出模式中

let { itemInfo } = this.props;
let removeCom;

if (itemInfo.description) {
  removeCom = itemInfo.description
    .replace("?", "")
    .replace('<td width="110" height="">', "")
    .replace("http://extranet.acetools.com/Catalog/", "assets/img/items/")
    .replace((/<INPUT[^>]*>/gmi), "")
    .split('<CENTER><FONT COLOR="RED">', 1);

  console.log(removeCom);
}

return (
  <h6 className="card-header" style={cardHeader}>
    Item # {this.props.itemInfo.item_no} - {this.props.itemInfo.item}
  </h6>
  <div className="card-body" style={cardBody}>
    <div className="row">    
      <div className="col-6" dangerouslySetInnerHTML={{__html: removeCom}} style={text}>
      </div>
      <div className="col-6">
        <img src={this.props.itemInfo.image} alt="" style={productImg}></img>
      </div>
      {/* <div>hello</div> */}
    </div>
  <div className="row">

  <button className="btn btn-outline-primary" onClick={this.props.onClose} style={closeButton}>
    Close
  </button>

0 个答案:

没有答案