Skip to content

MeCKodo/wechat-colorpicker

Repository files navigation

wechat-colorpicker

CircleCI npm npm

颜色选择器(UI取自微信公众号后台编辑器)

demo

安装

npm i wechat-colorpicker -S

栗子

import WeChatColorPicker from 'wechat-colorpicker';

const example = new WeChatColorPicker({
  el: '#container', // selector  底层采用了querySelector
  click(color) {
    console.log(`获得的基础颜色是${color}`);
  },
  clear() {
    console.log('清除');
  },
});

example.destroy(); // 销毁实例

MIT

MIT LICENSE