🌱 添加优化方向

This commit is contained in:
BTMuli
2023-06-15 16:42:55 +08:00
parent 9eec62583e
commit 305cdad37e

View File

@@ -1,5 +1,5 @@
<template> <template>
<TItemBox :model-value="box" /> <TItemBox v-model="box" @click="showData" />
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>
// vue // vue
@@ -15,10 +15,10 @@ const box = ref({} as TItemBoxData);
const getName = () => { const getName = () => {
return ( return (
props.modelValue.id === 10000005 props.modelValue.id === 10000005
? "旅行者-空" ? "旅行者-空"
: props.modelValue.id === 10000007 : props.modelValue.id === 10000007
? "旅行者-荧" ? "旅行者-荧"
: props.modelValue.name : props.modelValue.name
); );
}; };
@@ -37,4 +37,9 @@ onMounted(async () => {
display: "inner", display: "inner",
}; };
}); });
function showData () {
// todo @click 应该出来的是一个弹窗,而不是 console
console.log(props.modelValue);
}
</script> </script>