mirror of
https://github.com/BTMuli/TeyvatGuide.git
synced 2025-12-16 09:58:13 +08:00
✨ 完成深渊数据渲染
This commit is contained in:
30
src/components/itembox/tib-abyss-overview.vue
Normal file
30
src/components/itembox/tib-abyss-overview.vue
Normal file
@@ -0,0 +1,30 @@
|
||||
<template>
|
||||
<TItemBox :data="character as Record<string,string|number>" size="80px" model-value="abyss-overview" display="inner" />
|
||||
</template>
|
||||
<script lang="ts" setup>
|
||||
// vue
|
||||
import { onMounted, ref } from "vue";
|
||||
import TItemBox from "../main/t-itembox.vue";
|
||||
// utils
|
||||
import TGSqlite from "../../plugins/Sqlite";
|
||||
|
||||
interface TibAbyssOverviewProps {
|
||||
modelValue: TGApp.Sqlite.Abyss.Character;
|
||||
}
|
||||
|
||||
export interface TibAbyssOverviewAvatar extends TGApp.Sqlite.Character.AppData {
|
||||
value: number,
|
||||
}
|
||||
|
||||
const props = defineProps<TibAbyssOverviewProps>();
|
||||
|
||||
const character = ref({} as TibAbyssOverviewAvatar);
|
||||
|
||||
onMounted(async () => {
|
||||
const res = await TGSqlite.getAppCharacter(props.modelValue.id);
|
||||
character.value = {
|
||||
...res,
|
||||
value: props.modelValue.value,
|
||||
} as TibAbyssOverviewAvatar;
|
||||
});
|
||||
</script>
|
||||
Reference in New Issue
Block a user