methods: {
A: function() {
setInterval(function(){
this.B();
},500)
},
B: function() {
console.log('func B')
}
}
这样写会报错,怎么实现这样的效果呢?
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号
可以使用箭头函数
或者