Files
shoot-miniprograms/src/components/Guide.vue
2025-11-06 09:38:19 +08:00

61 lines
1009 B
Vue

<script setup>
defineProps({
noBg: {
type: Boolean,
default: false,
},
type: {
type: Number,
default: 0,
},
});
const bubbleTypes = [
"../static/long-bubble.png",
"../static/long-bubble-middle.png",
"../static/long-bubble-tall.png",
];
</script>
<template>
<view class="container">
<image src="../static/shooter.png" mode="widthFix" />
<view>
<image
v-if="!noBg"
:src="bubbleTypes[type]"
:style="{ top: type === 2 ? '-6%' : '-13%' }"
mode="widthFix"
/>
<slot />
</view>
</view>
</template>
<style scoped>
.container {
display: flex;
align-items: center;
padding: 0 15px;
width: clac(100% - 30px);
}
.container > image {
width: 20%;
}
.container > view {
position: relative;
width: 80%;
min-height: 55px;
display: flex;
flex-direction: column;
}
.container > view > image {
position: absolute;
left: -7%;
width: 108%;
}
.container > view {
color: #fff;
font-size: 28rpx;
}
</style>