update: add zustand store and basic setup

This commit is contained in:
purp1e
2024-09-21 02:25:23 +08:00
parent 6625e0c57d
commit b3973fd101
10 changed files with 202 additions and 1 deletions

30
src/types/cfgx.ts Normal file
View File

@@ -0,0 +1,30 @@
import { Owner } from "@/types/cfg"
export interface XBase {
name: string
value: string
default: string
info: string
}
export interface Key extends XBase {}
export interface Alias extends XBase {}
export interface Value extends XBase {
option: { name: string; value: string }[]
}
// 转换方法 [[key=${name}]] | [[alias=${name}]] | [[value=${name}]] -> value
export interface XItem {
version: string
creater: string
key: Key[]
alias: Alias[]
value: Value[]
comment: string
content: string
}
export interface CfgX extends Owner {
note: string
items: XItem[]
}