mirror of
https://github.com/BTMuli/TeyvatGuide.git
synced 2025-12-12 09:18:14 +08:00
✏️ 类型修正
This commit is contained in:
@@ -13,7 +13,7 @@
|
||||
</v-tabs>
|
||||
<v-window v-model="tab">
|
||||
<v-window-item :value="item.name" v-for="(item, index) in tabValues" :key="index">
|
||||
{{ dataList[index] }}
|
||||
{{ data[index] }}
|
||||
</v-window-item>
|
||||
</v-window>
|
||||
</div>
|
||||
@@ -22,21 +22,15 @@
|
||||
import { onMounted, ref } from "vue";
|
||||
|
||||
interface TwcSkillsProps {
|
||||
data: {
|
||||
normal: TGApp.Plugins.Hutao.Character.RhisdSkill[];
|
||||
special: TGApp.Plugins.Hutao.Character.RhisdSkill[];
|
||||
};
|
||||
data: TGApp.Plugins.Hutao.Character.RhisdSkill[];
|
||||
}
|
||||
|
||||
const props = defineProps<TwcSkillsProps>();
|
||||
const tab = ref<string>();
|
||||
const tabValues = ref<Array<{ name: string; icon: string }>>([]);
|
||||
const dataList = ref<TGApp.Plugins.Hutao.Character.RhisdSkill[]>([]);
|
||||
|
||||
onMounted(() => {
|
||||
props.data.normal.map((i) => tabValues.value.push({ name: i.Name, icon: i.Icon }));
|
||||
props.data.special.map((i) => tabValues.value.push({ name: i.Name, icon: i.Icon }));
|
||||
dataList.value = [...props.data.normal, ...props.data.special];
|
||||
props.data.map((i) => tabValues.value.push({ name: i.Name, icon: i.Icon }));
|
||||
tab.value = tabValues.value[0].name;
|
||||
});
|
||||
</script>
|
||||
|
||||
9
src/types/App/Character.d.ts
vendored
9
src/types/App/Character.d.ts
vendored
@@ -54,9 +54,7 @@ declare namespace TGApp.App.Character {
|
||||
* @property {string} element 角色元素类型
|
||||
* @property {TGApp.Plugins.Hutao.Base.WeaponType} weapon 角色武器类型
|
||||
* @property {TGApp.App.Calendar.Material[]} materials 角色培养材料
|
||||
* @property {object} skills 角色技能
|
||||
* @property {TGApp.Plugins.Hutao.Character.RhisdSkill[]} skills.normal 正常技能-普攻、战技、元素爆发
|
||||
* @property {TGApp.Plugins.Hutao.Character.RhisdSkill[]} skills.special 特殊技能
|
||||
* @property {TGApp.Plugins.Hutao.Character.RhisdSkill[]} skills 角色技能
|
||||
* @property {TGApp.Plugins.Hutao.Character.RhisdTalent[]} constellation 角色命座
|
||||
* @property {TGApp.Plugins.Hutao.Character.RhiFetter[]} talks 闲聊
|
||||
* @property {TGApp.Plugins.Hutao.Character.RhiFetter[]} stories 故事
|
||||
@@ -82,10 +80,7 @@ declare namespace TGApp.App.Character {
|
||||
element: string;
|
||||
weapon: TGApp.Plugins.Hutao.Base.WeaponType;
|
||||
materials: TGApp.App.Calendar.Material[];
|
||||
skills: {
|
||||
normal: TGApp.Plugins.Hutao.Character.RhisdSkill[];
|
||||
special: TGApp.Plugins.Hutao.Character.RhisdSkill[];
|
||||
};
|
||||
skills: TGApp.Plugins.Hutao.Character.RhisdSkill[];
|
||||
constellation: TGApp.Plugins.Hutao.Character.RhisdTalent[];
|
||||
talks: TGApp.Plugins.Hutao.Character.RhiFetter[];
|
||||
stories: TGApp.Plugins.Hutao.Character.RhiFetter[];
|
||||
|
||||
@@ -69,7 +69,7 @@ import { useRoute } from "vue-router";
|
||||
|
||||
import TSwitchTheme from "../components/app/t-switchTheme.vue";
|
||||
import showSnackbar from "../components/func/snackbar";
|
||||
import TItembox from "../components/main/t-itembox.vue";
|
||||
import TItembox, { TItemBoxData } from "../components/main/t-itembox.vue";
|
||||
import ToLoading from "../components/overlay/to-loading.vue";
|
||||
import TwcConstellations from "../components/wiki/twc-constellations.vue";
|
||||
import TwcMaterials from "../components/wiki/twc-materials.vue";
|
||||
@@ -87,7 +87,7 @@ const loadingSub = ref<string>();
|
||||
// 数据
|
||||
const data = ref<TGApp.App.Character.WikiItem>();
|
||||
const box = computed(() => {
|
||||
return {
|
||||
return <TItemBoxData>{
|
||||
bg: `/icon/bg/${data.value?.star}-Star.webp`,
|
||||
icon: `/WIKI/character/${data.value?.id}.webp`,
|
||||
size: "128px",
|
||||
|
||||
Reference in New Issue
Block a user