delaytime-up
v1.2.0
Published
``` The numbers gradually increase the animation effect。 The number is loaded from small to large to the set value size。 ```
Downloads
4
Readme
描述
The numbers gradually increase the animation effect。
The number is loaded from small to large to the set value size。
安装
npm i delaytime-up -D
导入
import delay from "delaytime-up";
使用
/**
*
* @param {HTMLElement[]} dom 传入需要渲染数字的dom节点数组
* @param {number[]} arr 传入每个节点对应加载的数字
*/
delay(dom, arr);
vue 使用
<h1 ref="h2" class="h1"></h1>
<h1 ref="h3"></h1>
<h1 ref="h4"></h1>
import { ref, onMounted } from "vue";
import delay from "delaytime-up";
let h2 = ref(null);
let h3 = ref(null);
let h4 = ref(null);
onMounted(() => {
delay([h2.value, h3.value, h4.value], [1200, 2300, 4000]);
});
开源协议
ISC