【问题标题】:How to integrate Fuelux repeater in Aurelia?如何在 Aurelia 中集成 Fuelux 中继器?
【发布时间】:2017-12-07 14:57:02
【问题描述】:

我尝试在 Aurelia 应用程序中集成 Fuelux 中继器。问题是列没有呈现:

【问题讨论】:

    标签: fuelux


    【解决方案1】:

    已解决。问题是在 Aurelia 类中定义了“列”。但是在 ajax 回调中,“this”是未定义的,解决方案是绑定:

    defineRepeater() {
        let __this = this;
        // initialize the repeater
        ($('#myRepeater') as any).repeater({
            //init stuff
            dataSource: __this.customDataSource.bind(__this);
        });
    }
    
    customDataSource(options: any, callback) {
        let __this = this;
        ...
        columns: __this.columns
        ...
    }
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2020-02-16
      • 1970-01-01
      • 1970-01-01
      • 2016-11-07
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多