Typed 打字 pass 0.0.15+

基础用法

text 属性可以是字符串,也可以是数组,loop 控制循环播放

|
展开查看
<mg-typed
    :text="['welcome mango-ui doc','This is test text']"
    loop
/>
1
2
3
4

自定义光标

cursor 设置光标,当然也可以传入null隐藏光标

展开查看
<mg-typed
    :text="['welcome mango-ui doc','This is test text']"
    loop
    cursor=""
/>

1
2
3
4
5
6

设置速度

speed 设置打字速度,backspaceSpeed 设置删除时的速度,单位 毫秒

这个例子打字速度就更快些

|
展开查看
<mg-typed
    :text="['welcome mango-ui doc','This is test text']"
    loop
    cursor=""
    :speed="50"
    :backspaceSpeed="100"
/>

1
2
3
4
5
6
7
8

Typed Attributes

参数说明类型可选值默认值
text文本内容string/string[]--
loop是否循环boolean-false
cursor光标string-|
speed打字速度number-300
backspaceSpeed回删速度number-100
gap两个字符串之间的停顿number-number

Typed Event

--