diff --git a/README.md b/README.md index 2d6baf6..1ab7e15 100644 --- a/README.md +++ b/README.md @@ -39,9 +39,6 @@ - ๐Ÿ”ฅ ` diff --git a/app/composables/keepalive.ts b/app/composables/keepalive.ts deleted file mode 100644 index fbe0233..0000000 --- a/app/composables/keepalive.ts +++ /dev/null @@ -1,24 +0,0 @@ -import type { RouteLocationNormalized, RouteRecordName } from 'vue-router' -import { defineStore } from 'pinia' - -const useKeepalive = defineStore('keepalive', () => { - const routeCaches = ref([]) - - const addRoute = (route: RouteLocationNormalized) => { - if (!route.name) - return - - if (routeCaches.value.includes(route.name)) - return - - if (route?.meta?.keepalive) - routeCaches.value.push(route.name) - } - - return { - routeCaches, - addRoute, - } -}) - -export default useKeepalive diff --git a/app/middleware/route.global.ts b/app/middleware/route.global.ts deleted file mode 100644 index 2262eff..0000000 --- a/app/middleware/route.global.ts +++ /dev/null @@ -1,7 +0,0 @@ -import type { RouteLocationNormalized } from 'vue-router' -import useKeepalive from '~/composables/keepalive' - -export default defineNuxtRouteMiddleware((to: RouteLocationNormalized) => { - if (to.meta && to.meta.keepalive) - useKeepalive().addRoute(to) -}) diff --git a/app/pages/counter/index.vue b/app/pages/counter/index.vue deleted file mode 100644 index 0d63233..0000000 --- a/app/pages/counter/index.vue +++ /dev/null @@ -1,35 +0,0 @@ - - - diff --git a/i18n/locales/en-US.json b/i18n/locales/en-US.json index fe49171..06adfb6 100644 --- a/i18n/locales/en-US.json +++ b/i18n/locales/en-US.json @@ -12,7 +12,6 @@ "404Demo": "๐Ÿ™… Page 404 Demo", "unocssExample": "๐ŸŽจ Unocss example", "keepAlive": "๐Ÿงก KeepAlive Demo", - "persistPiniaState": "๐Ÿ’พ Persist Pinia State", "fetch": "๐Ÿ„ Network Request" }, "tabbar": {