请问各位大大,怎么将子组件里面的构造函数里面的回调给对外暴露。

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 : {
          // 在用新的集群替换以前的集群之前会被调用。
          clusterWillChange: function() {},
          // 在用新的集群替换之前的集群后会被调用
          clusterChanged: function() {},
          // 将被调用滚动。返回进度状态
          scrollingProgress: function(progress) {}
        }
      });
    }

怎么将callbacks给暴露呢。

阅读 1.1k
1 个回答

放到一个属性里去

撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
推荐问题