mirror of
https://github.com/BTMuli/TeyvatGuide.git
synced 2025-12-20 10:33:22 +08:00
🌱 角色详情页 overlay 草创
This commit is contained in:
53
src/components/userCharacter/tuc-detail-itembox.vue
Normal file
53
src/components/userCharacter/tuc-detail-itembox.vue
Normal file
@@ -0,0 +1,53 @@
|
||||
<template>
|
||||
<div class="tuc-dib-box">
|
||||
<div v-if="modelValue.bg" class="tuc-dib-bg">
|
||||
<img :src="modelValue.bg" alt="bg">
|
||||
</div>
|
||||
<div v-if="modelValue.icon" class="tuc-dib-icon">
|
||||
<img :src="modelValue.icon" alt="icon">
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script lang="ts" setup>
|
||||
|
||||
interface TucDetailItemBoxProps {
|
||||
modelValue: {
|
||||
icon?: string,
|
||||
bg?: string,
|
||||
};
|
||||
}
|
||||
|
||||
defineProps<TucDetailItemBoxProps>();
|
||||
</script>
|
||||
<style lang="css" scoped>
|
||||
.tuc-dib-box {
|
||||
width: 60px;
|
||||
height: 60px;
|
||||
border-radius: 5px;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.tuc-dib-bg {
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.tuc-dib-bg img {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
||||
.tuc-dib-icon {
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.tuc-dib-icon img {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
border-radius: 5px;
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user