chore: update deps

This commit is contained in:
Vben
2021-03-23 23:26:57 +08:00
parent 8ad127c293
commit 159d900df3
4 changed files with 33 additions and 35 deletions

View File

@@ -14,7 +14,7 @@
import { useTabs } from '/@/hooks/web/useTabs';
export default defineComponent({
name: 'TabContent',
name: 'TabRedo',
components: { RedoOutlined, Tooltip },
setup() {

View File

@@ -57,10 +57,14 @@ export class Memory<T = any, V = any> {
if (!expires) {
return value;
}
item.time = new Date().getTime() + this.alive;
item.timeoutId = setTimeout(() => {
// this.remove(key);
}, expires);
const now = new Date().getTime();
item.time = now + this.alive;
item.timeoutId = setTimeout(
() => {
this.remove(key);
},
expires > now ? expires - now : expires
);
return value;
}