cover.vue 994 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. <template>
  2. <div class="cover" :style="{ backgroundImage: `url(${require('@/assets/images/guide/bg.jpg')})` }">
  3. <div class="btn" @click="handleEnter">进入预案</div>
  4. </div>
  5. </template>
  6. <script setup>
  7. import { ref } from 'vue'
  8. const isShow = ref(true)
  9. const emit = defineEmits(['enter']);
  10. const handleEnter = () => {
  11. emit('enter')
  12. }
  13. </script>
  14. <style lang="scss" scoped>
  15. .cover {
  16. background-repeat: no-repeat;
  17. width: 100%;
  18. height: 100%;
  19. position: fixed;
  20. z-index: 100000;
  21. background-size: cover;
  22. .btn {
  23. background-color: rgba($color: #000000, $alpha: 0.8);
  24. color: white;
  25. font-size: 20px;
  26. display: inline-flex;
  27. justify-content: center;
  28. align-items: center;
  29. padding: 20px 40px;
  30. border-radius: 10px;
  31. cursor: pointer;
  32. left: 50%;
  33. transform: translateX(-50%);
  34. top: 80%;
  35. position: absolute;
  36. }
  37. }
  38. </style>