mirror of
https://github.com/BTMuli/TeyvatGuide.git
synced 2025-12-14 09:38:13 +08:00
💄 修复特定条件下的渲染异常
This commit is contained in:
@@ -55,12 +55,16 @@ function getTitle(): string {
|
|||||||
|
|
||||||
function getLineStyle(): StyleValue {
|
function getLineStyle(): StyleValue {
|
||||||
const style = <Array<StyleValue>>[];
|
const style = <Array<StyleValue>>[];
|
||||||
|
const ruleInline: StyleValue = "display: inline";
|
||||||
if (props.data.attributes === undefined) {
|
if (props.data.attributes === undefined) {
|
||||||
|
style.push(ruleInline);
|
||||||
return style;
|
return style;
|
||||||
}
|
}
|
||||||
if (props.data.attributes.align) {
|
if (props.data.attributes.align) {
|
||||||
const ruleAlign: StyleValue = `textAlign: ${props.data.attributes.align}`;
|
const ruleAlign: StyleValue = `textAlign: ${props.data.attributes.align}`;
|
||||||
style.push(ruleAlign);
|
style.push(ruleAlign);
|
||||||
|
} else {
|
||||||
|
style.push(ruleInline);
|
||||||
}
|
}
|
||||||
return style;
|
return style;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user