@kevisual/router 0.0.70 → 0.0.72
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/app.d.ts +5 -0
- package/dist/app.js +19504 -0
- package/dist/opencode.d.ts +5 -2
- package/dist/opencode.js +13381 -14322
- package/dist/router-browser.d.ts +22 -20
- package/dist/router-browser.js +14044 -15137
- package/dist/router-define.d.ts +394 -3
- package/dist/router-define.js +126 -124
- package/dist/router-simple.js +665 -759
- package/dist/router.d.ts +22 -20
- package/dist/router.js +17810 -21180
- package/dist/ws.d.ts +5 -2
- package/dist/ws.js +2980 -150
- package/package.json +19 -54
- package/src/app.ts +2 -2
- package/src/browser.ts +1 -1
- package/src/index.ts +1 -1
- package/src/route.ts +21 -17
- package/src/router-define.ts +1 -1
- package/src/utils/random.ts +8 -0
package/dist/opencode.d.ts
CHANGED
|
@@ -32,6 +32,9 @@ type RouteContext<T = {
|
|
|
32
32
|
query?: {
|
|
33
33
|
[key: string]: any;
|
|
34
34
|
};
|
|
35
|
+
args?: {
|
|
36
|
+
[key: string]: any;
|
|
37
|
+
};
|
|
35
38
|
/** return body */
|
|
36
39
|
body?: number | string | Object;
|
|
37
40
|
forward?: (response: {
|
|
@@ -167,7 +170,7 @@ declare class Route<U = {
|
|
|
167
170
|
define<T extends {
|
|
168
171
|
[key: string]: any;
|
|
169
172
|
} = RouterContextT>(path: string, key: string, fn: Run<T & U>): this;
|
|
170
|
-
update(opts: DefineRouteOpts,
|
|
173
|
+
update(opts: DefineRouteOpts, onlyUpdateList?: string[]): this;
|
|
171
174
|
addTo(router: QueryRouter | {
|
|
172
175
|
add: (route: Route) => void;
|
|
173
176
|
[key: string]: any;
|
|
@@ -205,7 +208,7 @@ declare class QueryRouter {
|
|
|
205
208
|
* remove route by id
|
|
206
209
|
* @param uniqueId
|
|
207
210
|
*/
|
|
208
|
-
removeById(
|
|
211
|
+
removeById(uniqueId: string): void;
|
|
209
212
|
/**
|
|
210
213
|
* 执行route
|
|
211
214
|
* @param path
|