BambooBookScene3.vue 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116
  1. <script setup>
  2. // import { ref } from 'vue'
  3. import useSizeAdapt from "@/useFunctions/useSizeAdapt"
  4. import { Swiper, SwiperSlide } from 'swiper/vue'
  5. import { Pagination } from 'swiper/modules'
  6. // import { Pagination } from 'swiper'
  7. // import 'swiper/css'
  8. // import 'swiper/css/pagination'
  9. const {
  10. windowSizeInCssForRef,
  11. windowSizeWhenDesignForRef,
  12. } = useSizeAdapt()
  13. const emit = defineEmits(['close'])
  14. const modules = [Pagination]
  15. const paginationOptions = { clickable: true }
  16. const stepList = [
  17. {
  18. id: 0,
  19. title: "直杆带曲"
  20. },
  21. {
  22. id: 1,
  23. title: "直杆带曲2"
  24. },
  25. {
  26. id: 2,
  27. title: "直杆带曲3"
  28. },
  29. ]
  30. </script>
  31. <template>
  32. <div class="screen-box">
  33. <div class="screen-box3">
  34. <Swiper
  35. class="step-list"
  36. :modules="modules"
  37. :pagination="paginationOptions"
  38. >
  39. <SwiperSlide
  40. v-for="(item,index) in stepList"
  41. :key="index"
  42. class="step-item"
  43. >
  44. {{ item.title }}
  45. </SwiperSlide>
  46. </Swiper>
  47. <div class="system-btns">
  48. <BtnBack
  49. @click="emit('close')"
  50. />
  51. </div>
  52. </div>
  53. </div>
  54. </template>
  55. <style lang='less' scoped>
  56. ::v-deep{
  57. .swiper-pagination-bullet {
  58. border: 1px solid white;
  59. background: none;
  60. width: 10px;
  61. height: 10px;
  62. opacity: 1;
  63. }
  64. .swiper-pagination-bullet-active{
  65. background: white;
  66. }
  67. .swiper-horizontal > .swiper-pagination-bullets .swiper-pagination-bullet, .swiper-pagination-horizontal.swiper-pagination-bullets .swiper-pagination-bullet{
  68. margin: 0 calc(10 / v-bind(windowSizeWhenDesignForRef) * v-bind(windowSizeInCssForRef));
  69. }
  70. }
  71. .screen-box {
  72. width: 100%;
  73. height: 100%;
  74. position: relative;
  75. .screen-box3 {
  76. width: 100%;
  77. height: 100%;
  78. background: url(@/assets/images/screen-box3.png);
  79. background-size:cover ;
  80. .step-list{
  81. width: 100%;
  82. height: calc(100% - 15px);
  83. .step-item{
  84. width: 100%;
  85. height: 100%;
  86. display: flex;
  87. justify-content: center;
  88. align-items: center;
  89. }
  90. }
  91. .system-btns {
  92. width: 100%;
  93. padding: 0 calc(20 / v-bind(windowSizeWhenDesignForRef) * v-bind(windowSizeInCssForRef));
  94. display: flex;
  95. justify-content: space-between;
  96. position: absolute;
  97. bottom: calc(20 /v-bind(windowSizeWhenDesignForRef) * v-bind(windowSizeInCssForRef));
  98. z-index: 2;
  99. }
  100. }
  101. }
  102. </style>