Skip to content

Commit

Permalink
🐛 对于旅行者进行特殊处理 #31
Browse files Browse the repository at this point in the history
  • Loading branch information
BTMuli committed Jul 17, 2023
1 parent b1dc27d commit 1b523a3
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 13 deletions.
40 changes: 28 additions & 12 deletions src/components/itembox/tib-abyss-detail.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand All @@ -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>
16 changes: 15 additions & 1 deletion src/components/itembox/tib-wiki-avatar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,28 @@
<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;
}
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`,
Expand Down

0 comments on commit 1b523a3

Please sign in to comment.