Ember光谱颜色选择器(更改背景)

时间:2015-01-22 16:35:05

标签: jquery ember.js color-picker spectrum

我正在努力让这个组件发挥作用:https://www.npmjs.com/package/ember-spectrum-color-picker

到目前为止

代码:

import SpectrumColorPickerComponent from 'ember-spectrum-color-picker/components/spectrum-color-picker';

export default SpectrumColorPickerComponent.extend({
  showInitial: true,
  moveFiresChange: true,
  showAlpha: true,
  showInput: true,
  move: function(color){
    $('#result').css('background-color',color.toRgbString());
  }
});

    <div id="result">Lorem dipsum lalala</div>
Background{{spectrum-color-picker color=result}}

我怎么能让这个工作? 小提琴:http://jsfiddle.net/3zb1poh3/

0 个答案:

没有答案