canvas-nest用法

2019-08-21  本文已影响0人  大兵_HERG

源码

import CanvasNest from 'canvas-nest.js';

const config = {
  color: '255,0,0',
  count: 88,
};

// Using config rendering effect at 'element'.
const cn = new CanvasNest(element, config);

// destroy
cn.destroy();

vue中使用

npm i canvas-nest --save-dev

yarn add canvas-nest

vue插件(vue-canvas-nest)

install


# install dependencies
npm i vue-canvas-nest

# or use yarn
yarn add vue-canvas-nest

Usage


import vueCanvasNest from 'vue-canvas-nest'
export default {
    components: { vueCanvasNest }
}

example


<vue-canvas-nest :config="{color:'255,0,0', count: 88}" :el="'#area'"></vue-canvas-nest>
上一篇下一篇

猜你喜欢

热点阅读