From ebbd788fbb2c0b45d4473798efc57eec8ba74a25 Mon Sep 17 00:00:00 2001 From: Ben Lin <maobin001@msn.com> Date: 星期二, 18 六月 2024 14:51:16 +0800 Subject: [PATCH] 版本更新至2.11.5 --- src/components/CountDown/src/CountdownInput.vue | 30 +++++++++++------------------- 1 files changed, 11 insertions(+), 19 deletions(-) diff --git a/src/components/CountDown/src/CountdownInput.vue b/src/components/CountDown/src/CountdownInput.vue index 5cd939d..8c3821f 100644 --- a/src/components/CountDown/src/CountdownInput.vue +++ b/src/components/CountDown/src/CountdownInput.vue @@ -8,34 +8,26 @@ </template> </a-input> </template> -<script lang="ts"> - import { defineComponent, PropType } from 'vue'; +<script lang="ts" setup> + import { PropType } from 'vue'; import CountButton from './CountButton.vue'; - import { useDesign } from '/@/hooks/web/useDesign'; - import { useRuleFormItem } from '/@/hooks/component/useFormItem'; + import { useDesign } from '@/hooks/web/useDesign'; + import { useRuleFormItem } from '@/hooks/component/useFormItem'; - const props = { + defineOptions({ name: 'CountDownInput', inheritAttrs: false }); + + const props = defineProps({ value: { type: String }, - size: { type: String, validator: (v) => ['default', 'large', 'small'].includes(v) }, + size: { type: String, validator: (v: string) => ['default', 'large', 'small'].includes(v) }, count: { type: Number, default: 60 }, sendCodeApi: { type: Function as PropType<() => Promise<boolean>>, default: null, }, - }; - - export default defineComponent({ - name: 'CountDownInput', - components: { CountButton }, - inheritAttrs: false, - props, - setup(props) { - const { prefixCls } = useDesign('countdown-input'); - const [state] = useRuleFormItem(props); - - return { prefixCls, state }; - }, }); + + const { prefixCls } = useDesign('countdown-input'); + const [state] = useRuleFormItem(props); </script> <style lang="less"> @prefix-cls: ~'@{namespace}-countdown-input'; -- Gitblit v1.9.3