mirror of
https://github.com/unanmed/HumanBreak.git
synced 2026-10-31 23:20:18 +08:00
成就列表
This commit is contained in:
1 parent
82c8434f9b
commit
9e51b03a4d
4 files changed
+102
-2
No files matched your search
+13
-1
@@ -2,7 +2,7 @@
|
||||
import { message } from 'ant-design-vue';
|
||||
import { MessageApi } from 'ant-design-vue/lib/message';
|
||||
import { isNil } from 'lodash';
|
||||
import { Animation, TimingFn } from 'mutate-animate';
|
||||
import { Animation, sleep, TimingFn } from 'mutate-animate';
|
||||
import { ComputedRef, ref } from 'vue';
|
||||
import { EVENT_KEY_CODE_MAP } from './keyCodes';
|
||||
|
||||
@@ -191,3 +191,15 @@ export function download(content: string, name: string) {
|
||||
a.click();
|
||||
document.body.removeChild(a);
|
||||
}
|
||||
|
||||
/**
|
||||
* 间隔一段时间调用一个函数
|
||||
* @param funcs 函数列表
|
||||
* @param interval 调用间隔
|
||||
*/
|
||||
export async function doByInterval(funcs: (() => void)[], interval: number) {
|
||||
for await (const fn of funcs) {
|
||||
await sleep(interval);
|
||||
fn();
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user