提交 d5776a7a authored 作者: 钟是志's avatar 钟是志

签章组件完善

上级 b9e5cd34
......@@ -20,7 +20,8 @@ export default function PictureSignature({
...others
}) {
let imageRef = useRef();
const [fileInfo, setFileInfo] = useState(others?.fileInfo);
// const [fileInfo, setFileInfo] = useState(others?.fileInfo);
const [fileInfo, setFileInfo] = useState(fakeFileInfo);
const [openEdit, setOpenEdit] = useState(false);
const [showModal, setShowModal] = useState(false);
const [otherProps, setOtherProps] = useState({});
......@@ -71,7 +72,12 @@ export default function PictureSignature({
apiRequest('/ImageLibApi/merge', {
background: fileInfo?.path,
content: JSON.stringify({
objs: otherProps.signConfig,
objs: otherProps.signConfig.map((g) => {
if(g.type === 'text'){
g.y = g.y + g.fontSize;
}
return g;
}),
}),
}).then((res) => {
if (res && res.path) {
......
......@@ -13,6 +13,7 @@ const ShowItem = ({ basicUrl, type, x, y, ...otherInfo }) => {
cursor: 'pointer',
width: otherInfo.w,
height: otherInfo.h,
zIndex: otherInfo.index || 1,
}}
/>
);
......@@ -28,6 +29,7 @@ const ShowItem = ({ basicUrl, type, x, y, ...otherInfo }) => {
fontFamily: otherInfo?.fontFamily ? otherInfo.fontFamily : undefined,
fontWeight: otherInfo?.fontStyle ? otherInfo.fontStyle : undefined,
color: otherInfo?.color ? otherInfo.color : undefined,
zIndex: otherInfo.index || 1,
}}
>
{otherInfo.word}
......
......@@ -42,6 +42,7 @@
border: 1px solid red;
p{
margin-bottom: 0;
user-select: none;
}
}
.modalParentDiv{
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论