mirror of
https://github.com/BTMuli/TeyvatGuide.git
synced 2025-12-13 09:28:14 +08:00
💬 增加显示信息
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<TItemBox v-model="box" @click="showData" />
|
<TItemBox v-model="box" :title="hoverTitle" />
|
||||||
</template>
|
</template>
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { onMounted, ref } from "vue";
|
import { onMounted, ref } from "vue";
|
||||||
@@ -13,6 +13,7 @@ interface TibUrAvatarProps {
|
|||||||
|
|
||||||
const props = defineProps<TibUrAvatarProps>();
|
const props = defineProps<TibUrAvatarProps>();
|
||||||
const box = ref<TItemBoxData>(<TItemBoxData>{});
|
const box = ref<TItemBoxData>(<TItemBoxData>{});
|
||||||
|
const hoverTitle = ref<string>("点击查看详情");
|
||||||
const getName = (): string => {
|
const getName = (): string => {
|
||||||
return props.modelValue.id === 10000005
|
return props.modelValue.id === 10000005
|
||||||
? "旅行者-空"
|
? "旅行者-空"
|
||||||
@@ -36,10 +37,6 @@ onMounted(async () => {
|
|||||||
innerHeight: 20,
|
innerHeight: 20,
|
||||||
display: "inner",
|
display: "inner",
|
||||||
};
|
};
|
||||||
|
hoverTitle.value = `等级:${props.modelValue.level}\n好感:${props.modelValue.fetter}\n角色ID:${props.modelValue.id}`;
|
||||||
});
|
});
|
||||||
|
|
||||||
function showData(): void {
|
|
||||||
// todo @click 应该出来的是一个弹窗,而不是 console
|
|
||||||
console.log(props.modelValue);
|
|
||||||
}
|
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
Reference in New Issue
Block a user