SeregPie/VueWordCloud

Doesn't work for vue files

Closed this issue · 2 comments

I have added the following code into vue file but it doesn't draw anything. Console is clean of errors.
Thank youuu

<template>
  <div>
        <vue-word-cloud
          :words="[['romance', 19], ['horror', 3], ['fantasy', 7], ['adventure', 3]]"
          :color="([, weight]) => weight > 10 ? 'DeepPink' : weight > 5 ? 'RoyalBlue' : 'Indigo'"
          font-family="Lora"
        ></vue-word-cloud>
  </div>
</template>
<script>
import VueWordcloud from 'vuewordcloud'
export default {
  components: {
    VueWordcloud
  },
}
</script>

Hello. Can it be that there is a typo?
VueWordCloud and not VueWordcloud.
Because VueWordCloud gets to <vue-word-cloud> inside HTML and VueWordcloud gets to <vue-wordcloud>.

add style="position:absolute" to the vue-word-cloud component
for example:
<vue-word-cloud
style="position:absolute"
:words="[['romance', 19], ['horror', 3], ['fantasy', 7], ['adventure', 3]]"
:color="([, weight]) => weight > 10 ? 'DeepPink' : weight > 5 ? 'RoyalBlue' : 'Indigo'"
font-family="Roboto"