mirror of
https://github.com/BTMuli/TeyvatGuide.git
synced 2025-12-09 08:48:21 +08:00
🐛 对于旅行者进行特殊处理 #31
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
<script lang="ts" setup>
|
||||
// vue
|
||||
import { onMounted, ref } from "vue";
|
||||
import TItemBox, { TItemBoxData } from "../main/t-itembox.vue";
|
||||
import TItemBox, { type TItemBoxData } from "../main/t-itembox.vue";
|
||||
// utils
|
||||
import TGSqlite from "../../plugins/Sqlite";
|
||||
|
||||
@@ -17,16 +17,32 @@ const box = ref({} as TItemBoxData);
|
||||
|
||||
onMounted(async () => {
|
||||
const res = await TGSqlite.getAppCharacter(props.modelValue.id);
|
||||
box.value = {
|
||||
height: "70px",
|
||||
ltSize: "25px",
|
||||
bg: `/icon/bg/${props.modelValue.star}-Star.webp`,
|
||||
icon: `/WIKI/character/icon/${props.modelValue.id}.webp`,
|
||||
lt: `/icon/element/${res.element}元素.webp`,
|
||||
innerText: `Lv.${props.modelValue.level}`,
|
||||
innerHeight: 20,
|
||||
display: "inner",
|
||||
size: "70px",
|
||||
};
|
||||
if (props.modelValue.id === 10000005 || props.modelValue.id === 10000007) {
|
||||
box.value = {
|
||||
clickable: false,
|
||||
height: "70px",
|
||||
ltSize: "25px",
|
||||
bg: `/icon/bg/${props.modelValue.star}-Star.webp`,
|
||||
icon: `/WIKI/character/icon/${props.modelValue.id}.webp`,
|
||||
lt: `/icon/weapon/${res.weapon}.webp`,
|
||||
innerText: `Lv.${props.modelValue.level}`,
|
||||
innerHeight: 20,
|
||||
display: "inner",
|
||||
size: "70px",
|
||||
};
|
||||
} else {
|
||||
box.value = {
|
||||
clickable: false,
|
||||
height: "70px",
|
||||
ltSize: "25px",
|
||||
bg: `/icon/bg/${props.modelValue.star}-Star.webp`,
|
||||
icon: `/WIKI/character/icon/${props.modelValue.id}.webp`,
|
||||
lt: `/icon/element/${res.element}元素.webp`,
|
||||
innerText: `Lv.${props.modelValue.level}`,
|
||||
innerHeight: 20,
|
||||
display: "inner",
|
||||
size: "70px",
|
||||
};
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<script lang="ts" setup>
|
||||
// vue
|
||||
import { computed } from "vue";
|
||||
import TItemBox, { TItemBoxData } from "../main/t-itembox.vue";
|
||||
import TItemBox, { type TItemBoxData } from "../main/t-itembox.vue";
|
||||
|
||||
interface TibCalendarAvatarProps {
|
||||
modelValue: TGApp.App.Character.WikiBriefInfo;
|
||||
@@ -12,6 +12,20 @@ interface TibCalendarAvatarProps {
|
||||
|
||||
const props = defineProps<TibCalendarAvatarProps>();
|
||||
const box = computed<TItemBoxData>(() => {
|
||||
if (props.modelValue.id === 10000005 || props.modelValue.id === 10000007) {
|
||||
return {
|
||||
bg: `/icon/bg/${props.modelValue.star}-Star.webp`,
|
||||
icon: `/WIKI/character/icon/${props.modelValue.id}.webp`,
|
||||
size: "128px",
|
||||
height: "128px",
|
||||
display: "inner",
|
||||
lt: `/icon/weapon/${props.modelValue.weapon}.webp`,
|
||||
ltSize: "40px",
|
||||
innerHeight: 30,
|
||||
innerText: props.modelValue.name,
|
||||
clickable: true,
|
||||
};
|
||||
}
|
||||
return {
|
||||
bg: `/icon/bg/${props.modelValue.star}-Star.webp`,
|
||||
icon: `/WIKI/character/icon/${props.modelValue.id}.webp`,
|
||||
|
||||
Reference in New Issue
Block a user