测试
This commit is contained in:
4
frontend/node_modules/element-plus/lib/hooks/use-timeout/index.d.ts
generated
vendored
Normal file
4
frontend/node_modules/element-plus/lib/hooks/use-timeout/index.d.ts
generated
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
export declare function useTimeout(): {
|
||||
registerTimeout: (fn: (...args: any[]) => any, delay: number) => void;
|
||||
cancelTimeout: () => void;
|
||||
};
|
||||
22
frontend/node_modules/element-plus/lib/hooks/use-timeout/index.js
generated
vendored
Normal file
22
frontend/node_modules/element-plus/lib/hooks/use-timeout/index.js
generated
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
'use strict';
|
||||
|
||||
Object.defineProperty(exports, '__esModule', { value: true });
|
||||
|
||||
var core = require('@vueuse/core');
|
||||
|
||||
function useTimeout() {
|
||||
let timeoutHandle;
|
||||
const registerTimeout = (fn, delay) => {
|
||||
cancelTimeout();
|
||||
timeoutHandle = window.setTimeout(fn, delay);
|
||||
};
|
||||
const cancelTimeout = () => window.clearTimeout(timeoutHandle);
|
||||
core.tryOnScopeDispose(() => cancelTimeout());
|
||||
return {
|
||||
registerTimeout,
|
||||
cancelTimeout
|
||||
};
|
||||
}
|
||||
|
||||
exports.useTimeout = useTimeout;
|
||||
//# sourceMappingURL=index.js.map
|
||||
1
frontend/node_modules/element-plus/lib/hooks/use-timeout/index.js.map
generated
vendored
Normal file
1
frontend/node_modules/element-plus/lib/hooks/use-timeout/index.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"index.js","sources":["../../../../../packages/hooks/use-timeout/index.ts"],"sourcesContent":["import { tryOnScopeDispose } from '@vueuse/core'\n\nexport function useTimeout() {\n let timeoutHandle: number\n\n const registerTimeout = (fn: (...args: any[]) => any, delay: number) => {\n cancelTimeout()\n timeoutHandle = window.setTimeout(fn, delay)\n }\n const cancelTimeout = () => window.clearTimeout(timeoutHandle)\n\n tryOnScopeDispose(() => cancelTimeout())\n\n return {\n registerTimeout,\n cancelTimeout,\n }\n}\n"],"names":["tryOnScopeDispose"],"mappings":";;;;;;AACO,SAAS,UAAU,GAAG;AAC7B,EAAE,IAAI,aAAa,CAAC;AACpB,EAAE,MAAM,eAAe,GAAG,CAAC,EAAE,EAAE,KAAK,KAAK;AACzC,IAAI,aAAa,EAAE,CAAC;AACpB,IAAI,aAAa,GAAG,MAAM,CAAC,UAAU,CAAC,EAAE,EAAE,KAAK,CAAC,CAAC;AACjD,GAAG,CAAC;AACJ,EAAE,MAAM,aAAa,GAAG,MAAM,MAAM,CAAC,YAAY,CAAC,aAAa,CAAC,CAAC;AACjE,EAAEA,sBAAiB,CAAC,MAAM,aAAa,EAAE,CAAC,CAAC;AAC3C,EAAE,OAAO;AACT,IAAI,eAAe;AACnB,IAAI,aAAa;AACjB,GAAG,CAAC;AACJ;;;;"}
|
||||
Reference in New Issue
Block a user