我嘗試在Ember.js應用程序中集成Minicolor JQuery組件。 集成應該很容易,但它不爲我工作...(輸入顯示,但沒有JQuery的成分)...Ember.js:包裝JQuery組件(Minicolors)
Minicolor集成指南: https://github.com/claviska/jquery-miniColors
從DOC:只需插入js文件和添加下面的輸入:
我的js文件:
App.ColorPicker = Em.TextField.extend({
type: 'minicolors',
attributeBindings: ['name'],
willInsertElement: function() {
;
}
});
HTML文件
{{view App.ColorPicker placeholder="Background color" name="color" valueBinding="App.MyController.backgroundColor"}}
Tx很多!!完美的作品! – fvisticot