Skip to content

useCountdown

创建一个倒计时

演示

示例

vue
<template>
  {{ 
output
}}
</template> <script lang="ts" setup> import {
onMounted
} from 'vue';
import {
useCountdown
} from '@mixte/use';
const {
output
,
isStart
,
start
,
stop
} =
useCountdown
(60, {
duration
: 60 * 1000,
});
onMounted
(() => {
start
();
}); </script>

Released under the MIT License.