diff --git a/package.json b/package.json index 484547f0..81d18195 100644 --- a/package.json +++ b/package.json @@ -100,7 +100,7 @@ "prettier": "^2.2.1", "pretty-quick": "^3.1.0", "rimraf": "^3.0.2", - "rollup-plugin-visualizer": "4.2.1", + "rollup-plugin-visualizer": "4.2.2", "stylelint": "^13.12.0", "stylelint-config-prettier": "^8.0.2", "stylelint-config-standard": "^21.0.0", @@ -117,7 +117,7 @@ "vite-plugin-style-import": "^0.8.1", "vite-plugin-svg-icons": "^0.4.0", "vite-plugin-theme": "^0.5.0", - "vite-plugin-windicss": "0.9.6", + "vite-plugin-windicss": "0.9.7", "vue-eslint-parser": "^7.6.0", "yargs": "^16.2.0" }, diff --git a/src/layouts/default/tabs/components/TabRedo.vue b/src/layouts/default/tabs/components/TabRedo.vue index 025ce289..898956a0 100644 --- a/src/layouts/default/tabs/components/TabRedo.vue +++ b/src/layouts/default/tabs/components/TabRedo.vue @@ -14,7 +14,7 @@ import { useTabs } from '/@/hooks/web/useTabs'; export default defineComponent({ - name: 'TabContent', + name: 'TabRedo', components: { RedoOutlined, Tooltip }, setup() { diff --git a/src/utils/cache/memory.ts b/src/utils/cache/memory.ts index d373dcfb..b0a89f9c 100644 --- a/src/utils/cache/memory.ts +++ b/src/utils/cache/memory.ts @@ -57,10 +57,14 @@ export class Memory { 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; } diff --git a/yarn.lock b/yarn.lock index 1468e739..62e8a4c5 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2091,10 +2091,10 @@ dependencies: vue-demi latest -"@windicss/plugin-utils@0.9.6": - version "0.9.6" - resolved "https://registry.npmjs.org/@windicss/plugin-utils/-/plugin-utils-0.9.6.tgz#89e4709bc48c9eb03c2484054f519560791ccafa" - integrity sha512-rpuRPjndF5GR2BZFaISGAwe6DHii16Cfs0/003El6vBxQbWpL75BslfNYeJKAhnRfkqfPxcq4lybxHGWmvsaug== +"@windicss/plugin-utils@0.9.7": + version "0.9.7" + resolved "https://registry.npmjs.org/@windicss/plugin-utils/-/plugin-utils-0.9.7.tgz#ffc70d9a0eb130a3fc691291becdcdab6ae55b36" + integrity sha512-tyKcMTXENd7AYV1Z3DbZUq/x8/UM3bGeg327lHKrsklds6F4MKZRVwtG2ya5h5taeKmcLHK+qvIvknwhwKNxrA== dependencies: debug "^4.3.2" fast-glob "^3.2.5" @@ -3968,11 +3968,6 @@ defaults@^1.0.3: dependencies: clone "^1.0.2" -define-lazy-prop@^2.0.0: - version "2.0.0" - resolved "https://registry.npmjs.org/define-lazy-prop/-/define-lazy-prop-2.0.0.tgz#3f7ae421129bcaaac9bc74905c98a0009ec9ee7f" - integrity sha512-Ds09qNh8yw3khSjiJjiUInaGX9xlqZDY7JVryGxdxV7NPeuqQfplOpQ66yJFZut3jLa5zOwkXw1g9EI2uKh4Og== - define-properties@^1.1.3: version "1.1.3" resolved "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz#cf88da6cbee26fe6db7094f61d870cbd84cee9f1" @@ -6228,7 +6223,7 @@ is-descriptor@^1.0.0, is-descriptor@^1.0.2: is-data-descriptor "^1.0.0" kind-of "^6.0.2" -is-docker@^2.0.0, is-docker@^2.1.1: +is-docker@^2.0.0: version "2.1.1" resolved "https://registry.npmjs.org/is-docker/-/is-docker-2.1.1.tgz#4125a88e44e450d384e09047ede71adc2d144156" integrity sha512-ZOoqiXfEwtGknTiuDEy8pN2CfE3TxMHprvNer1mXiqwkOT77Rw3YVrUQ52EqAOU3QAWDQ+bQdx7HJzrv7LS2Hw== @@ -6477,7 +6472,7 @@ is-windows@^1.0.1, is-windows@^1.0.2: resolved "https://registry.npmjs.org/is-windows/-/is-windows-1.0.2.tgz#d1850eb9791ecd18e6182ce12a30f396634bb19d" integrity sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA== -is-wsl@^2.2.0: +is-wsl@^2.1.1, is-wsl@^2.2.0: version "2.2.0" resolved "https://registry.npmjs.org/is-wsl/-/is-wsl-2.2.0.tgz#74a4c76e77ca9fd3f932f290c17ea326cd157271" integrity sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww== @@ -8184,14 +8179,13 @@ onetime@^5.1.0, onetime@^5.1.2: dependencies: mimic-fn "^2.1.0" -open@^8.0.0: - version "8.0.3" - resolved "https://registry.npmjs.org/open/-/open-8.0.3.tgz#04f4406c950666c35041aad8a621700022116afd" - integrity sha512-7nsHNw3rOIPTwhF5iYkgE+LVM/oUHWC3cgrWNxPqa+W+Wl5Ekvo32qayB5PYX8zNjXzUkrTaJsWpaGmuw8Aspg== +open@^7.4.2: + version "7.4.2" + resolved "https://registry.npmjs.org/open/-/open-7.4.2.tgz#b8147e26dcf3e426316c730089fd71edd29c2321" + integrity sha512-MVHddDVweXZF3awtlAS+6pgKLlm/JgxZ90+/NBurBoQctVOOB/zDdVjcyPzQ+0laDGbsWgrRkflI65sQeOgT9Q== dependencies: - define-lazy-prop "^2.0.0" - is-docker "^2.1.1" - is-wsl "^2.2.0" + is-docker "^2.0.0" + is-wsl "^2.1.1" opener@^1.5.1: version "1.5.2" @@ -9529,13 +9523,13 @@ rollup-plugin-terser@^7.0.0: serialize-javascript "^4.0.0" terser "^5.0.0" -rollup-plugin-visualizer@4.2.1: - version "4.2.1" - resolved "https://registry.npmjs.org/rollup-plugin-visualizer/-/rollup-plugin-visualizer-4.2.1.tgz#16ec56d1062c2a1f4005a0c4c7a1c49de7bd070a" - integrity sha512-GKXszY24T+WtSHVJclNcOpRaAU87E7bB6FZSdr71zcrnXY96QGgI8iyyGWOSfEH94qW4OQ+x5PcIB3zqWypYVQ== +rollup-plugin-visualizer@4.2.2: + version "4.2.2" + resolved "https://registry.npmjs.org/rollup-plugin-visualizer/-/rollup-plugin-visualizer-4.2.2.tgz#edeb8b3fc6f49b3c95f6cc668f4eba57c6112099" + integrity sha512-10/TsugsaQL5rdynl0lrklBngTtkRBESZdxUJy+3fN+xKqNdg5cr7JQU1OoPx4p5mhQ+nspa6EvX3qc8SsBvnA== dependencies: nanoid "^3.1.22" - open "^8.0.0" + open "^7.4.2" source-map "^0.7.3" yargs "^16.2.0" @@ -11354,12 +11348,12 @@ vite-plugin-theme@^0.5.0: tinycolor2 "^1.4.2" ts-jest "^26.5.3" -vite-plugin-windicss@0.9.6: - version "0.9.6" - resolved "https://registry.npmjs.org/vite-plugin-windicss/-/vite-plugin-windicss-0.9.6.tgz#8c1b55e365ef311296e0db427ed358b5b46247b1" - integrity sha512-vNyPTuVyCV34slkbzaARvMOCC93ueuP0bw0ETyoUduCwIjP2NwI9C88b3LneVM46TAEDIzHtlTJjkq+APADVOA== +vite-plugin-windicss@0.9.7: + version "0.9.7" + resolved "https://registry.npmjs.org/vite-plugin-windicss/-/vite-plugin-windicss-0.9.7.tgz#27840f480c786f920f0130b3058604c97c2d8a69" + integrity sha512-chk7vlV2VyofE5FlxEIhsHajPDInnW44QljY+vHvnd/r90pBEJF6dS9+fpJoS5+jrCVWTCX6t1BL4rZOkIv69A== dependencies: - "@windicss/plugin-utils" "0.9.6" + "@windicss/plugin-utils" "0.9.7" debug "^4.3.2" windicss "^2.5.4"