feat: 更换了更好看的编辑器 (#45)

Co-authored-by: Ichirinko <1621543655@qq.com>
Reviewed-on: PostGuard/Canon#45
This commit is contained in:
2024-04-21 11:50:23 +08:00
parent d09460edfe
commit 910049f557
5 changed files with 35 additions and 23 deletions

View File

@@ -4,14 +4,28 @@ import {PhotoProvider, PhotoView} from "react-photo-view";
// @ts-expect-error ...
export function OutputField({imgPath}) {
return <>
<div className={"output-field"} style={outputFieldClassCss}>
<PhotoProvider>
<PhotoView key={1} src={imgPath}>
<PhotoView key={1} src={imgPath}>
{imgPath == "pic/uncompiled.png" ?
<img src={imgPath}
style={{ objectFit: 'cover' ,width:"100%",height:"100%" }}
style={{
width: "100%",
height: "auto"
}}
alt=""/> :
<img src={imgPath}
style={{
objectFit: 'cover',
width: "100%",
height: "100%"
}}
alt=""/>
</PhotoView>
}
</PhotoView>
</PhotoProvider>
</div>
</>