Open jasonz1987 opened 6 years ago
这个问题 我暂时的处理方法是 给
<swiper :options="swiperOption" class="swiper-box">
加上一个v-if
<swiper :options="swiperOption" class="swiper-box" v-if="!is_share">
这样就可以避免数据变化的时候 刷新swiper组件。
但是 总感觉只是一个投机取巧的方法,具体还是等一个更好的解释吧~
遇到同样一个问题,引入的swiper用到render里,由于数据获取导致多次渲染,应该是这个问题引起的,但不知如何解决
return (
h('div', {class: this.$style.app}, [
h(swiper, {}, [
h(swiperSlide, {class: this.$style.view}, [h(Intra, { class: this.$style.section, props: { user: this.store.user }})]),
...views
])
])
)
Hello @jasonz1987 is it resolved?
@VolodymyrTesliuk I solved by:
.vue
template orcreated()
.
原谅我英文水平差,如果机器翻译的话,肯定更看不懂。
具体问题:
更新数据的时候,报错
具体代码
当我使用调用doInvite方法,更改is_share的时候就会报错,而且这个页面也会卡死。
@surmon-china