🐛 修复一些 bug

* 部分武器描述存在 \n 导致的渲染错误
* 传入参数类型与定义类型不一致导致控制台 warn
This commit is contained in:
BTMuli
2023-12-20 00:23:46 +08:00
parent 7a36ab6665
commit 369d62f4e7
2 changed files with 6 additions and 2 deletions

View File

@@ -4,7 +4,7 @@
<span>圣遗物</span>
</template>
<template #content>
<TucDetailRelic :model-value="props.modelValue" :pos="`${props.modelValue.pos}`" />
<TucDetailRelic :model-value="props.modelValue" :pos="props.modelValue.pos" />
<div class="tuc-ddr-content">
<div class="tuc-ddrc-top">
<span>{{ props.modelValue.name }}</span>

View File

@@ -19,7 +19,10 @@
</div>
</template>
<template #desc>
<span>{{ props.modelValue.description }}</span>
<span
v-if="props.modelValue.description"
v-html="parseHtmlText(props.modelValue.description)"
></span>
</template>
</TucDetailDesc>
</template>
@@ -28,6 +31,7 @@ import { computed } from "vue";
import TucDetailDesc from "./tuc-detail-desc.vue";
import TucDetailItemBox from "./tuc-detail-itembox.vue";
import { parseHtmlText } from "../../utils/toolFunc";
interface TucDetailDescWeaponProps {
modelValue: TGApp.Sqlite.Character.RoleWeapon;