npm引入方式
npm i @JayVone/sleepWave
// 使用方式1
import { sleepWindow } from '@JayVone/sleepWave'
// 获取dom然后绑定
const app = document.getElementById('app');
sleepWindow.init(app);
// 在需要绘制的时候setOptions
sleepWindow.setOption({
types: ['1', '2', '3', '4', 'xixixixixixixixixixi', 'test'],
data: [
{ label: 'test', value: 22 },
{ label: '1', value: 12},
{ label: '2', value: 1 },
{ label: '3', value: 2},
{ label: 'xixixixixixixixixixi', value: 5 },
{ label: 'shs', value: 3 },
{ label: '2', value: 12},
{ label: '2', value: 22},
{ label: 'shasds', value: 3 },
],
borderRadius: 16,
blockHeight: 2,
})