mirror of
https://github.com/youzan/vant.git
synced 2025-10-17 16:44:21 +00:00
Merge branch '2.x' into dev
This commit is contained in:
@@ -5,7 +5,7 @@ import {
|
||||
onDeactivated,
|
||||
onBeforeUnmount,
|
||||
} from 'vue';
|
||||
import { raf, cancelRaf } from '../utils';
|
||||
import { raf, cancelRaf, inBrowser } from '../utils';
|
||||
|
||||
export type CurrentTime = {
|
||||
days: number;
|
||||
@@ -106,6 +106,12 @@ export function useCountDown(options: UseCountDownOptions) {
|
||||
};
|
||||
|
||||
const tick = () => {
|
||||
// should not start counting in server
|
||||
// see: https://github.com/youzan/vant/issues/7807
|
||||
if (!inBrowser) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (options.millisecond) {
|
||||
microTick();
|
||||
} else {
|
||||
|
Reference in New Issue
Block a user