record:
1.引入
<Cloud :tagNames.sync="tagNames"></Cloud>
2.组件Cloud
<template>
<div class="clouds">
<svg :width='width' :height='height' @mousemove='listener($event)'>
<a v-for='(tag, index) in tags' :key="index">
<text :x='tag.x' :y='tag.y' :fill='tag.color' :font-size='18 * (400/(600-tag.z))' :fill-opacity='((400+tag.z)/600)'>{
{
tag.text}}</text>
</a>
</svg>
</div>
</template>
<script>
export default {
name: "Cloud",
props: {
tagNames: {
type: Array,
default: () => []
}
},
data() {
return {