vue-awesome-swiper icon indicating copy to clipboard operation
vue-awesome-swiper copied to clipboard

使用v-show,实现隐藏到显示,swiper组件,3D样式失效。v-if正常

Open clydee-geng opened this issue 5 years ago • 3 comments

中文用户注意:

  1. 尽量用英文描述你的 issue
  2. 不要把内容堆彻在标题上,逻辑清晰地写在内容区
  3. 贴代码要提前格式化好,有颜色高亮那种,贴文本,不要贴图片
  4. 提问题前,必须仔细阅读 REMADE.md + 在已关闭的问题中寻找与自身相关的问题,90% 的可能它已经被解决
  5. 如果无法做到提一个合格、优秀的问题,则问题会被 close + block

BUG REPORT TEMPLATE

Vue.js version and component version

Reproduction Link

  • A minimal JSBin, JSFiddle, Codepen, or a GitHub repository that can reproduce the bug.
  • You could start with this template: https://jsfiddle.net/39epgLj0/

Steps to reproduce

What is Expected?

What is actually happening?

clydee-geng avatar Mar 07 '19 06:03 clydee-geng

可以使用this.$nextTick(()=>{})

wangqi7916 avatar Mar 28 '19 07:03 wangqi7916

v-show和v-if的区别是,v-if在变量为true的时候才会渲染DOM,这个时候轮播的数据已经有了,可以渲染成功。v-show不管初始条件是什么,元素总是会被渲染,并且只是简单地基于 CSS 进行切换。

Selly-ZZ avatar Apr 17 '19 03:04 Selly-ZZ

添加以下配置可以解决

observer:true,
observeParents:true,

我的博客:https://dktoo.com/post/vue-swiper

Leslie-Luo avatar Dec 10 '20 09:12 Leslie-Luo