Skip to content

Commit 972b3eb

Browse files
committed
docs: build docs
1 parent 70f8e34 commit 972b3eb

32 files changed

+416
-112
lines changed

docs/.vitepress/config.mts

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,20 +7,17 @@ export default defineConfig({
77
base: '/dt-utils/',
88
themeConfig: {
99
// https://vitepress.dev/reference/default-theme-config
10-
nav: [
11-
{ text: 'Guide', link: '/quickstart' },
12-
{ text: 'Documents', link: '/api/globals' },
13-
],
10+
nav: [{ text: '文档', link: '/quickstart' }],
1411
sidebar: [
1512
{
16-
text: 'Guide',
13+
text: '简介',
1714
items: [
18-
{ text: 'Quick Start', link: '/quickstart' },
19-
{ text: 'contribution', link: '/contribution' },
15+
{ text: '快速开始', link: '/quickstart' },
16+
{ text: '贡献指南', link: '/contribution' },
2017
],
2118
},
2219
{
23-
text: 'Functions',
20+
text: '工具方法',
2421
link: '/api/globals',
2522
items: [...require('../api/typedoc-sidebar.json')],
2623
},

docs/api/classes/IndexedDB.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
# Class: ~~IndexedDB~~
44

5-
Defined in: [indexedDB/index.ts:37](https://github.com/jin-sir/dt-utils/blob/c80bde9fd6bdabc77e6c76035f655925caf5e8af/src/indexedDB/index.ts#L37)
5+
Defined in: [indexedDB/index.ts:37](https://github.com/DTStack/dt-utils/blob/master/src/indexedDB/index.ts#L37)
66

77
IndexedDB
88

@@ -16,10 +16,10 @@ IndexedDB
1616
## Example
1717

1818
```typescript
19-
import { LocalIndexedDB } from 'dt-utils';
19+
import { IndexedDB } from 'dt-utils';
2020

2121
// 初始化数据库
22-
const db = new LocalIndexedDB('userDB', 1, 'users');
22+
const db = new IndexedDB('userDB', 1, 'users');
2323
await db.open();
2424

2525
// 添加数据
@@ -49,7 +49,7 @@ await db.clear();
4949

5050
> **new IndexedDB**(`database`, `version`, `storeName`, `openLog`): `IndexedDB`
5151
52-
Defined in: [indexedDB/index.ts:51](https://github.com/jin-sir/dt-utils/blob/c80bde9fd6bdabc77e6c76035f655925caf5e8af/src/indexedDB/index.ts#L51)
52+
Defined in: [indexedDB/index.ts:51](https://github.com/DTStack/dt-utils/blob/master/src/indexedDB/index.ts#L51)
5353

5454
Constructor for a new indexedDB object
5555

@@ -89,7 +89,7 @@ Whether to log indexedDB changes
8989

9090
> **add**\<`T`\>(`key`, `value`): `Promise`\<`IDBRequest`\<`any`\>\>
9191
92-
Defined in: [indexedDB/index.ts:149](https://github.com/jin-sir/dt-utils/blob/c80bde9fd6bdabc77e6c76035f655925caf5e8af/src/indexedDB/index.ts#L149)
92+
Defined in: [indexedDB/index.ts:149](https://github.com/DTStack/dt-utils/blob/master/src/indexedDB/index.ts#L149)
9393

9494
#### Type Parameters
9595

@@ -117,7 +117,7 @@ Defined in: [indexedDB/index.ts:149](https://github.com/jin-sir/dt-utils/blob/c8
117117

118118
> **clear**(): `Promise`\<`IDBRequest`\<`any`\>\>
119119
120-
Defined in: [indexedDB/index.ts:171](https://github.com/jin-sir/dt-utils/blob/c80bde9fd6bdabc77e6c76035f655925caf5e8af/src/indexedDB/index.ts#L171)
120+
Defined in: [indexedDB/index.ts:171](https://github.com/DTStack/dt-utils/blob/master/src/indexedDB/index.ts#L171)
121121

122122
#### Returns
123123

@@ -129,7 +129,7 @@ Defined in: [indexedDB/index.ts:171](https://github.com/jin-sir/dt-utils/blob/c8
129129

130130
> **delete**(`key`): `Promise`\<`IDBRequest`\<`any`\>\>
131131
132-
Defined in: [indexedDB/index.ts:166](https://github.com/jin-sir/dt-utils/blob/c80bde9fd6bdabc77e6c76035f655925caf5e8af/src/indexedDB/index.ts#L166)
132+
Defined in: [indexedDB/index.ts:166](https://github.com/DTStack/dt-utils/blob/master/src/indexedDB/index.ts#L166)
133133

134134
#### Parameters
135135

@@ -147,7 +147,7 @@ Defined in: [indexedDB/index.ts:166](https://github.com/jin-sir/dt-utils/blob/c8
147147

148148
> **get**\<`T`\>(`key`): `Promise`\<`T`\>
149149
150-
Defined in: [indexedDB/index.ts:160](https://github.com/jin-sir/dt-utils/blob/c80bde9fd6bdabc77e6c76035f655925caf5e8af/src/indexedDB/index.ts#L160)
150+
Defined in: [indexedDB/index.ts:160](https://github.com/DTStack/dt-utils/blob/master/src/indexedDB/index.ts#L160)
151151

152152
#### Type Parameters
153153

@@ -171,7 +171,7 @@ Defined in: [indexedDB/index.ts:160](https://github.com/jin-sir/dt-utils/blob/c8
171171

172172
> **open**(): `Promise`\<`IDBDatabase`\>
173173
174-
Defined in: [indexedDB/index.ts:70](https://github.com/jin-sir/dt-utils/blob/c80bde9fd6bdabc77e6c76035f655925caf5e8af/src/indexedDB/index.ts#L70)
174+
Defined in: [indexedDB/index.ts:70](https://github.com/DTStack/dt-utils/blob/master/src/indexedDB/index.ts#L70)
175175

176176
打开在构造函数中指定的数据库。
177177
此方法返回一个 Promise,解析为数据库实例。
@@ -186,7 +186,7 @@ Defined in: [indexedDB/index.ts:70](https://github.com/jin-sir/dt-utils/blob/c80
186186

187187
> **set**\<`T`\>(`key`, `value`): `Promise`\<`IDBRequest`\<`any`\>\>
188188
189-
Defined in: [indexedDB/index.ts:154](https://github.com/jin-sir/dt-utils/blob/c80bde9fd6bdabc77e6c76035f655925caf5e8af/src/indexedDB/index.ts#L154)
189+
Defined in: [indexedDB/index.ts:154](https://github.com/DTStack/dt-utils/blob/master/src/indexedDB/index.ts#L154)
190190

191191
#### Type Parameters
192192

docs/api/classes/localDB.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
# Class: LocalDB
44

5-
Defined in: [localDB/index.ts:36](https://github.com/jin-sir/dt-utils/blob/c80bde9fd6bdabc77e6c76035f655925caf5e8af/src/localDB/index.ts#L36)
5+
Defined in: [localDB/index.ts:36](https://github.com/DTStack/dt-utils/blob/master/src/localDB/index.ts#L36)
66

77
一个用于管理浏览器 localStorage 的增强功能工具类
88

@@ -55,7 +55,7 @@ LocalDB.clear(['theme', 'language']);
5555

5656
> `static` **clear**(`except?`): `void`
5757
58-
Defined in: [localDB/index.ts:93](https://github.com/jin-sir/dt-utils/blob/c80bde9fd6bdabc77e6c76035f655925caf5e8af/src/localDB/index.ts#L93)
58+
Defined in: [localDB/index.ts:93](https://github.com/DTStack/dt-utils/blob/master/src/localDB/index.ts#L93)
5959

6060
清除 localStorage,同时可以选择性地保留特定的键
6161

@@ -78,7 +78,7 @@ Defined in: [localDB/index.ts:93](https://github.com/jin-sir/dt-utils/blob/c80bd
7878

7979
> `static` **get**(`key`): `any`
8080
81-
Defined in: [localDB/index.ts:68](https://github.com/jin-sir/dt-utils/blob/c80bde9fd6bdabc77e6c76035f655925caf5e8af/src/localDB/index.ts#L68)
81+
Defined in: [localDB/index.ts:68](https://github.com/DTStack/dt-utils/blob/master/src/localDB/index.ts#L68)
8282

8383
通过键名从 localStorage 中获取数据
8484

@@ -102,7 +102,7 @@ Defined in: [localDB/index.ts:68](https://github.com/jin-sir/dt-utils/blob/c80bd
102102

103103
> `static` **remove**(`key`): `void`
104104
105-
Defined in: [localDB/index.ts:83](https://github.com/jin-sir/dt-utils/blob/c80bde9fd6bdabc77e6c76035f655925caf5e8af/src/localDB/index.ts#L83)
105+
Defined in: [localDB/index.ts:83](https://github.com/DTStack/dt-utils/blob/master/src/localDB/index.ts#L83)
106106

107107
通过键名从 localStorage 中删除数据
108108

@@ -126,7 +126,7 @@ Defined in: [localDB/index.ts:83](https://github.com/jin-sir/dt-utils/blob/c80bd
126126

127127
> `static` **set**(`items`): `void`
128128
129-
Defined in: [localDB/index.ts:41](https://github.com/jin-sir/dt-utils/blob/c80bde9fd6bdabc77e6c76035f655925caf5e8af/src/localDB/index.ts#L41)
129+
Defined in: [localDB/index.ts:41](https://github.com/DTStack/dt-utils/blob/master/src/localDB/index.ts#L41)
130130

131131
向 localStorage 添加多个项目
132132

@@ -146,7 +146,7 @@ Defined in: [localDB/index.ts:41](https://github.com/jin-sir/dt-utils/blob/c80bd
146146

147147
> `static` **set**(`key`, `value`): `void`
148148
149-
Defined in: [localDB/index.ts:47](https://github.com/jin-sir/dt-utils/blob/c80bde9fd6bdabc77e6c76035f655925caf5e8af/src/localDB/index.ts#L47)
149+
Defined in: [localDB/index.ts:47](https://github.com/DTStack/dt-utils/blob/master/src/localDB/index.ts#L47)
150150

151151
通过键名在 localStorage 中存储数据值
152152

docs/api/classes/sessionDB.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
# Class: SessionDB
44

5-
Defined in: [sessionDB/index.ts:45](https://github.com/jin-sir/dt-utils/blob/c80bde9fd6bdabc77e6c76035f655925caf5e8af/src/sessionDB/index.ts#L45)
5+
Defined in: [sessionDB/index.ts:45](https://github.com/DTStack/dt-utils/blob/master/src/sessionDB/index.ts#L45)
66

77
一个用于管理浏览器 Session 存储的工具类,提供类型安全的方法
88

@@ -63,7 +63,7 @@ SessionDB.clear(['userProfile']); // 只保留 userProfile
6363

6464
> `static` **clear**(`except?`): `void`
6565
66-
Defined in: [sessionDB/index.ts:107](https://github.com/jin-sir/dt-utils/blob/c80bde9fd6bdabc77e6c76035f655925caf5e8af/src/sessionDB/index.ts#L107)
66+
Defined in: [sessionDB/index.ts:107](https://github.com/DTStack/dt-utils/blob/master/src/sessionDB/index.ts#L107)
6767

6868
清除 sessionStorage,同时可以选择性地保留特定的键。
6969

@@ -86,7 +86,7 @@ Defined in: [sessionDB/index.ts:107](https://github.com/jin-sir/dt-utils/blob/c8
8686

8787
> `static` **get**(`key`): `any`
8888
89-
Defined in: [sessionDB/index.ts:78](https://github.com/jin-sir/dt-utils/blob/c80bde9fd6bdabc77e6c76035f655925caf5e8af/src/sessionDB/index.ts#L78)
89+
Defined in: [sessionDB/index.ts:78](https://github.com/DTStack/dt-utils/blob/master/src/sessionDB/index.ts#L78)
9090

9191
通过键从 sessionStorage 检索数据
9292

@@ -110,7 +110,7 @@ Defined in: [sessionDB/index.ts:78](https://github.com/jin-sir/dt-utils/blob/c80
110110

111111
> `static` **remove**(`key`): `void`
112112
113-
Defined in: [sessionDB/index.ts:93](https://github.com/jin-sir/dt-utils/blob/c80bde9fd6bdabc77e6c76035f655925caf5e8af/src/sessionDB/index.ts#L93)
113+
Defined in: [sessionDB/index.ts:93](https://github.com/DTStack/dt-utils/blob/master/src/sessionDB/index.ts#L93)
114114

115115
通过键从 sessionStorage 删除数据
116116

@@ -134,7 +134,7 @@ Defined in: [sessionDB/index.ts:93](https://github.com/jin-sir/dt-utils/blob/c80
134134

135135
> `static` **set**(`items`): `void`
136136
137-
Defined in: [sessionDB/index.ts:50](https://github.com/jin-sir/dt-utils/blob/c80bde9fd6bdabc77e6c76035f655925caf5e8af/src/sessionDB/index.ts#L50)
137+
Defined in: [sessionDB/index.ts:50](https://github.com/DTStack/dt-utils/blob/master/src/sessionDB/index.ts#L50)
138138

139139
向 sessionStorage 添加多个项目
140140

@@ -154,7 +154,7 @@ Defined in: [sessionDB/index.ts:50](https://github.com/jin-sir/dt-utils/blob/c80
154154

155155
> `static` **set**(`key`, `value`): `void`
156156
157-
Defined in: [sessionDB/index.ts:56](https://github.com/jin-sir/dt-utils/blob/c80bde9fd6bdabc77e6c76035f655925caf5e8af/src/sessionDB/index.ts#L56)
157+
Defined in: [sessionDB/index.ts:56](https://github.com/DTStack/dt-utils/blob/master/src/sessionDB/index.ts#L56)
158158

159159
通过键在 sessionStorage 中存储数据值
160160

0 commit comments

Comments
 (0)