How can the value pointed by the arrow below be obtained from inside the function pointed by the arrow above
PHP中文网2017-06-26 11:00:09
Separate data and control, do not do this kind of operation in data.
世界只因有你2017-06-26 11:00:09
onSlideChangeEnd: (swiper) => {
console.log(swiper.activeIndex, this.myNum);
}
高洛峰2017-06-26 11:00:09
If the attributes in your data have dependencies, it is recommended to use calculated attributes directly, and it is best to handle your function logic by creating a new method yourself, so that your entire component will be clearer. Some personal suggestions.