Commit 2639f974 by zhaochengxiang

模型对比

parent bf1cf3ac
...@@ -5,6 +5,8 @@ import showdown from 'showdown'; ...@@ -5,6 +5,8 @@ import showdown from 'showdown';
import { dispatch, dispatchLatest } from '../../../../model'; import { dispatch, dispatchLatest } from '../../../../model';
import { formatVersionDate } from '../../../../util'; import { formatVersionDate } from '../../../../util';
import './VersionCompare.less';
const { Option } = Select; const { Option } = Select;
const VersionCompare = (props) => { const VersionCompare = (props) => {
...@@ -91,7 +93,11 @@ const VersionCompare = (props) => { ...@@ -91,7 +93,11 @@ const VersionCompare = (props) => {
setLoadingCompare(false); setLoadingCompare(false);
var target = document.getElementById('model-version-compare-container'); var target = document.getElementById('model-version-compare-container');
var converter = new showdown.Converter(); var converter = new showdown.Converter({
});
converter.setFlavor('github');
var html = converter.makeHtml(data||''); var html = converter.makeHtml(data||'');
...@@ -104,7 +110,7 @@ const VersionCompare = (props) => { ...@@ -104,7 +110,7 @@ const VersionCompare = (props) => {
} }
return ( return (
<div> <div className='model-version-compare'>
<Form layout='inline'> <Form layout='inline'>
<Form.Item label='基线版本'> <Form.Item label='基线版本'>
<Select loading={loading} value={basicVersion} style={{ width: 300 }} onChange={onBasicChange} > <Select loading={loading} value={basicVersion} style={{ width: 300 }} onChange={onBasicChange} >
......
.model-version-compare {
table {
background: #fff;
border: solid 1px #ddd;
margin-bottom: 15px;
table-layout: auto;
display: table;
border-collapse: separate;
border-spacing: 2px;
}
table thead {
background: #F5F5F5;
}
table thead tr th, table tfoot tr th, table tfoot tr td, table tbody tr th, table tbody tr td, table tr td {
display: table-cell;
line-height: 1.125rem;
}
table tr th, table tr td {
color: #222;
font-size: 0.875rem;
padding: 0.5625rem 0.625rem;
text-align: left;
}
table thead tr th, table thead tr td {
color: #222;
font-size: 0.875rem;
font-weight: bold;
padding: 0.5rem 0.625rem 0.625rem;
}
table tr.even, table tr.alt, table tr:nth-of-type(even) {
background: #F9F9F9;
}
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment