美文网首页
canvas-nest用法

canvas-nest用法

作者: 大兵_HERG | 来源:发表于2019-08-21 09:44 被阅读0次

源码

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>

相关文章

网友评论

      本文标题:canvas-nest用法

      本文链接:https://www.haomeiwen.com/subject/senvsctx.html