style: create images ux

This commit is contained in:
jialin
2024-11-22 10:00:34 +08:00
parent dde937f460
commit 67febd3e25
14 changed files with 150 additions and 73 deletions
+6 -6
View File
@@ -28,16 +28,16 @@ const options: any = {
}
},
axisLine: {
show: false,
show: true,
lineStyle: {
color: '#F2F2F2'
color: '#DCDCDC'
}
},
axisTick: {
show: false
},
axisLabel: {
show: false
show: true
},
boundaryGap: [0.05, 0.05]
},
@@ -54,16 +54,16 @@ const options: any = {
}
},
axisLine: {
show: false,
show: true,
lineStyle: {
color: '#F2F2F2'
color: '#DCDCDC'
}
},
axisTick: {
show: false
},
axisLabel: {
show: false
show: true
}
},
+13 -6
View File
@@ -1,3 +1,4 @@
import { isHTMLDocumentString } from '@/utils';
import { EyeOutlined } from '@ant-design/icons';
import { Checkbox, Image, Typography } from 'antd';
import { unescape } from 'lodash';
@@ -198,12 +199,18 @@ const MarkdownViewer: React.FC<MarkdownViewerProps> = ({
}, [content, generateImgSrc]);
return (
<div
style={{ height }}
className="markdown-viewer custom-scrollbar-horizontal"
>
{renderTokens(tokens)}
</div>
<>
{isHTMLDocumentString(content) ? (
<div dangerouslySetInnerHTML={{ __html: content }} style={{ height }} />
) : (
<div
style={{ height }}
className="markdown-viewer custom-scrollbar-horizontal"
>
{renderTokens(tokens)}
</div>
)}
</>
);
};