跳到主要内容

CountDown

倒计时组件

CountButton

倒计时按钮组件

Usage

<template>
<CountButton />
</template>
<script lang="ts">
import { defineComponent } from 'vue';
import { CountButton } from '/@/components/CountDown';

export default defineComponent({
components: { CountButton },
});
</script>

Props

属性类型默认值可选值说明
valueany--绑定值
countnumber60-倒计时时间
beforeStartFunc()=>promise--倒计时之前执行的函数,返回 true 才会开始执行

CountDownInput

倒计时输入框按钮组件

Usage

<template>
<CountdownInput />
</template>
<script lang="ts">
import { defineComponent } from 'vue';
import { CountdownInput } from '/@/components/CountDown';

export default defineComponent({
components: { CountdownInput },
});
</script>

Props

属性类型默认值可选值说明
valueany--绑定值
sizestring'default', 'large', 'small'-输入框即按钮大小
countnumber60-倒计时时间
sendCodeApi()=>promise--倒计时之前执行的函数,返回 true 才会开始执行