未验证 提交 96fb036b 编写于 作者: R RotPublic 提交者: GitHub

Fix textview bug

上级 fbb72b74
...@@ -191,7 +191,7 @@ const ImagePreviewer: FunctionComponent<ImagePreviewerProps> = ({ ...@@ -191,7 +191,7 @@ const ImagePreviewer: FunctionComponent<ImagePreviewerProps> = ({
setWidth(ir * rect.height * 0.9); setWidth(ir * rect.height * 0.9);
} else if (ir >= r && img.naturalWidth > rect.width * 0.9) { } else if (ir >= r && img.naturalWidth > rect.width * 0.9) {
setWidth(rect.width * 0.9); setWidth(rect.width * 0.9);
setHeight(ir * rect.width * 0.9); setHeight((rect.width / ir) * 0.9);
} else { } else {
setWidth(img.naturalWidth); setWidth(img.naturalWidth);
setHeight(img.naturalHeight); setHeight(img.naturalHeight);
......
...@@ -104,33 +104,33 @@ const TextWrapper = styled.div` ...@@ -104,33 +104,33 @@ const TextWrapper = styled.div`
${sameBorder(true)} ${sameBorder(true)}
${transitionProps('border-color')} ${transitionProps('border-color')}
`; `;
// display: grid;
// grid-template-columns: fit-content(25%) auto;
// grid-row-gap: ${rem(12)};
// justify-items: stretch;
// align-items: stretch;
// ${transitionProps('border-color')}
const TextGrid = styled.div` const TextGrid = styled.div`
margin-top: ${rem(12)}; margin-top: ${rem(12)};
display: grid; >div {
grid-template-columns: fit-content(25%) auto; ${sameBorder()}
grid-row-gap: ${rem(12)}; border-radius: ${borderRadius};
justify-items: stretch; margin-bottom: ${rem(20)};
align-items: stretch;
${transitionProps('border-color')}
> span { > span {
display:block;
height: ${rem(40)}; height: ${rem(40)};
line-height: 1.857142857; line-height: 1.857142857;
padding: ${rem(7)} 0; padding: ${rem(7)} 0;
} }
.step { .step {
${sameBorder()}
border-right: none;
border-top-left-radius: ${borderRadius};
border-bottom-left-radius: ${borderRadius};
padding-left: ${rem(8)}; padding-left: ${rem(8)};
padding-right: ${rem(14)}; padding-right: ${rem(14)};
> span { > span {
display: block; display: inline-block;
width: 100%; width: atuo;
clear:both
color: var(--text-light-color); color: var(--text-light-color);
background-color: var(--text-chart-tag-background-color); background-color: var(--text-chart-tag-background-color);
padding: 0 ${rem(8)}; padding: 0 ${rem(8)};
...@@ -140,18 +140,20 @@ const TextGrid = styled.div` ...@@ -140,18 +140,20 @@ const TextGrid = styled.div`
} }
.text { .text {
${sameBorder()} padding-left: 1rem;
border-left: none;
border-top-right-radius: ${borderRadius};
border-bottom-right-radius: ${borderRadius};
padding-right: ${rem(20)}; padding-right: ${rem(20)};
${ellipsis()} display: block;
overflow: hidden;
white-space: normal;
word-wrap: normal;
height:auto;
> * { > * {
vertical-align: middle; vertical-align: middle;
} }
} }
`; }
`;
type TextProps = { type TextProps = {
index: number; index: number;
...@@ -171,7 +173,7 @@ const Text: FunctionComponent<TextProps> = ({run, tag, step, wallTime, index}) = ...@@ -171,7 +173,7 @@ const Text: FunctionComponent<TextProps> = ({run, tag, step, wallTime, index}) =
}); });
return ( return (
<> <div>
<span className="step"> <span className="step">
<span> <span>
{t('common:time-mode.step')} {step} {t('common:time-mode.step')} {step}
...@@ -186,7 +188,7 @@ const Text: FunctionComponent<TextProps> = ({run, tag, step, wallTime, index}) = ...@@ -186,7 +188,7 @@ const Text: FunctionComponent<TextProps> = ({run, tag, step, wallTime, index}) =
error ?? text error ?? text
)} )}
</span> </span>
</> </div>
); );
}; };
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册