修改富文本样式

This commit is contained in:
何童崇 2021-06-28 13:56:23 +08:00
parent 8594168d33
commit b8342288dd
2 changed files with 33 additions and 4 deletions

View File

@ -142,6 +142,36 @@
text-align: left;
}
// 富文本样式
.w-e-text table td, .w-e-text table th{
height: 30px;
}
.editor-w-text table td, .editor-w-text table th{
border-bottom: 1px solid #ccc;
border-right: 1px solid #ccc;
padding: 3px 5px;
height: 30px;
min-height: 30px;
}
.editor-w-text table th {
border-bottom: 2px solid #ccc;
text-align: center;
background-color: #f1f1f1;
}
.editor-w-text table {
border-top: 1px solid #ccc;
border-left: 1px solid #ccc;
}
.editor-w-text blockquote {
display: block;
border-left: 8px solid #d0e5f2;
padding: 5px 10px;
margin: 10px 0;
line-height: 1.4;
font-size: 100%;
background-color: #f1f1f1;
}
@media screen and (max-width: 1200px){
.centerbox {

View File

@ -1,7 +1,6 @@
import React, { useEffect, useState } from 'react';
import { Icon, } from 'antd';
import { Link } from "react-router-dom";
import { httpUrl } from '../../fetch';
import { getNoticeDetail } from '../api';
import { noticeType } from '../static';
import './index.scss';
@ -51,7 +50,7 @@ export default ({ match, history, showNotification }) => {
<div className="content-text">
<div className="notice-content-title"><Icon type="caret-right" />公告主要内容</div>
<div dangerouslySetInnerHTML={{ __html: noticeData.text }}>
<div className="editor-w-text" dangerouslySetInnerHTML={{ __html: noticeData.text }}>
</div>
</div>
@ -60,10 +59,10 @@ export default ({ match, history, showNotification }) => {
<React.Fragment>
<div className="notice-content-title"><Icon type="caret-right" />公告附件</div>
<p className="notice-content-download" >
<span onClick={() => { window.open(httpUrl + noticeData.fileDownloadPath) }}>
<span onClick={() => { window.open( noticeData.fileDownloadPath) }}>
<i className="iconfont icon-fujian color-green font-14 mr3"></i>{noticeData.fileName}
</span>
<span className="link" onClick={() => { window.open(httpUrl + noticeData.fileDownloadPath) }}>下载</span>
<span className="link" onClick={() => { window.open( noticeData.fileDownloadPath) }}>下载</span>
</p>
</React.Fragment>
}