mirror of
https://github.com/BTMuli/TeyvatGuide.git
synced 2026-04-05 07:15:06 +08:00
🐛 修复类型获取错误
This commit is contained in:
@@ -66,9 +66,10 @@
|
||||
</div>
|
||||
</template>
|
||||
<script lang="ts" setup>
|
||||
// vue
|
||||
import { onMounted, ref, watch } from "vue";
|
||||
|
||||
import TSUserGacha from "../../plugins/Sqlite/modules/userGacha.js";
|
||||
|
||||
interface GachaDataViewProps {
|
||||
dataType: "new" | "avatar" | "weapon" | "normal" | "mix";
|
||||
dataVal: TGApp.Sqlite.GachaRecords.SingleTable[];
|
||||
@@ -179,8 +180,9 @@ function getStar5Avg(): string {
|
||||
}
|
||||
|
||||
// 获取物品图标
|
||||
function getIcon(itemId: string, type: string): string {
|
||||
if (type === "角色") {
|
||||
function getIcon(itemId: string): string {
|
||||
const type = TSUserGacha.getGachaItemType(itemId);
|
||||
if (type[0] === "角色") {
|
||||
return "/WIKI/character/" + itemId + ".webp";
|
||||
} else {
|
||||
return "/WIKI/weapon/" + itemId + ".webp";
|
||||
|
||||
Reference in New Issue
Block a user