vuejs-no-side-effects-in-computed-properties

watch: {
totalCount: function() {
if (!this.totalCount) {
this.fold = false;
return false;
}
},
fold: function(totalCount) {
let show = this.fold;
if (show) {
this.$nextTick(() => {
if (!this.scroll) {
this.scroll = new BScroll(this.$refs.listContent, {
click: true
});
} else {
this.scroll.refresh();
}
});
}
return show;
}
},

posted @ 2018-04-07 19:02  x4k  阅读(644)  评论(0编辑  收藏  举报