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