clusterize() {
return new Clusterize({
rows: this.DomArray,
scrollId: this.scrollId,
contentId: this.contentId,
rows_in_block: this.rows_in_block,
blocks_in_cluster: this.blocks_in_cluster,
show_no_data_row: this.show_no_data_row,
no_data_text: this.no_data_text,
no_data_class: this.no_data_class,
keep_parity: this.keep_parity,
tag: this.tag,
callbacks: (Clusterize.prototype.callbacks = {
// 在用新的集群替换以前的集群之前会被调用。
clusterWillChange: function() {
console.log("在用新的集群替换以前的集群----->之前------>会被调用");
},
// 在用新的集群替换之前的集群后会被调用
clusterChanged: function() {
console.log("在用新的集群替换之前的集群----->后-------->会被调用");
},
// 将被调用滚动。返回进度状态
scrollingProgress: function(progress) {
console.log(progress);
}
})
});
想给callbacks里面的函数添加回调,想父组件调用的时候可以直接传递函数,让子组件执行。
有什么方法能够实现呢