完善个人中心页面
This commit is contained in:
11
src/components/stores/app.ts
Normal file
11
src/components/stores/app.ts
Normal file
@@ -0,0 +1,11 @@
|
||||
import { create } from "zustand"
|
||||
import { API_BASE_URL } from "@/lib/api"
|
||||
|
||||
// ==================== 应用配置 ====================
|
||||
// 后端地址等运行时配置统一从 store 读取,初始值来自 import.meta.env(见 lib/api.ts)
|
||||
|
||||
type AppState = {
|
||||
apiUrl: string
|
||||
}
|
||||
|
||||
export const useAppStore = create<AppState>()(() => ({ apiUrl: API_BASE_URL }))
|
||||
Reference in New Issue
Block a user