GuiRen.vue 970 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. <template>
  2. <view>
  3. <swiper class="swiper-box" @change="change" :current="current" indicator-dots
  4. :indicator-active-color="zsq"
  5. circular>
  6. <swiper-item v-for="(item, index) in 4" :key="index">
  7. <view class="swiper-item" :class="'swiper-item' + index">
  8. <text style="color: #fff; font-size: 32px;">{{index+1}}</text>
  9. </view>
  10. </swiper-item>
  11. </swiper>
  12. </view>
  13. </template>
  14. <script setup>
  15. import {
  16. ref,
  17. reactive
  18. } from 'vue'
  19. import {
  20. HTTP
  21. } from '@/api/http.js'
  22. import {
  23. onShow,
  24. onLoad
  25. } from '@dcloudio/uni-app'
  26. import {
  27. jieqiFn
  28. } from '@/config' //返回节气样式(a,b),a是节气名称,b是类型,1是返回背景颜色,2是返回边框颜色,3是返回字体颜色
  29. const current=ref(0)//当前滑块所在的index
  30. const zsq=ref('#fff')//指示器颜色
  31. const change=e=>{//切换滑块
  32. console.log(e,"changechange")
  33. }
  34. </script>
  35. <style lang="scss" scoped>
  36. .swiper-box{
  37. background: red;
  38. }
  39. </style>