Files
shoot-miniprograms/src/components/CoachComment.vue

72 lines
1.3 KiB
Vue
Raw Normal View History

2025-05-10 16:57:36 +08:00
<script setup>
import IconButton from "./IconButton.vue";
const props = defineProps({
show: {
type: Boolean,
default: false,
},
onClose: {
type: Function,
default: () => {},
},
2025-05-29 15:48:38 +08:00
mode: {
type: String,
default: "normal",
},
2025-05-10 16:57:36 +08:00
});
</script>
<template>
<view class="container" :style="{ display: show ? 'flex' : 'none' }">
<view class="scale-in">
2025-05-29 15:48:38 +08:00
<image
v-if="mode === 'normal'"
src="../static/coach-comment.png"
mode="widthFix"
/>
<image
v-if="mode === 'square'"
src="../static/prompt-bg-square.png"
mode="widthFix"
/>
2025-05-10 16:57:36 +08:00
<slot />
</view>
<IconButton
src="../static/close-gold-outline.png"
2025-05-29 23:45:44 +08:00
:width="30"
2025-05-10 16:57:36 +08:00
:onClick="onClose"
/>
</view>
</template>
<style scoped>
.container {
width: 100vw;
height: 100vh;
position: fixed;
top: 0;
left: 0;
background-color: rgba(0, 0, 0, 0.6);
flex-direction: column;
justify-content: center;
align-items: center;
2025-05-16 15:56:54 +08:00
z-index: 10;
2025-05-10 16:57:36 +08:00
}
.container > view:first-child {
display: flex;
align-items: center;
position: relative;
width: 70vw;
color: #fff;
margin-bottom: 25vw;
}
.container > view:first-child > image {
position: absolute;
width: 80vw;
left: -5vw;
bottom: -20vw;
z-index: -1;
}
</style>