vue-b2wordcloud

基于b2wordcloud的vue词云渲染插件
475 1
Install
npm install vue-b2wordcloud
Latest Version:1.0.5
License:ISC
Last Updated:Nov 26, 2019
Links: GitHub  ·  npm
Maintainer: holanlan

vue-b2wordcloud

NPM

基于b2wordcloud进行封装的vue词云图组件

线上例子见:DEMO

Installtion

  • 通过script引入
<script src="dist/vue-b2wordcloud.min.js"></script>
  • 通过npm安装
npm install vue-b2wordcloud --save

Usage

添加插件到你的main.js文件

import Vue from 'vue'
import VueWordcloud from 'vue-b2wordcloud'
Vue.use(VueWordcloud)

例子:


<template>
    <div id="app">
        <vue-wordcloud 
            style="width: 500px;height: 500px;"
            :options="options" 
            :loading="loading" />
    </div>
</template>

<script>
export default {
    data: function() {
        return { 
            loading: true,
            options: {
                list: [
                    ['foo', 36], ['bar', 62], ['foo3', 22], ['bar4', 36], ['bar5', 46],['foo', 36], ['bar', 62], ['foo3', 22], ['bar4', 36], ['bar5', 46],['foo', 36], ['bar', 62], ['foo3', 22], ['bar4', 36], ['bar5', 46],['foo', 36], ['bar', 62], ['foo3', 22], ['bar4', 36], ['bar5', 46],['foo', 36], ['bar', 62], ['foo3', 22], ['bar4', 36], ['bar5', 46],['foo', 36], ['bar', 62], ['foo3', 22], ['bar4', 36], ['bar5', 46],['foo', 36], ['bar', 62], ['foo3', 22], ['bar4', 36], ['bar5', 46],['foo', 36], ['bar', 62], ['foo3', 22], ['bar4', 36], ['bar5', 46],['foo', 36], ['bar', 62], ['foo3', 22], ['bar4', 36], ['bar5', 46],['foo', 36], ['bar', 62], ['foo3', 22], ['bar4', 36], ['bar5', 46]
                ],
                color: [
                    ['blue', 'white']
                ]
            }
        }
    },
    mounted() {
        setTimeout(() => {
            this.loading = false
        }, 2000)
    }
}
</script>

API documentation

Resize

组件内置监听DOM resize(基于element-resize-detector)调用词云图重绘方法,

Related Packages

@21cnfe/onekit-mp-cli

小程序框架开发工具

1,154
duplicate-dependencies-webpack-plugin

webpack plugin to find duplicated dependencies from your bundle

332,104 6
@debut/plugin-report

Report generation for strategy backtesting in debut

4,011 18
@amilochau/core-vue3

Core plugin for vue.js (v3) projects

3,802 0
@lg2/nuxt3-plugin-link-resolver

link resolver plugin fro nuxt3

3,544 0

Version History

Version Released License
1.0.5 ISC
1.0.4 ISC
1.0.3 ISC
1.0.2 ISC
1.0.1 ISC