Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

解决 Swiper 没有显示分页器 #1

Open
shenzekun opened this issue Feb 12, 2018 · 1 comment
Open

解决 Swiper 没有显示分页器 #1

shenzekun opened this issue Feb 12, 2018 · 1 comment

Comments

@shenzekun
Copy link
Owner

如题,在 vue 中添加 Swiper时,没有显示分页器,一直找 bug,没有发现啥 bug,直到我将

<div class="swiper-slide" v-for="list in lists" :key="list.id">
        <a :href="list.linkUrl">
          <img :src="list.picUrl">
        </a>
 </div>

改为

<div class="swiper-slide">1</div>
<div class="swiper-slide">2</div>
<div class="swiper-slide">3</div>

能用后,我发现应该是数据的问题,仔细一看,原来在父组件忘加 v-if 判断条件😂,因为数据还没来的时候显示 swipe 组件就有问题
image
找这个 bug 花了我快一个小时。。。。。🤨

@x-thence
Copy link

x-thence commented Mar 6, 2020

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants