In recent development, we encountered the problem of always reporting errors when using swiper components. Later, it was found that the problem was caused by the version
1. Download these two versions of plug-ins:
“wiper”: “^ 4.5.1”,
“Vue awesome wiper”: “^ 4.0.4”,
npm install [email protected] --save -dev
npm install swiper@4 --save -dev
2. Introduce in the component of xxxx.vue
<script>
import { swiper, swiperSlide } from "vue-awesome-swiper";
import "swiper/dist/css/swiper.css";
export default {
name: "index",
components: {
swiper,
swiperSlide
},
};
</script>
3. Use in div
<swiper ref="mySwiper" v-bind:options="swiperOptions">
<swiper-slide v-for="(item, index) in slideList" :key="index">
<a v-bind:href="'/#/product'%20+%20'item.id'">
<img v-bind:src="item.img" alt />
</a>
</swiper-slide>
Read More:
- Some problems and solutions in learning opengl in vs2017
- Problems and solutions in using Linux
- Several solutions to HDF5 error reporting in Python environment
- Problems and solutions in learning opengl
- Problems and solutions of installing Ubuntu 12.04 in win7
- Solutions to problems in SAS 9.3 x64 importing and exporting Excel
- Possible causes and solutions of 404 problems in accessing servlet pages
- Solutions to some problems encountered in programming with vs2017
- Solutions to network connection problems in Ubuntu 16.04.3
- Write about the problems and solutions when configuring OpenGL in vs2015
- About iView reporting error in Vue project: error in mounted hook: “typeerror: this$ parent.updateNav is not a function”
- Threejs is used in Vue to introduce error reporting problem of orbitcontrols
- Creating Server TCP listening socket 127.0.0.1:6379: bind: No error。。。 Solutions to problems encountered in startup
- Problems in compiling VTK with cmake: solutions to error configuration process, project files may be invalid
- Android learning notes 03: some problems and solutions in the learning process
- Pytorch RuntimeError: Error(s) in loading state_ dict for Dat aParallel:.. function submit.py Solutions for reporting errors
- In Vue, use echorts to report an error: “typeerror: cannot read property ‘init’ of undefined” error reporting reason and solution
- Common problems of Hadoop startup error reporting
- Phpcms development problems and Solutions
- A series of problems in configuring OpenGL development environment in vs2015