HomeLease/unpackage/dist/dev/mp-weixin/components/banner-swiper/banner-swiper.js
2025-08-13 11:23:14 +08:00

54 lines
1.3 KiB
JavaScript

"use strict";
const common_vendor = require("../../common/vendor.js");
const _sfc_main = {
name: "BannerSwiper",
props: {
bannerList: {
type: Array,
default: () => []
},
indicatorDots: {
type: Boolean,
default: true
},
autoplay: {
type: Boolean,
default: true
},
interval: {
type: Number,
default: 2e3
},
duration: {
type: Number,
default: 500
}
},
methods: {
onSwiperChange(e) {
this.$emit("change", e.detail.current);
},
onBannerClick(item, index) {
this.$emit("banner-click", { item, index });
}
}
};
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
return {
a: common_vendor.f($props.bannerList, (item, index, i0) => {
return {
a: item.image,
b: index,
c: common_vendor.o(($event) => $options.onBannerClick(item, index), index)
};
}),
b: $props.autoplay,
c: $props.duration,
d: $props.indicatorDots,
e: $props.interval
};
}
const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-f6b62634"]]);
wx.createComponent(Component);
//# sourceMappingURL=../../../.sourcemap/mp-weixin/components/banner-swiper/banner-swiper.js.map