未验证 提交 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);
......
...@@ -66,7 +66,7 @@ const Title = styled.h4<{color: string; opened?: boolean}>` ...@@ -66,7 +66,7 @@ const Title = styled.h4<{color: string; opened?: boolean}>`
color: var(--text-lighter-color); color: var(--text-lighter-color);
${transitionProps('color')} ${transitionProps('color')}
${ellipsis()} ${ellipsis()}
max-width: 50%; max-width: 50%;
&::before { &::before {
content: ''; content: '';
...@@ -104,54 +104,56 @@ const TextWrapper = styled.div` ...@@ -104,54 +104,56 @@ 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; > span {
${transitionProps('border-color')} display:block;
height: ${rem(40)};
> span { line-height: 1.857142857;
height: ${rem(40)}; padding: ${rem(7)} 0;
line-height: 1.857142857; }
padding: ${rem(7)} 0;
} .step {
padding-left: ${rem(8)};
.step { padding-right: ${rem(14)};
${sameBorder()}
border-right: none; > span {
border-top-left-radius: ${borderRadius}; display: inline-block;
border-bottom-left-radius: ${borderRadius}; width: atuo;
padding-left: ${rem(8)}; clear:both
padding-right: ${rem(14)}; color: var(--text-light-color);
background-color: var(--text-chart-tag-background-color);
> span { padding: 0 ${rem(8)};
display: block; border-radius: ${borderRadius};
width: 100%; ${transitionProps(['background-color', 'color'])}
color: var(--text-light-color); }
background-color: var(--text-chart-tag-background-color); }
padding: 0 ${rem(8)};
border-radius: ${borderRadius}; .text {
${transitionProps(['background-color', 'color'])} padding-left: 1rem;
} padding-right: ${rem(20)};
} display: block;
overflow: hidden;
.text { white-space: normal;
${sameBorder()} word-wrap: normal;
border-left: none; height:auto;
border-top-right-radius: ${borderRadius};
border-bottom-right-radius: ${borderRadius}; > * {
padding-right: ${rem(20)}; vertical-align: middle;
${ellipsis()} }
}
> * { }
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.
先完成此消息的编辑!
想要评论请 注册