Swiper中文论坛
标题:
swiper-slide中li标签v-for循环渲染数据时出现一个空的swiper-slide
[打印本页]
作者:
song224337
时间:
2018-5-31 15:20
标题:
swiper-slide中li标签v-for循环渲染数据时出现一个空的swiper-slide
<
div
class=
"swiper-wrapper"
>
<
div
class=
"swiper-slide"
>
<
ul
class=
"floor"
>
<
li
v-for=
"
courseCom1
in
compCourse1
"
:key=
"
courseCom1.
id
"
>
<
div
class=
"inner"
>
<
div
class=
"box"
>
<
img
:src=
"
courseCom1
"
alt=
""
class=
"fullWidth"
>
</
div
>
<
a
href=
"##"
class=
"button"
>
xxxxxx
</
a
>
</
div
>
</
li
>
</
ul
>
</
div
>
<
div
class=
"swiper-slide"
>
<
ul
class=
"floor"
>
<
li
v-for=
"
courseCom2
in
compCourse2
"
:key=
"
courseCom2.
id
"
>
<
div
class=
"inner"
>
<
div
class=
"box"
>
<
img
:src=
"
courseCom2
"
alt=
""
class=
"fullWidth"
>
</
div
>
<
a
href=
"##"
class=
"button"
>
xxxxx
</
a
>
</
div
>
</
li
>
</
ul
>
</
div
>
</
div
>
这样喧染出来一共有四个swiper-slide,求指点
欢迎光临 Swiper中文论坛 (http://bbs.swiper.com.cn/)
Powered by Discuz! X3.2