3D旋转词云(vue)
<template>
<div>
<svg style="background-color: black" :width="width" :height="height">
<a class="fontA" v-for="(tag, index) in tags" :key="`tag-${index}`">
<text
:id="tag.id"
:x="tag.x"
:y="tag.y"
:font-size="20 * (600 / (600 - tag.z))"
:fill-opacity="(400 + tag.z) / 600"
@mousemove="listenerMove($event)"
@mouseout="listenerOut($event)"
@click="clickToPage"
>
{
{ tag.text }}
</text>
</a>
</svg>
</div>
</template>
<script>
export default {
name: "word-cloud",
//数据,宽,高,半径,半径一般位宽高的一半。