【发布时间】:2018-07-12 07:32:57
【问题描述】:
我有一个无法正常工作的 bootstrap-vue 轮播。
我有示例轮播代码from the examples。我已将此脚本包含在 <div> 中:
<script>
export default {
data () {
return {
slide: 0,
sliding: null
}
},
methods: {
onSlideStart (slide) {
this.sliding = true
},
onSlideEnd (slide) {
this.sliding = false
}
}
}
</script>
但是,我仍然收到此错误:
vue.min.js:6 ReferenceError: onSlideStart is not defined
at Rt.eval (eval at Tn (vue.min.js:6), <anonymous>:2:271)
at Rt.t._render (vue.min.js:6)
at Rt.r (vue.min.js:6)
at Kr.get (vue.min.js:6)
at new Kr (vue.min.js:6)
at vue.min.js:6
at Rt.$mount (vue.min.js:6)
at Rt.$mount (vue.min.js:6)
at Rt.t._init (vue.min.js:6)
at new Rt (vue.min.js:6)
【问题讨论】:
-
您是使用单文件组件(*.vue)还是使用运行时方法?
-
目前直接转成.erb
-
必须是自己的组件吗?
标签: javascript vue.js vue-component bootstrap-vue