baseSwiper.vue 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. <template>
  2. <u-swiper :list="list" :effect3d="attrsConfig['effect3d']" :title="attrsConfig['title']" :mode="attrsConfig['mode']"
  3. :height="attrsConfig['height']" :indicator-pos="attrsConfig['indicator-pos']"
  4. :autoplay="attrsConfig['autoplay']" :interval="attrsConfig['interval']"
  5. :border-radius="attrsConfig['border-radius']" :bg-color="attrsConfig['bg-color']"
  6. :effect3d-previous-margin="attrsConfig['effect3d-previous-margin']" :img-mode="attrsConfig['img-mode']" />
  7. </template>
  8. <script>
  9. export default {
  10. props: {
  11. list: {
  12. type: Array,
  13. default: () => [],
  14. },
  15. // 轮播图片key
  16. attrsConfig: {
  17. type: Object,
  18. default: () => {},
  19. }
  20. },
  21. data() {
  22. return {
  23. swiperHeight: 0,
  24. current: 0,
  25. slots: false,
  26. BannerList: []
  27. };
  28. },
  29. watch: {
  30. // 判断异步数据源,是否使用插槽自定义样式
  31. // list: {
  32. // handler(val) {
  33. // if (val.length > 0 && this.$slots.default) {
  34. // this.slots = true;
  35. // }
  36. // },
  37. // immediate: true,
  38. // },
  39. },
  40. methods: {
  41. },
  42. };
  43. </script>
  44. <style lang="scss" scoped>
  45. .wrap {
  46. width: 100%;
  47. }
  48. </style>