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