插件名称 | typical |
---|---|
版本号 | v1.6.1 |
发布时间 | 2020年4月8日 |
插件作者 | Turkyden |
在Vue.js应用程序中用于动画输入的简单而超小型的Vue.js组件。
# NPM
$ npm install vue-typical --save
v1.6.1(03/04/2021)
v1.5.1(03/03/2021)
v1.5.0(2020年12月30日)
1.安装并导入。
import typical from 'vue-typical'
2.在您的模板应用中:
<template>
<div id="app">
<typical
class="vt-title"
:steps="['Vue', 1000, 'Script', 500]"
:wrapper="'h2'"
></typical>
<typical
class="vt-subTitle"
:steps="['Vue', 1000, 'Script', 500, 'Vue365.cn :-) ', 1000]"
:loop="3"
:wrapper="'h3'"
></typical>
</div>
</template>
3.注册组件。
xport default {
name: 'app',
data: function() {
return {
msg: 'vue typical'
}
},
components: {
typical
}
}
4.选项。
steps: {
type: Array,
required: true
},
wrapper: {
type: String,
default: 'div'
},
loop: {
type: Number,
default: 1 // 或 'Infinity'
}