Digit Swap
Vue 已实现 · 还原验收 0/1 · 上游演示 · 固定版本源码
预览
用法
vue
<script setup lang="ts">
import { ref } from 'vue'
import { DigitSwap } from 'beui-vue'
const count = ref(42)
</script>
<template><button @click="count++">增加 <DigitSwap :value="count"/></button></template>API
value 接受字符串和数字,direction 控制上下滚动,duration、stagger 以秒计。suffixLength 保留末尾字符的位置。