Closed yassine-zhang closed 10 months ago
Describe the bug 像文档中所说:@finish 事件和 onCompleteCallback 配置项都无法正常触发,或者说播放完成的界限是什么?要怎么才是播放完成的状态?
To Reproduce
<template> <span class="font-mono text-2xl text-[#fff]"> <CountUp :end-val="paymentStore.price_total" :duration="1.2" :loop="1" :options="options" :delay="2" :on-finished="onFinish" /> </span> </template> <script lang="ts" setup> import CountUp from "vue-countup-v3"; import type { CountUpOptions } from "vue-countup-v3"; import { usePaymentStore } from "@/stores/payment";
const paymentStore = usePaymentStore();
const options: CountUpOptions = { separator: ",", onCompleteCallback() { console.log('finish'); }, // ... }; const onFinish = () => { console.log('play finished!'); }
**Desktop (please complete the following information):** - OS: macOS 14.0 (23A344) - Browser: 120.0.6099.199(正式版本) (arm64)
:on-finished 改成 :onFinished 或 @finished
:on-finished
:onFinished
@finished
好的,谢谢!
Describe the bug 像文档中所说:@finish 事件和 onCompleteCallback 配置项都无法正常触发,或者说播放完成的界限是什么?要怎么才是播放完成的状态?
To Reproduce
const paymentStore = usePaymentStore();
const options: CountUpOptions = { separator: ",", onCompleteCallback() { console.log('finish'); }, // ... }; const onFinish = () => { console.log('play finished!'); }