鍍金池/ 問答/PHP  HTML/ 請問各位大大,怎么將子組件里面的構(gòu)造函數(shù)里面的回調(diào)給對外暴露。

請問各位大大,怎么將子組件里面的構(gòu)造函數(shù)里面的回調(diào)給對外暴露。

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 : {
          // 在用新的集群替換以前的集群之前會被調(diào)用。
          clusterWillChange: function() {},
          // 在用新的集群替換之前的集群后會被調(diào)用
          clusterChanged: function() {},
          // 將被調(diào)用滾動。返回進(jìn)度狀態(tài)
          scrollingProgress: function(progress) {}
        }
      });
    }

怎么將callbacks給暴露呢。

回答
編輯回答
空白格

放到一個屬性里去

2017年5月18日 06:24