vue实现嵌入到组件中
维斯罗林 (vue-scrollin)
vue-scrollin
is a Vue component that scrolls through various characters on mount before revealing the correct text.
vue-scrollin
是Vue组件,可在显示正确的文本之前滚动浏览挂载的各种字符。
安装 (Install)
Install the package from npm with your favorite package manager (eg. yarn add vue-scrollin
or npm i vue-scrollin
).
使用您最喜欢的软件包管理器从npm安装软件包(例如,用yarn add vue-scrollin
或npm i vue-scrollin
)。
用法 (Usage)
Simply import and register the component and use it in your template. For example,
只需导入并注册组件,然后在模板中使用它即可。 例如,
<template>
<VScrollin>
this text will scroll
</VScrollin>
</template>
<script>
import VScrollin from 'vue-scrollin'
export default {
[...]
components: {
VScrollin
}
};
</script>
道具 (Props)
Easily customise the animation with optional props.
使用可选道具轻松自定义动画。
Property name | Type | Default | Description |
---|---|---|---|
characters | Array | a-z | Characters scrolled through |
misses | Number | 4 | Number of scrolls before correct letter |
speed | Number | 80 | Delay of each letter scoll (ms) |
物业名称 | 类型 | 默认 | 描述 |
---|---|---|---|
人物 | 数组 | z | 字符滚动 |
错过 | 数 | 4 | 正确字母前的滚动数 |
速度 | 数 | 80 | 每个字母的延迟时间(毫秒) |
翻译自: https://vuejsexamples.com/scroll-in-text-component-for-vue/
vue实现嵌入到组件中