js插件 球形走马灯
VueTags球 (VueTagsBall)
Create a beautiful and spherical tag with this plugin.
使用此插件创建一个漂亮的球形标签。
create a 3d tags ball for vue2.
为vue2创建一个3D标签球。
安装 (Install)
npm install --save vue-tags-ball
用法 (Usage)
//Gobal method
import TagsBall from 'vue-tags-ball'
Vue.use(TagsBall)
//Component method
import TagsBall from 'vue-tags-ball'
//...
components: {
"tags-ball":TagsBall
},
例 (Example)
<tags-ball v-bind:style='{"border":"2px solid black"}' :width='200' :tags='tags'/>
tags
is a String[],like {"tag1","tag2","tag3"}
.and you can bind your own style.
tags
是一个String [],例如{"tag1","tag2","tag3"}
,您可以绑定自己的样式。
Warning: just watching the tags
and stop
,other props only init.
警告:仅观看tags
并stop
,其他道具只能初始化。
道具 (Props)
Property | Type | Description | Default |
---|---|---|---|
tags | Array | all the tag | [] |
stop | Boolean | stop the animation | false |
width | Number | init the canvas widht | 200 |
height | Number | init the canvas height | 200 |
radius | Number | init the ball radius | 100 |
font | String | init the tag's label font | "24px monaco" |
fontMax | Number | init the tag's label max width | 60 |
color | String | init the label's color | "#fc8457" |
属性 | 类型 | 描述 | 默认 |
---|---|---|---|
标签 | 数组 | 所有标签 | [] |
停 | 布尔型 | 停止动画 | 假 |
宽度 | 数 | 初始化画布宽度 | 200 |
高度 | 数 | 初始化画布高度 | 200 |
半径 | 数 | 初始化球半径 | 100 |
字形 | 串 | 初始化标签的标签字体 | “ 24px摩纳哥” |
fontMax | 数 | 初始化标签的标签最大宽度 | 60 |
颜色 | 串 | 初始化标签的颜色 | “#fc8457” |
翻译自: https://vuejsexamples.com/create-a-beautiful-and-spherical-tag-with-this-plugin/
js插件 球形走马灯