diff --git a/src/components/userCharacter/tuc-detail-desc-constellation.vue b/src/components/userCharacter/tuc-detail-desc-constellation.vue
index a320ac50..f3f7dbc6 100644
--- a/src/components/userCharacter/tuc-detail-desc-constellation.vue
+++ b/src/components/userCharacter/tuc-detail-desc-constellation.vue
@@ -19,33 +19,20 @@
-
+
diff --git a/src/plugins/Hutao/types/Character.d.ts b/src/plugins/Hutao/types/Character.d.ts
index ae9037be..c4d8f2e8 100644
--- a/src/plugins/Hutao/types/Character.d.ts
+++ b/src/plugins/Hutao/types/Character.d.ts
@@ -111,7 +111,7 @@ declare namespace TGApp.Plugins.Hutao.Character {
* @memberof TGApp.Plugins.Hutao.Character
* @description RawHutaoItem.SkillDepot.Skill => RhisdSkill
* @property {number} GroupId 技能组编号
- * @property {string[]} Proud.Description 技能描述
+ * @property {string[]} Proud.Descriptions 技能描述
* @property {RhiParameter[]} Proud.Parameters 技能参数
* @property {number} Id 技能编号
* @property {string} Name 技能名称
@@ -122,7 +122,7 @@ declare namespace TGApp.Plugins.Hutao.Character {
interface RhisdSkill {
GroupId: number;
Proud: {
- Description: string[];
+ Descriptions: string[];
Parameters: RhiParameter[];
};
Id: number;
diff --git a/src/types/App/Character.d.ts b/src/types/App/Character.d.ts
index 5c7c1153..19a77214 100644
--- a/src/types/App/Character.d.ts
+++ b/src/types/App/Character.d.ts
@@ -20,7 +20,7 @@ declare namespace TGApp.App.Character {
* @property {string} nameCard - 角色名片
* @return WikiBriefInfo
*/
- export interface WikiBriefInfo {
+ interface WikiBriefInfo {
id: number;
contentId: number;
name: string;
@@ -32,6 +32,25 @@ declare namespace TGApp.App.Character {
nameCard: string;
}
+ /**
+ * @description Wiki 页详细信息-角色技能
+ * @since Beta v0.3.8
+ * @interface WikiSkill
+ * @memberof TGApp.Plugins.Hutao.Character
+ * @property {number} GroupId 技能组编号
+ * @property {number} Id 技能编号
+ * @property {string} Name 技能名称
+ * @property {string} Description 技能描述
+ * @property {string} Icon 技能图标
+ */
+ interface WikiSkill {
+ GroupId: number;
+ Id: number;
+ Name: string;
+ Description: string;
+ Icon: string;
+ }
+
/**
* @description Wiki 详细数据
* @since Beta v0.3.8
@@ -80,7 +99,7 @@ declare namespace TGApp.App.Character {
element: string;
weapon: TGApp.Plugins.Hutao.Base.WeaponType;
materials: TGApp.App.Calendar.Material[];
- skills: TGApp.Plugins.Hutao.Character.RhisdSkill[];
+ skills: WikiSkill[];
constellation: TGApp.Plugins.Hutao.Character.RhisdTalent[];
talks: TGApp.Plugins.Hutao.Character.RhiFetter[];
stories: TGApp.Plugins.Hutao.Character.RhiFetter[];
diff --git a/src/utils/toolFunc.ts b/src/utils/toolFunc.ts
index cee06ff7..b7b5d736 100644
--- a/src/utils/toolFunc.ts
+++ b/src/utils/toolFunc.ts
@@ -177,3 +177,22 @@ export function isColorSimilar(colorBg: string, colorText: string): boolean {
: colorConvert.keyword.hex(colorText);
return score(hexText, hexBg) === "Fail";
}
+
+/**
+ * @description 解析带样式的文本
+ * @since Beta v0.3.8
+ * @param {string} desc - 带样式的文本
+ * @returns {string} 解析后的文本
+ */
+export function parseHtmlText(desc: string): string {
+ const reg = /(.*?)<\/color>/g;
+ let match = reg.exec(desc);
+ while (match !== null) {
+ const color = match[1];
+ const text = match[2];
+ desc = desc.replace(match[0], `${text}`);
+ match = reg.exec(desc);
+ }
+ desc = desc.replace(/\\n/g, "
");
+ return desc;
+}