Skip to content

Number Ticker ​

Vue 已实现 · 还原验收 0/1 · 上游演示 · 固定版本源码

预览 ​

用法 ​

vue
<script setup lang="ts">
import { ref } from 'vue'
import { NumberTicker } from 'beui-vue'
const total = ref(1234.56)
</script>
<template><button @click="total+=81.25"><NumberTicker :value="total" prefix="¥" :decimals="2" locale="zh-CN"/></button></template>

API ​

value 为目标数值,pad、decimals、locale、format 和前后缀决定显示格式。startOnView 在首次进入视口时启动滚轮。

上游变体 ​

还原验收 ​

基于 beUI 的独立 Vue 移植,依 MIT 许可证分发。