显示图片没问题,但是加了指示器之后报错: 原因:不同版本的swiper可能使用方式存在差异。 解决办法,更换swiper版本。 npm remove swiper npm install --save swiper@8.1.6 之后可以正常运行。