Comments (4)
请帖出详细代码
from vue-awesome-swiper.
from vue-awesome-swiper.
swiperOption:{
notNextTick: true,
direction : 'horizontal',
initialSlide: 1,
loop:true,
onSlideChangeEnd:(swiper)=>{
console.log(swiper.realIndex);
},
onTouchEnd:(swiper, event)=>{
},
onTap:(swiper)=>{
}
}
Model.getAllRecordInfo({
userId : this.userData.userId,
type : 1
}).then(data=>{
Indicator.close();
this.cars = data.data.carInRecords.concat( data.data.noneCarInRecords );
}).catch(data=>{
Indicator.close();
Toast.toast(data.msg);
})
异步请求数据,给cars整体赋值最后页面只能显示最后一页,使用的是vue 1.X不知道有没有关系
from vue-awesome-swiper.
- 首先,要确定异步数据拼接后,数据是否在预期之内。
initialSlide
和异步数据本身不会有关系,数据更新时,组件仅执行了swiper
的update
方法,此方法并不会重新实例化实例;正常的状态应该是,数据更新后,活动页应该正常停留的数据更新前的活动页,鉴于你所描述的现象,可能是因为数据更新时,活动页下标在最后一页或首页,和loop模式的节点复制产生了冲突,导致所看到的现象,具体原因需要多次测试,期待你的反馈,问题暂且关闭。
from vue-awesome-swiper.
Related Issues (20)
- Swiper does not re-render when the swiperOptions state change on IOS app
- The misuse of path of swiper.css causes the dependency was not found HOT 1
- swiper-pagination not show HOT 1
- loop+slidesPerView
- when slidesPerView is auto,use virtual errors HOT 1
- Can't resolve 'swiper/swiper-bundle.css'
- Nuxt 3 Support HOT 2
- Local Registration failed while global Registration succeeded
- Is swiper 7 currently supported ? HOT 2
- How to use stopOnLastSlide property?
- vue 2 swiper7 vue-awesome-swiper effect没有效果
- swiper7 allowSlideNext unable???
- How to modify the default value HOT 1
- Is vue3.0 supported? HOT 3
- cube effect ios is not click
- 更 HOT 1
- Vue-awesome-swiper on the Macbook, Monterey 12.2.1, M1 HOT 1
- To make it more accessible we should have the option to use ul and li as the tags for the slider and the slider items HOT 1
- Can't install vue-awesome-swiper 4.1.1 HOT 1
- IOS下轮播图在返回滑动的时候,图片显示当前激活图片但是随后又会跳转到上一张
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vue-awesome-swiper.