Skip to content

Commit

Permalink
💄 修复特定条件下的渲染异常
Browse files Browse the repository at this point in the history
  • Loading branch information
BTMuli committed Sep 5, 2024
1 parent 78a9599 commit 41f93a0
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/components/post/tp-texts.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 41f93a0

Please sign in to comment.