From 3d29e0df5b8914d912f2c8dfd23efb20c15e0f7d Mon Sep 17 00:00:00 2001 From: chansee97 Date: Wed, 17 Apr 2024 14:09:01 +0800 Subject: [PATCH] fix: extract storage prefix --- .env | 3 +++ src/utils/storage.ts | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.env b/.env index b48df03..c2e5f60 100644 --- a/.env +++ b/.env @@ -9,3 +9,6 @@ VITE_AUTH_ROUTE_MODE=static # 设置登陆后跳转地址 VITE_HOME_PATH = /dashboard/workbench + +# 本地存储前缀 +VITE_STORAGE_PREFIX= diff --git a/src/utils/storage.ts b/src/utils/storage.ts index 83f8574..281fb51 100644 --- a/src/utils/storage.ts +++ b/src/utils/storage.ts @@ -1,4 +1,4 @@ -const STORAGE_PREFIX = 'nova_' +const STORAGE_PREFIX = import.meta.env.VITE_STORAGE_PREFIX interface StorageData { value: T