dlzn-ui 2.0.103 → 2.0.104
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/hooks/useList/index.d.ts +7 -6
- package/package.json +1 -1
- package/types/globle.d.ts +4 -4
package/hooks/useList/index.d.ts
CHANGED
|
@@ -11,7 +11,7 @@ declare const builtInPromiseMap: {
|
|
|
11
11
|
Watched: object | import('vue').WatchSource<unknown>;
|
|
12
12
|
StateExport: Ref<unknown, unknown>;
|
|
13
13
|
ComputedExport: ComputedRef<unknown>;
|
|
14
|
-
}>, TreeOptionsItem[], Record<string, any>[]>>;
|
|
14
|
+
}>, TreeOptionsItem<number>[], Record<string, any>[]>>;
|
|
15
15
|
systemMenuTree: () => import('alova').Method<import('alova').RespondedAlovaGenerics<import('alova').AlovaGenerics<any, any, import('alova/fetch').FetchRequestInit, Response, Headers, import('alova').AlovaDefaultCacheAdapter, import('alova').AlovaDefaultCacheAdapter, {
|
|
16
16
|
name: "Vue";
|
|
17
17
|
State: Ref<unknown, unknown>;
|
|
@@ -19,14 +19,15 @@ declare const builtInPromiseMap: {
|
|
|
19
19
|
Watched: object | import('vue').WatchSource<unknown>;
|
|
20
20
|
StateExport: Ref<unknown, unknown>;
|
|
21
21
|
ComputedExport: ComputedRef<unknown>;
|
|
22
|
-
}>, TreeOptionsItem[], Record<string, any>[]>>;
|
|
22
|
+
}>, TreeOptionsItem<string>[], Record<string, any>[]>>;
|
|
23
23
|
};
|
|
24
|
-
|
|
25
|
-
export type UseListAllKey = keyof typeof promiseMap;
|
|
24
|
+
export type UseListAllKey = keyof MergedUseListPromiseMap;
|
|
26
25
|
export type UseListKey = Exclude<UseListAllKey, UseListTreeKey>;
|
|
27
|
-
export type
|
|
26
|
+
export type UseListResult<K extends keyof MergedUseListPromiseMap> = Awaited<ReturnType<MergedUseListPromiseMap[K]>>;
|
|
27
|
+
export type UseListTreeKey = TreeKeys<MergedUseListPromiseMap>;
|
|
28
|
+
type MergedUseListPromiseMap = typeof builtInPromiseMap & UseListPromiseMap;
|
|
28
29
|
export declare function clear(): void;
|
|
29
|
-
export default function useList(key:
|
|
30
|
+
export default function useList<K extends UseListAllKey>(key: K): Ref<UseListResult<K>>;
|
|
30
31
|
export declare function useListLabel(key: UseListKey): ComputedRef<string[]>;
|
|
31
32
|
export declare function useListLabel(key: UseListKey, value: PettyPrimitive): ComputedRef<string>;
|
|
32
33
|
export declare function useListLabel(key: UseListKey, value: Array<PettyPrimitive>): ComputedRef<string[]>;
|
package/package.json
CHANGED
package/types/globle.d.ts
CHANGED
|
@@ -8,17 +8,17 @@ declare global {
|
|
|
8
8
|
}>
|
|
9
9
|
type OmitFirstParameters<T extends (...args: any) => any> =
|
|
10
10
|
Parameters<T> extends [any, ...infer Rest] ? Rest : never
|
|
11
|
-
interface OptionsItem {
|
|
11
|
+
interface OptionsItem<T extends number | string = string> {
|
|
12
12
|
[key: string]: any
|
|
13
13
|
label: string
|
|
14
|
-
value:
|
|
14
|
+
value: T
|
|
15
15
|
}
|
|
16
16
|
type PettyPrimitive = null | number | string | undefined
|
|
17
|
-
interface TreeOptionsItem {
|
|
17
|
+
interface TreeOptionsItem<T extends number | string = string> {
|
|
18
18
|
[key: string]: any
|
|
19
19
|
children?: TreeOptionsItem[]
|
|
20
20
|
label: string
|
|
21
|
-
value:
|
|
21
|
+
value: T
|
|
22
22
|
}
|
|
23
23
|
interface Window {
|
|
24
24
|
pluginWebUpdateNotice_?: {
|