auto-vue-manual 0.2.32 → 0.2.33

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.
@@ -2,7 +2,7 @@ import { useCopy } from './useCopy';
2
2
  import { useForm, UseFormApi } from './useForm';
3
3
  import { useAutoForm } from './useAutoForm';
4
4
  import { useLoading } from './useLoading';
5
- import { useSelect } from './useSelect';
5
+ import { useSelect, FormatOptions } from './useSelect';
6
6
  import { useTheme } from './useTheme';
7
7
  import { useCrudPage, TableInstance, FormModalInstance } from './useCrudPage';
8
8
  import { useLineChart } from './useLineChart';
@@ -51,7 +51,7 @@ export declare const HooksUtils: {
51
51
  labelKey?: string;
52
52
  valueKey?: string;
53
53
  autoRefresh?: boolean;
54
- formatOptions?: (data: T[]) => T[];
54
+ formatOptions?: FormatOptions<T>;
55
55
  }) => {
56
56
  value: WritableComputedRef<V, V>;
57
57
  id: WritableComputedRef<number, number>;
@@ -25,11 +25,15 @@ type ValueType = string | number | (string | number)[] | undefined;
25
25
  * filterOptions: (keyword: string, remoteMethod?: (kw: string) => void) => void
26
26
  * } 下拉框
27
27
  */
28
+ export type FormatOptions<T> = (data: T[]) => (T & {
29
+ label: string;
30
+ value: string | number;
31
+ })[];
28
32
  export declare const useSelect: <T extends Record<string, any>, V = ValueType>(propValue: Ref<ValueType>, emit: any, cacheOption?: CacheOptions, otherOptions?: {
29
33
  labelKey?: string;
30
34
  valueKey?: string;
31
35
  autoRefresh?: boolean;
32
- formatOptions?: (data: T[]) => T[];
36
+ formatOptions?: FormatOptions<T>;
33
37
  }) => {
34
38
  value: WritableComputedRef<V, V>;
35
39
  id: WritableComputedRef<number, number>;
package/dist/version.js CHANGED
@@ -1 +1 @@
1
- export const __VERSION__ = "0.2.31'
1
+ export const __VERSION__ = "0.2.32'
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "auto-vue-manual",
3
- "version": "0.2.32",
3
+ "version": "0.2.33",
4
4
  "type": "module",
5
5
  "main": "./dist/auto-vue-manual.umd.js",
6
6
  "module": "./dist/auto-vue-manual.es.js",