Socket
Socket
Sign inDemoInstall

v2-word-cloud

Package Overview
Dependencies
49
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    v2-word-cloud

a word cloud vue component


Version published
Weekly downloads
1
Maintainers
1
Created
Weekly downloads
 

Readme

Source

v2-word-cloud: a word cloud vue component

inspired by: vue-wordcloud

This project mainly improves the animation behavior when words are changed.

install

npm install v2-word-cloud --save

example


<template>
  <div>
    <v2-word-cloud
        style="width: 100%; height: 400px; border: 2px solid orange"
        :words="words"
        @wordClicked="onWordClicked"
        :font-size="[12, 68]"
        :animation-duration="1000"
    >
    </v2-word-cloud>
  </div>
</template>
<script>
import { V2WordCloud } from 'v2-word-cloud'

export default {
  name: 'Demo',
  components: {
    V2WordCloud
  },
  data() {
    return {
      words: [
        {
          text: '计算机',
          value: 12,
          bordered: true
        },
        {
          text: '丝绸',
          value: 5.08
        },
        {
          text: '两轮车',
          value: 3
        }
      ]
    }
  },
  methods: {
    onWordClicked(w) {
      console.log(w.text)
    }
  }
}
</script>

FAQs

Last updated on 26 Jan 2022

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc