html:
script:
mounted() { new Swiper('.news .swiper-container', { loop: true, // autoplay: true, pagination: { el: '.news .swiper-pagination', clickable: true, renderBullet: function (index, className) { return ''; }, }, }) },
使用swiper之前需要在文件中引入swiper插件:
<script src="https://cdn.jsdelivr.net/npm/swiper@4.4.6/dist/js/swiper.min.js"></script>