簡體   English   中英

自從我將余燼版本更新為1.13.3后,用於綁定data- *屬性的Ember.View.reopen()不再起作用

[英]Ember.View.reopen() for binding data-* attribute doesn't work any longer since I updated ember version to 1.13.3

指南中的一些代碼

Ember.View.reopen({
  init: function() {
    this._super();
    var self = this;

    // bind attributes beginning with 'data-'
    Ember.keys(this).forEach(function(key) {
      if (key.substr(0, 5) === 'data-') {
        self.get('attributeBindings').pushObject(key);
      }
    });
  }
});

不行

甚至直接放置attributeBindings

Ember.View.reopen({
  attributeBindings: ['data-some', ...]
});

不行

Ember.TextField.reopen({
    attributeBindings: ['data-some', ...],
});

為輸入助手工作

余燼1.13.3

余燼數據1.13.5

ember-cli 1.13.1

救命

我想念什么嗎?

編輯:看起來像1.13中的確認回歸-https: //github.com/emberjs/ember.js/issues/11480


(已刪除原始答案,因為我弄錯了)

ember.js問題的答案
Ember.View已被棄用

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM