复制填入 swiper模板标签 就报错勒
来源:7-4 Vue项目首页 - 首页轮播图
红叶青枫
2018-04-09
<template>
<div>
<swiper :options="swiperOption">
<!-- slides -->
<swiper-slide>I'm Slide 1</swiper-slide>
<swiper-slide>I'm Slide 2</swiper-slide>
<swiper-slide>I'm Slide 3</swiper-slide>
<!-- Optional controls -->
<div class="swiper-pagination" slot="pagination"></div>
</swiper>
</div>
</template>
<script>
export default {
name: 'swiper',
data() {
return{
swiperOption:{}
}
}
}
</script>
<style rel="stylesheet/stylus" scoped>
</style>
报错如下:
vue.esm.js?efeb:3147 Uncaught RangeError: Maximum call stack size exceeded
at getData (vue.esm.js?efeb:3419)
at initData (vue.esm.js?efeb:3374)
at initState (vue.esm.js?efeb:3311)
at VueComponent.Vue._init (vue.esm.js?efeb:4628)
at new VueComponent (vue.esm.js?efeb:4798)
at createComponentInstanceForVnode (vue.esm.js?efeb:4310)
at init (vue.esm.js?efeb:4131)
at createComponent (vue.esm.js?efeb:5608)
at createElm (vue.esm.js?efeb:5555)
at createChildren (vue.esm.js?efeb:5682)
1回答
-
死循环了哦~ 你间接调用了一个递归组件,只需要把 name: swiper 换一个名字就可以了,比如说name: indexSwiper,试试看,准好用。
022018-04-09
相似问题