静态词云

借助第三方库 wordCloud 实现的静态词云效果

wordCloudopen in new window

如果 Vue 项目引用该库后发生 webpack 打包时提示异常,可以将引用库的步骤放到 mounted 里去做

mounted() {
  const WordCloud = require("wordcloud");
  this.wordCloudDom = this.$refs.wordCloud;
  WordCloud(this.wordCloudDom, this.wordCloudOption);
}