mirror of
https://github.com/BTMuli/TeyvatGuide.git
synced 2025-12-12 09:18:14 +08:00
🩹 完善类型
This commit is contained in:
@@ -35,6 +35,7 @@ export interface TpText {
|
||||
bold?: boolean;
|
||||
color?: string;
|
||||
align?: string;
|
||||
italic?: boolean;
|
||||
};
|
||||
}
|
||||
|
||||
@@ -76,9 +77,13 @@ function getTextStyle(): StyleValue {
|
||||
style.push("white-space: pre-wrap");
|
||||
if (data.attributes) {
|
||||
const ruleBold: StyleValue = "fontFamily: var(--font-title)";
|
||||
const ruleItalic: StyleValue = "fontStyle: italic";
|
||||
if (data.attributes.bold) {
|
||||
style.push(ruleBold);
|
||||
}
|
||||
if (data.attributes.italic) {
|
||||
style.push(ruleItalic);
|
||||
}
|
||||
if (data.attributes.color) {
|
||||
let colorGet = data.attributes.color;
|
||||
if (isColorSimilar("#000000", data.attributes.color)) {
|
||||
|
||||
Reference in New Issue
Block a user