From 4f4275770d4c4be9759a3c424f095ce270d18303 Mon Sep 17 00:00:00 2001
From: icssoa <615206459@qq.com>
Date: Wed, 10 Sep 2025 23:10:37 +0800
Subject: [PATCH] =?UTF-8?q?cl-countdown=20=E6=B7=BB=E5=8A=A0=20auto=20?=
=?UTF-8?q?=E5=8F=82=E6=95=B0?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
pages/demo/status/countdown.uvue | 14 ++++-
.../components/cl-countdown/cl-countdown.uvue | 52 ++++++++++++-------
.../cool-ui/components/cl-countdown/props.ts | 1 +
3 files changed, 46 insertions(+), 21 deletions(-)
diff --git a/pages/demo/status/countdown.uvue b/pages/demo/status/countdown.uvue
index 8390160..8335e25 100644
--- a/pages/demo/status/countdown.uvue
+++ b/pages/demo/status/countdown.uvue
@@ -33,6 +33,10 @@
+
+
+
+
import { t } from "@/locale";
import DemoItem from "../components/item.uvue";
-import { ref } from "vue";
+import { onMounted, ref } from "vue";
import { dayUts, isDark, parseClass } from "@/cool";
import { useUi } from "@/uni_modules/cool-ui";
@@ -69,4 +73,12 @@ function onDone() {
message: "倒计时完成"
});
}
+
+const countdownRef = ref(null);
+
+onMounted(() => {
+ setTimeout(() => {
+ countdownRef.value!.next();
+ }, 3000);
+});
diff --git a/uni_modules/cool-ui/components/cl-countdown/cl-countdown.uvue b/uni_modules/cool-ui/components/cl-countdown/cl-countdown.uvue
index c1fd041..2be0d89 100644
--- a/uni_modules/cool-ui/components/cl-countdown/cl-countdown.uvue
+++ b/uni_modules/cool-ui/components/cl-countdown/cl-countdown.uvue
@@ -14,7 +14,7 @@
diff --git a/uni_modules/cool-ui/components/cl-countdown/props.ts b/uni_modules/cool-ui/components/cl-countdown/props.ts
index 6a0c2d1..32682f2 100644
--- a/uni_modules/cool-ui/components/cl-countdown/props.ts
+++ b/uni_modules/cool-ui/components/cl-countdown/props.ts
@@ -16,4 +16,5 @@ export type ClCountdownProps = {
minute?: number;
second?: number;
datetime?: Date | string;
+ auto?: boolean;
};