mirror of
https://github.com/BTMuli/TeyvatGuide.git
synced 2025-12-15 09:48:14 +08:00
✏️ 类型修正 nameCase → NameCase
This commit is contained in:
@@ -4,14 +4,14 @@
|
||||
<script setup lang="ts">
|
||||
// vue
|
||||
import { ref, onMounted, computed } from "vue";
|
||||
import TItemBox, { TItemBoxData } from "../main/t-itembox.vue";
|
||||
import TItemBox, { type TItemBoxData } from "../main/t-itembox.vue";
|
||||
// plugins
|
||||
import TGSqlite from "../../plugins/Sqlite";
|
||||
|
||||
interface TibWikiAbyssProps {
|
||||
modelValue: {
|
||||
item: number;
|
||||
rate: number;
|
||||
Item: number;
|
||||
Rate: number;
|
||||
};
|
||||
}
|
||||
|
||||
@@ -19,7 +19,7 @@ const props = defineProps<TibWikiAbyssProps>();
|
||||
const defaultAvatar = <TGApp.Sqlite.Character.AppData>{
|
||||
birthday: "",
|
||||
element: "",
|
||||
id: props.modelValue.item,
|
||||
id: props.modelValue.Item,
|
||||
name: "旅行者",
|
||||
nameCard: "",
|
||||
star: 5,
|
||||
@@ -38,7 +38,7 @@ const box = computed<TItemBoxData>(() => {
|
||||
icon: `/WIKI/character/icon/${avatar.value?.id}.webp`,
|
||||
innerHeight: 20,
|
||||
// 0.24688451 => 24.688%
|
||||
innerText: (props.modelValue.rate * 100).toFixed(3) + "%",
|
||||
innerText: (props.modelValue.Rate * 100).toFixed(3) + "%",
|
||||
lt:
|
||||
avatar.value.element !== ""
|
||||
? `/icon/element/${avatar.value.element}元素.webp`
|
||||
@@ -52,9 +52,9 @@ const box = computed<TItemBoxData>(() => {
|
||||
|
||||
onMounted(async () => {
|
||||
// 如果是 10000005或 10000007,就是主角
|
||||
if (props.modelValue.item === 10000005 || props.modelValue.item === 10000007) {
|
||||
if (props.modelValue.Item === 10000005 || props.modelValue.Item === 10000007) {
|
||||
return;
|
||||
}
|
||||
avatar.value = await TGSqlite.getAppCharacter(props.modelValue.item);
|
||||
avatar.value = await TGSqlite.getAppCharacter(props.modelValue.Item);
|
||||
});
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user