Component({
  mixins: [],
  data: {
    current: 0,
  },
  props: {
    images: Array,
    changingClass: String,
    swiperClass: String,
    activeClass: String,
    indicatorDots: true,
    autoplay: false,
    vertical: false,
    disableProgrammaticAnimation: false,
    circular: true,
    snapToEdge: false,
    acceleration: false,
    disableTouch: false,
    adjustVerticalHeight: false,
    // displayMultipleItems: 1,
    current: 0,
    interval: 1000,
    swipeRatio: 0.2,
    swipeSpeed: 0.05,
    touchAngle: 45,
    easingFunction: 'default',
    indicatorColor: '#888',
    indicatorActiveColor: '#333',
    adjustHeight: 'highest',
    mode: 'multi',
    previousMargin: '50rpx',
    nextMargin: '50rpx',
  },
  didMount() {
  },
  didUpdate() {
  },
  didUnmount() {
  },
  methods: {
    // 当前图片点击事件
    onItemClick() {
      this.props.onItemClick && this.props.onItemClick(this.data.current, this.props.images[this.data.current]);
    },
    onChange(e) {
      this.setData({
        current: e.detail.current,
      });
      this.props.onChange && this.props.onChange(e);
    },
    onTransition(e) {
      this.props.onTransition && this.props.onTransition(e);
    },
    onAnimationEnd(e) {
      this.props.onAnimationEnd && this.props.onAnimationEnd(e);
    },
  },
});
