@maxax/ui 1.1.12 → 1.1.13

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.
@@ -1,3 +1,4 @@
1
+ import { Recordable } from '@maxax/types';
1
2
  import { BasicCheckboxOption } from '../basic-checkbox/interface';
2
3
  declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
3
4
  value: {
@@ -28,6 +29,48 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
28
29
  type: BooleanConstructor;
29
30
  default: boolean;
30
31
  };
32
+ labelField: {
33
+ type: import('vue').PropType<import('@maxax/types').KeyValueType>;
34
+ default: string;
35
+ };
36
+ valueField: {
37
+ type: import('vue').PropType<import('@maxax/types').KeyValueType>;
38
+ default: string;
39
+ };
40
+ immediate: {
41
+ type: BooleanConstructor;
42
+ default: boolean;
43
+ };
44
+ api: {
45
+ type: import('vue').PropType<(...arg: any[]) => Promise<any>>;
46
+ default: undefined;
47
+ };
48
+ dynamicApi: {
49
+ type: import('vue').PropType<(params?: Recordable<any> | undefined) => (...arg: any[]) => Promise<any>>;
50
+ default: undefined;
51
+ };
52
+ beforeFetch: {
53
+ type: import('vue').PropType<import('@maxax/types').Fn<any, any>>;
54
+ default: undefined;
55
+ };
56
+ afterFetch: {
57
+ type: import('vue').PropType<import('@maxax/types').Fn<any, any>>;
58
+ default: undefined;
59
+ };
60
+ handleSearchInfoFn: {
61
+ type: import('vue').PropType<import('@maxax/types').Fn<any, any>>;
62
+ default: undefined;
63
+ };
64
+ searchInfo: {
65
+ type: import('vue').PropType<Recordable<any>>;
66
+ default: () => {};
67
+ };
68
+ fetchSetting: {
69
+ type: import('vue').PropType<Partial<import('./interface').BasicCheckboxGroupFetchSetting>>;
70
+ default: () => {
71
+ listField: string;
72
+ };
73
+ };
31
74
  }>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
32
75
  'update:value': (_value: Array<string | number | boolean>) => true;
33
76
  'all-change': (_value: Array<string | number | boolean>, _ev: Event) => true;
@@ -67,6 +110,48 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
67
110
  type: BooleanConstructor;
68
111
  default: boolean;
69
112
  };
113
+ labelField: {
114
+ type: import('vue').PropType<import('@maxax/types').KeyValueType>;
115
+ default: string;
116
+ };
117
+ valueField: {
118
+ type: import('vue').PropType<import('@maxax/types').KeyValueType>;
119
+ default: string;
120
+ };
121
+ immediate: {
122
+ type: BooleanConstructor;
123
+ default: boolean;
124
+ };
125
+ api: {
126
+ type: import('vue').PropType<(...arg: any[]) => Promise<any>>;
127
+ default: undefined;
128
+ };
129
+ dynamicApi: {
130
+ type: import('vue').PropType<(params?: Recordable<any> | undefined) => (...arg: any[]) => Promise<any>>;
131
+ default: undefined;
132
+ };
133
+ beforeFetch: {
134
+ type: import('vue').PropType<import('@maxax/types').Fn<any, any>>;
135
+ default: undefined;
136
+ };
137
+ afterFetch: {
138
+ type: import('vue').PropType<import('@maxax/types').Fn<any, any>>;
139
+ default: undefined;
140
+ };
141
+ handleSearchInfoFn: {
142
+ type: import('vue').PropType<import('@maxax/types').Fn<any, any>>;
143
+ default: undefined;
144
+ };
145
+ searchInfo: {
146
+ type: import('vue').PropType<Recordable<any>>;
147
+ default: () => {};
148
+ };
149
+ fetchSetting: {
150
+ type: import('vue').PropType<Partial<import('./interface').BasicCheckboxGroupFetchSetting>>;
151
+ default: () => {
152
+ listField: string;
153
+ };
154
+ };
70
155
  }>> & Readonly<{
71
156
  onChange?: ((_value: (string | number | boolean)[], _ev: Event) => any) | undefined;
72
157
  "onUpdate:value"?: ((_value: (string | number | boolean)[]) => any) | undefined;
@@ -75,6 +160,16 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
75
160
  value: (string | number | boolean)[];
76
161
  defaultValue: (string | number | boolean)[];
77
162
  disabled: boolean;
163
+ labelField: import('@maxax/types').KeyValueType;
164
+ beforeFetch: import('@maxax/types').Fn<any, any>;
165
+ afterFetch: import('@maxax/types').Fn<any, any>;
166
+ immediate: boolean;
167
+ handleSearchInfoFn: import('@maxax/types').Fn<any, any>;
168
+ valueField: import('@maxax/types').KeyValueType;
169
+ api: (...arg: any[]) => Promise<any>;
170
+ dynamicApi: (params?: Recordable<any> | undefined) => (...arg: any[]) => Promise<any>;
171
+ searchInfo: Recordable<any>;
172
+ fetchSetting: Partial<import('./interface').BasicCheckboxGroupFetchSetting>;
78
173
  showCheckboxAll: boolean;
79
174
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
80
175
  export default _default;
@@ -1 +1 @@
1
- {"version":3,"file":"BasicCheckboxGroup.d.ts","sourceRoot":"","sources":["../../../src/components/basic-checkbox-group/BasicCheckboxGroup.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6BAQzC,MAAM,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC;2BAClC,MAAM,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC,OAAO,KAAK;IACnE;;;;;OAKG;qBACc,MAAM,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC,OAAO,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAZjE,wBAyHE"}
1
+ {"version":3,"file":"BasicCheckboxGroup.d.ts","sourceRoot":"","sources":["../../../src/components/basic-checkbox-group/BasicCheckboxGroup.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AAK9C,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6BAQzC,MAAM,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC;2BAClC,MAAM,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC,OAAO,KAAK;IACnE;;;;;OAKG;qBACc,MAAM,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC,OAAO,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAZjE,wBAuLE"}
@@ -1,5 +1,9 @@
1
1
  import { ExtractPropTypes, PropType, Slots } from 'vue';
2
+ import { Fn, KeyValueType, Recordable } from '@maxax/types';
2
3
  import { BasicCheckboxOption } from '../basic-checkbox/interface';
4
+ export interface BasicCheckboxGroupFetchSetting {
5
+ listField: string;
6
+ }
3
7
  export declare const basicCheckboxGroupProps: {
4
8
  /**
5
9
  * @zh 绑定值
@@ -61,6 +65,48 @@ export declare const basicCheckboxGroupProps: {
61
65
  type: BooleanConstructor;
62
66
  default: boolean;
63
67
  };
68
+ labelField: {
69
+ type: PropType<KeyValueType>;
70
+ default: string;
71
+ };
72
+ valueField: {
73
+ type: PropType<KeyValueType>;
74
+ default: string;
75
+ };
76
+ immediate: {
77
+ type: BooleanConstructor;
78
+ default: boolean;
79
+ };
80
+ api: {
81
+ type: PropType<(...arg: any[]) => Promise<any>>;
82
+ default: undefined;
83
+ };
84
+ dynamicApi: {
85
+ type: PropType<(params?: Recordable) => (...arg: any[]) => Promise<any>>;
86
+ default: undefined;
87
+ };
88
+ beforeFetch: {
89
+ type: PropType<Fn<any, any>>;
90
+ default: undefined;
91
+ };
92
+ afterFetch: {
93
+ type: PropType<Fn<any, any>>;
94
+ default: undefined;
95
+ };
96
+ handleSearchInfoFn: {
97
+ type: PropType<Fn<any, any>>;
98
+ default: undefined;
99
+ };
100
+ searchInfo: {
101
+ type: PropType<Recordable<any>>;
102
+ default: () => {};
103
+ };
104
+ fetchSetting: {
105
+ type: PropType<Partial<BasicCheckboxGroupFetchSetting>>;
106
+ default: () => {
107
+ listField: string;
108
+ };
109
+ };
64
110
  };
65
111
  export type BasicCheckboxGroupProps = Partial<ExtractPropTypes<typeof basicCheckboxGroupProps>>;
66
112
  export interface BasicCheckboxGroupContext {
@@ -1 +1 @@
1
- {"version":3,"file":"interface.d.ts","sourceRoot":"","sources":["../../../src/components/basic-checkbox-group/interface.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,KAAK,CAAA;AAC5D,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAA;AAEtE,eAAO,MAAM,uBAAuB;IAClC;;;;OAIG;;;;;IAKH;;;OAGG;;;;;;IAMH;;;;OAIG;;;;;IAKH;;;;OAIG;;;;IAIH;;;OAGG;;;;;IAKH;;;OAGG;;;;;IAKH;;;;OAIG;;;;;CAKJ,CAAA;AAED,MAAM,MAAM,uBAAuB,GAAG,OAAO,CAAC,gBAAgB,CAAC,OAAO,uBAAuB,CAAC,CAAC,CAAA;AAE/F,MAAM,WAAW,yBAAyB;IACxC,IAAI,EAAE,MAAM,CAAA;IACZ,aAAa,EAAE,KAAK,CAAC,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC,CAAA;IAC/C,QAAQ,EAAE,OAAO,CAAA;IACjB,OAAO,EAAE,OAAO,CAAA;IAChB,KAAK,EAAE,KAAK,CAAA;IACZ,YAAY,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC,EAAE,CAAC,EAAE,KAAK,KAAK,IAAI,CAAA;CAC1E"}
1
+ {"version":3,"file":"interface.d.ts","sourceRoot":"","sources":["../../../src/components/basic-checkbox-group/interface.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,KAAK,CAAA;AAC5D,OAAO,KAAK,EAAE,EAAE,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AAChE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAA;AAEtE,MAAM,WAAW,8BAA8B;IAE7C,SAAS,EAAE,MAAM,CAAA;CAClB;AAED,eAAO,MAAM,uBAAuB;IAClC;;;;OAIG;;;;;IAKH;;;OAGG;;;;;;IAMH;;;;OAIG;;;;;IAKH;;;;OAIG;;;;IAIH;;;OAGG;;;;;IAKH;;;OAGG;;;;;IAKH;;;;OAIG;;;;;;;;;;;;;;;;;;gCAoBmC,GAAG,EAAE,KAAK,QAAQ,GAAG,CAAC;;;;iCAKrB,UAAU,cAAc,GAAG,EAAE,KAAK,QAAQ,GAAG,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;CA8BtF,CAAA;AAED,MAAM,MAAM,uBAAuB,GAAG,OAAO,CAAC,gBAAgB,CAAC,OAAO,uBAAuB,CAAC,CAAC,CAAA;AAE/F,MAAM,WAAW,yBAAyB;IACxC,IAAI,EAAE,MAAM,CAAA;IACZ,aAAa,EAAE,KAAK,CAAC,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC,CAAA;IAC/C,QAAQ,EAAE,OAAO,CAAA;IACjB,OAAO,EAAE,OAAO,CAAA;IAChB,KAAK,EAAE,KAAK,CAAA;IACZ,YAAY,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC,EAAE,CAAC,EAAE,KAAK,KAAK,IAAI,CAAA;CAC1E"}
@@ -1,3 +1,4 @@
1
+ import { Recordable } from '@maxax/types';
1
2
  import { BasicRadioOption } from './interface';
2
3
  declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
3
4
  size: {
@@ -20,6 +21,48 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
20
21
  type: import('vue').PropType<(string | number | BasicRadioOption)[]>;
21
22
  default: () => never[];
22
23
  };
24
+ labelField: {
25
+ type: import('vue').PropType<import('@maxax/types').KeyValueType>;
26
+ default: string;
27
+ };
28
+ valueField: {
29
+ type: import('vue').PropType<import('@maxax/types').KeyValueType>;
30
+ default: string;
31
+ };
32
+ immediate: {
33
+ type: BooleanConstructor;
34
+ default: boolean;
35
+ };
36
+ api: {
37
+ type: import('vue').PropType<(...arg: any[]) => Promise<any>>;
38
+ default: undefined;
39
+ };
40
+ dynamicApi: {
41
+ type: import('vue').PropType<(params?: Recordable<any> | undefined) => (...arg: any[]) => Promise<any>>;
42
+ default: undefined;
43
+ };
44
+ beforeFetch: {
45
+ type: import('vue').PropType<import('@maxax/types').Fn<any, any>>;
46
+ default: undefined;
47
+ };
48
+ afterFetch: {
49
+ type: import('vue').PropType<import('@maxax/types').Fn<any, any>>;
50
+ default: undefined;
51
+ };
52
+ handleSearchInfoFn: {
53
+ type: import('vue').PropType<import('@maxax/types').Fn<any, any>>;
54
+ default: undefined;
55
+ };
56
+ searchInfo: {
57
+ type: import('vue').PropType<Recordable<any>>;
58
+ default: () => {};
59
+ };
60
+ fetchSetting: {
61
+ type: import('vue').PropType<Partial<import('./interface').BasicRadioGroupFetchSetting>>;
62
+ default: () => {
63
+ listField: string;
64
+ };
65
+ };
23
66
  'onUpdate:value': {
24
67
  type: import('vue').PropType<import('./interface').OnUpdateValue>;
25
68
  default: undefined;
@@ -53,6 +96,48 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
53
96
  type: import('vue').PropType<(string | number | BasicRadioOption)[]>;
54
97
  default: () => never[];
55
98
  };
99
+ labelField: {
100
+ type: import('vue').PropType<import('@maxax/types').KeyValueType>;
101
+ default: string;
102
+ };
103
+ valueField: {
104
+ type: import('vue').PropType<import('@maxax/types').KeyValueType>;
105
+ default: string;
106
+ };
107
+ immediate: {
108
+ type: BooleanConstructor;
109
+ default: boolean;
110
+ };
111
+ api: {
112
+ type: import('vue').PropType<(...arg: any[]) => Promise<any>>;
113
+ default: undefined;
114
+ };
115
+ dynamicApi: {
116
+ type: import('vue').PropType<(params?: Recordable<any> | undefined) => (...arg: any[]) => Promise<any>>;
117
+ default: undefined;
118
+ };
119
+ beforeFetch: {
120
+ type: import('vue').PropType<import('@maxax/types').Fn<any, any>>;
121
+ default: undefined;
122
+ };
123
+ afterFetch: {
124
+ type: import('vue').PropType<import('@maxax/types').Fn<any, any>>;
125
+ default: undefined;
126
+ };
127
+ handleSearchInfoFn: {
128
+ type: import('vue').PropType<import('@maxax/types').Fn<any, any>>;
129
+ default: undefined;
130
+ };
131
+ searchInfo: {
132
+ type: import('vue').PropType<Recordable<any>>;
133
+ default: () => {};
134
+ };
135
+ fetchSetting: {
136
+ type: import('vue').PropType<Partial<import('./interface').BasicRadioGroupFetchSetting>>;
137
+ default: () => {
138
+ listField: string;
139
+ };
140
+ };
56
141
  'onUpdate:value': {
57
142
  type: import('vue').PropType<import('./interface').OnUpdateValue>;
58
143
  default: undefined;
@@ -72,8 +157,18 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
72
157
  onChange: import('./interface').OnUpdateValue;
73
158
  options: (string | number | BasicRadioOption)[];
74
159
  disabled: boolean;
160
+ labelField: import('@maxax/types').KeyValueType;
161
+ beforeFetch: import('@maxax/types').Fn<any, any>;
162
+ afterFetch: import('@maxax/types').Fn<any, any>;
75
163
  'onUpdate:value': import('./interface').OnUpdateValue;
76
164
  onUpdateValue: import('./interface').OnUpdateValue;
165
+ immediate: boolean;
166
+ handleSearchInfoFn: import('@maxax/types').Fn<any, any>;
167
+ valueField: import('@maxax/types').KeyValueType;
168
+ api: (...arg: any[]) => Promise<any>;
169
+ dynamicApi: (params?: Recordable<any> | undefined) => (...arg: any[]) => Promise<any>;
170
+ searchInfo: Recordable<any>;
171
+ fetchSetting: Partial<import('./interface').BasicRadioGroupFetchSetting>;
77
172
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
78
173
  export default _default;
79
174
  //# sourceMappingURL=BasicRadioGroup.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"BasicRadioGroup.d.ts","sourceRoot":"","sources":["../../../src/components/basic-radio-group/BasicRadioGroup.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,gBAAgB,EAAqB,MAAM,aAAa,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGtE,wBA+DE"}
1
+ {"version":3,"file":"BasicRadioGroup.d.ts","sourceRoot":"","sources":["../../../src/components/basic-radio-group/BasicRadioGroup.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AAM9C,OAAO,KAAK,EAAE,gBAAgB,EAAqB,MAAM,aAAa,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGtE,wBA8HE"}
@@ -1,4 +1,5 @@
1
1
  import { ExtractPropTypes, PropType, Slots } from 'vue';
2
+ import { Fn, KeyValueType, Recordable } from '@maxax/types';
2
3
  import { MaybeArray, RenderContent, Size } from '../../types';
3
4
  export interface BasicRadioOption {
4
5
  /**
@@ -25,6 +26,9 @@ export interface BasicRadioOption {
25
26
  export type OnUpdateValue = (value: string & number & boolean) => void;
26
27
  export type OnUpdateValueImpl = (value: string | number | boolean) => void;
27
28
  export type OnEventValueImpl = MaybeArray<OnUpdateValue>;
29
+ export interface BasicRadioGroupFetchSetting {
30
+ listField: string;
31
+ }
28
32
  export declare const basicRadioGroupProps: {
29
33
  size: {
30
34
  type: PropType<Size>;
@@ -46,6 +50,48 @@ export declare const basicRadioGroupProps: {
46
50
  type: PropType<(string | number | BasicRadioOption)[]>;
47
51
  default: () => never[];
48
52
  };
53
+ labelField: {
54
+ type: PropType<KeyValueType>;
55
+ default: string;
56
+ };
57
+ valueField: {
58
+ type: PropType<KeyValueType>;
59
+ default: string;
60
+ };
61
+ immediate: {
62
+ type: BooleanConstructor;
63
+ default: boolean;
64
+ };
65
+ api: {
66
+ type: PropType<(...arg: any[]) => Promise<any>>;
67
+ default: undefined;
68
+ };
69
+ dynamicApi: {
70
+ type: PropType<(params?: Recordable) => (...arg: any[]) => Promise<any>>;
71
+ default: undefined;
72
+ };
73
+ beforeFetch: {
74
+ type: PropType<Fn<any, any>>;
75
+ default: undefined;
76
+ };
77
+ afterFetch: {
78
+ type: PropType<Fn<any, any>>;
79
+ default: undefined;
80
+ };
81
+ handleSearchInfoFn: {
82
+ type: PropType<Fn<any, any>>;
83
+ default: undefined;
84
+ };
85
+ searchInfo: {
86
+ type: PropType<Recordable<any>>;
87
+ default: () => {};
88
+ };
89
+ fetchSetting: {
90
+ type: PropType<Partial<BasicRadioGroupFetchSetting>>;
91
+ default: () => {
92
+ listField: string;
93
+ };
94
+ };
49
95
  'onUpdate:value': {
50
96
  type: PropType<OnUpdateValue>;
51
97
  default: undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"interface.d.ts","sourceRoot":"","sources":["../../../src/components/basic-radio-group/interface.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,KAAK,CAAA;AAC5D,OAAO,KAAK,EAAE,UAAU,EAAE,aAAa,EAAE,IAAI,EAAE,MAAM,aAAa,CAAA;AAElE,MAAM,WAAW,gBAAgB;IAC/B;;;OAGG;IACH,KAAK,CAAC,EAAE,aAAa,CAAA;IACrB;;;OAGG;IACH,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,CAAA;IAChC;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB;;;OAGG;IACH,KAAK,CAAC,EAAE,GAAG,CAAA;CACZ;AAED,MAAM,MAAM,aAAa,GAAG,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,KAAK,IAAI,CAAA;AAEtE,MAAM,MAAM,iBAAiB,GAAG,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,KAAK,IAAI,CAAA;AAE1E,MAAM,MAAM,gBAAgB,GAAG,UAAU,CAAC,aAAa,CAAC,CAAA;AAExD,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAiChC,CAAA;AAED,MAAM,MAAM,oBAAoB,GAAG,OAAO,CAAC,gBAAgB,CAAC,OAAO,oBAAoB,CAAC,CAAC,CAAA;AAEzF,MAAM,WAAW,sBAAsB;IACrC,IAAI,EAAE,MAAM,CAAA;IACZ,cAAc,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,SAAS,CAAA;IACrD,QAAQ,EAAE,OAAO,CAAA;IACjB,KAAK,EAAE,KAAK,CAAA;IACZ,YAAY,EAAE,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,EAAE,CAAC,EAAE,KAAK,KAAK,IAAI,CAAA;CACnE"}
1
+ {"version":3,"file":"interface.d.ts","sourceRoot":"","sources":["../../../src/components/basic-radio-group/interface.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,KAAK,CAAA;AAC5D,OAAO,KAAK,EAAE,EAAE,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AAChE,OAAO,KAAK,EAAE,UAAU,EAAE,aAAa,EAAE,IAAI,EAAE,MAAM,aAAa,CAAA;AAElE,MAAM,WAAW,gBAAgB;IAC/B;;;OAGG;IACH,KAAK,CAAC,EAAE,aAAa,CAAA;IACrB;;;OAGG;IACH,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,CAAA;IAChC;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB;;;OAGG;IACH,KAAK,CAAC,EAAE,GAAG,CAAA;CACZ;AAED,MAAM,MAAM,aAAa,GAAG,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,KAAK,IAAI,CAAA;AAEtE,MAAM,MAAM,iBAAiB,GAAG,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,KAAK,IAAI,CAAA;AAE1E,MAAM,MAAM,gBAAgB,GAAG,UAAU,CAAC,aAAa,CAAC,CAAA;AAExD,MAAM,WAAW,2BAA2B;IAE1C,SAAS,EAAE,MAAM,CAAA;CAClB;AAED,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gCAoCO,GAAG,EAAE,KAAK,QAAQ,GAAG,CAAC;;;;iCAKrB,UAAU,cAAc,GAAG,EAAE,KAAK,QAAQ,GAAG,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA0CtF,CAAA;AAED,MAAM,MAAM,oBAAoB,GAAG,OAAO,CAAC,gBAAgB,CAAC,OAAO,oBAAoB,CAAC,CAAC,CAAA;AAEzF,MAAM,WAAW,sBAAsB;IACrC,IAAI,EAAE,MAAM,CAAA;IACZ,cAAc,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,SAAS,CAAA;IACrD,QAAQ,EAAE,OAAO,CAAA;IACjB,KAAK,EAAE,KAAK,CAAA;IACZ,YAAY,EAAE,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,EAAE,CAAC,EAAE,KAAK,KAAK,IAAI,CAAA;CACnE"}
package/dist/index.cjs CHANGED
@@ -7379,6 +7379,56 @@ const basicCheckboxGroupProps = {
7379
7379
  showCheckboxAll: {
7380
7380
  type: Boolean,
7381
7381
  default: true
7382
+ },
7383
+ labelField: {
7384
+ type: [String, Number, Function],
7385
+ default: "label"
7386
+ },
7387
+ valueField: {
7388
+ type: [String, Number, Function],
7389
+ default: "value"
7390
+ },
7391
+ // 立即请求接口
7392
+ immediate: {
7393
+ type: Boolean,
7394
+ default: true
7395
+ },
7396
+ // 接口请求对象
7397
+ api: {
7398
+ type: Function,
7399
+ default: void 0
7400
+ },
7401
+ // 动态请求
7402
+ dynamicApi: {
7403
+ type: Function,
7404
+ default: void 0
7405
+ },
7406
+ // 请求之前处理参数
7407
+ beforeFetch: {
7408
+ type: Function,
7409
+ default: void 0
7410
+ },
7411
+ // 自定义处理接口返回参数
7412
+ afterFetch: {
7413
+ type: Function,
7414
+ default: void 0
7415
+ },
7416
+ // 查询条件请求之前处理
7417
+ handleSearchInfoFn: {
7418
+ type: Function,
7419
+ default: void 0
7420
+ },
7421
+ // 额外的请求参数
7422
+ searchInfo: {
7423
+ type: Object,
7424
+ default: () => ({})
7425
+ },
7426
+ // 请求接口配置
7427
+ fetchSetting: {
7428
+ type: Object,
7429
+ default: () => ({
7430
+ listField: "resultList"
7431
+ })
7382
7432
  }
7383
7433
  };
7384
7434
  function _isSlot$2(s) {
@@ -7412,19 +7462,33 @@ const BasicCheckboxGroup = /* @__PURE__ */ vue.defineComponent({
7412
7462
  const {
7413
7463
  disabled
7414
7464
  } = vue.toRefs(props);
7465
+ const loading = vue.ref(false);
7466
+ const dataSourceRef = vue.ref([]);
7467
+ const rawDataSourceRef = vue.ref({});
7468
+ const searchInfoRef = vue.ref({});
7415
7469
  const $value = vue.ref(props.defaultValue);
7416
7470
  const computedValue = vue.computed(() => utils.isArray(props.value) ? props.value : $value.value);
7417
7471
  const isMaxed = vue.computed(() => props.max === void 0 ? false : computedValue.value.length >= props.max);
7418
7472
  const options = vue.computed(() => {
7419
7473
  var _a;
7420
- return ((_a = props.options) != null ? _a : []).map((option) => {
7474
+ const {
7475
+ labelField,
7476
+ valueField
7477
+ } = props;
7478
+ const source = (_a = dataSourceRef.value && dataSourceRef.value.length > 0 ? dataSourceRef.value : props.options) != null ? _a : [];
7479
+ return source.map((option) => {
7421
7480
  if (utils.isString(option) || utils.isNumber(option)) {
7422
7481
  return {
7423
7482
  label: option,
7424
7483
  value: option
7425
7484
  };
7426
7485
  }
7427
- return option;
7486
+ const opt = option;
7487
+ return {
7488
+ ...opt,
7489
+ label: utils.getValueKey(labelField, opt),
7490
+ value: utils.getValueKey(valueField, opt)
7491
+ };
7428
7492
  });
7429
7493
  });
7430
7494
  const allChecked = vue.ref(false);
@@ -7449,6 +7513,52 @@ const BasicCheckboxGroup = /* @__PURE__ */ vue.defineComponent({
7449
7513
  emit("all-change", newValue, e);
7450
7514
  };
7451
7515
  const cls = vue.computed(() => [b(), is(`direction-${props.direction}`)]);
7516
+ vue.watch(() => props.searchInfo, () => {
7517
+ fetch2();
7518
+ }, {
7519
+ deep: true,
7520
+ immediate: props.immediate
7521
+ });
7522
+ async function fetch2(opt) {
7523
+ const {
7524
+ api,
7525
+ dynamicApi,
7526
+ searchInfo,
7527
+ fetchSetting,
7528
+ beforeFetch,
7529
+ afterFetch,
7530
+ handleSearchInfoFn
7531
+ } = props;
7532
+ if (!api && !dynamicApi || loading.value) return;
7533
+ try {
7534
+ loading.value = true;
7535
+ const {
7536
+ listField
7537
+ } = {
7538
+ listField: "resultList",
7539
+ ...fetchSetting
7540
+ };
7541
+ const searchInfoParams = handleSearchInfoFn ? handleSearchInfoFn() : {};
7542
+ let params = lodashEs.merge(searchInfoParams, searchInfo, opt != null ? opt : {});
7543
+ if (beforeFetch && utils.isFunction(beforeFetch)) {
7544
+ params = await beforeFetch(params) || params;
7545
+ }
7546
+ searchInfoRef.value = params;
7547
+ const apiFn = api || (dynamicApi == null ? void 0 : dynamicApi(params));
7548
+ const res = await (apiFn == null ? void 0 : apiFn(params));
7549
+ rawDataSourceRef.value = res.data;
7550
+ const isArrayResult = Array.isArray(res.data);
7551
+ let resultItems = isArrayResult ? res.data : lodashEs.get(res.data, listField);
7552
+ if (afterFetch && utils.isFunction(afterFetch)) {
7553
+ resultItems = await afterFetch(resultItems) || resultItems;
7554
+ }
7555
+ dataSourceRef.value = resultItems;
7556
+ } catch (error) {
7557
+ console.error(error);
7558
+ } finally {
7559
+ loading.value = false;
7560
+ }
7561
+ }
7452
7562
  vue.watch(() => props.value, (curValue) => {
7453
7563
  if (utils.isArray(curValue)) {
7454
7564
  $value.value = [...curValue];
@@ -8683,6 +8793,56 @@ const basicRadioGroupProps = {
8683
8793
  type: Array,
8684
8794
  default: () => []
8685
8795
  },
8796
+ labelField: {
8797
+ type: [String, Number, Function],
8798
+ default: "label"
8799
+ },
8800
+ valueField: {
8801
+ type: [String, Number, Function],
8802
+ default: "value"
8803
+ },
8804
+ // 立即请求接口
8805
+ immediate: {
8806
+ type: Boolean,
8807
+ default: true
8808
+ },
8809
+ // 接口请求对象
8810
+ api: {
8811
+ type: Function,
8812
+ default: void 0
8813
+ },
8814
+ // 动态请求
8815
+ dynamicApi: {
8816
+ type: Function,
8817
+ default: void 0
8818
+ },
8819
+ // 请求之前处理参数
8820
+ beforeFetch: {
8821
+ type: Function,
8822
+ default: void 0
8823
+ },
8824
+ // 自定义处理接口返回参数
8825
+ afterFetch: {
8826
+ type: Function,
8827
+ default: void 0
8828
+ },
8829
+ // 查询条件请求之前处理
8830
+ handleSearchInfoFn: {
8831
+ type: Function,
8832
+ default: void 0
8833
+ },
8834
+ // 额外的请求参数
8835
+ searchInfo: {
8836
+ type: Object,
8837
+ default: () => ({})
8838
+ },
8839
+ // 请求接口配置
8840
+ fetchSetting: {
8841
+ type: Object,
8842
+ default: () => ({
8843
+ listField: "resultList"
8844
+ })
8845
+ },
8686
8846
  "onUpdate:value": {
8687
8847
  type: Function,
8688
8848
  default: void 0
@@ -8706,6 +8866,10 @@ const BasicRadioGroup = /* @__PURE__ */ vue.defineComponent({
8706
8866
  b,
8707
8867
  m
8708
8868
  } = useNamespace("basic-radio-group");
8869
+ const loading = vue.ref(false);
8870
+ const dataSourceRef = vue.ref([]);
8871
+ const rawDataSourceRef = vue.ref({});
8872
+ const searchInfoRef = vue.ref({});
8709
8873
  const uncontrolledValueRef = vue.ref(props.defaultValue);
8710
8874
  const controlledValueRef = vue.toRef(props, "value");
8711
8875
  const mergedValueRef = hooks.useMergedState(controlledValueRef, uncontrolledValueRef);
@@ -8714,20 +8878,76 @@ const BasicRadioGroup = /* @__PURE__ */ vue.defineComponent({
8714
8878
  } = vue.toRefs(props);
8715
8879
  const options = vue.computed(() => {
8716
8880
  var _a;
8717
- return ((_a = props.options) != null ? _a : []).map((option) => {
8881
+ const {
8882
+ labelField,
8883
+ valueField
8884
+ } = props;
8885
+ const source = (_a = dataSourceRef.value && dataSourceRef.value.length > 0 ? dataSourceRef.value : props.options) != null ? _a : [];
8886
+ return source.map((option) => {
8718
8887
  if (utils.isString(option) || utils.isNumber(option)) {
8719
8888
  return {
8720
8889
  label: option,
8721
8890
  value: option
8722
8891
  };
8723
8892
  }
8724
- return option;
8893
+ const opt = option;
8894
+ return {
8895
+ ...opt,
8896
+ label: utils.getValueKey(labelField, opt),
8897
+ value: utils.getValueKey(valueField, opt)
8898
+ };
8725
8899
  });
8726
8900
  });
8727
8901
  const cls = vue.computed(() => [`${b()}`, {
8728
8902
  [`${m(props.size)}`]: props.size,
8729
8903
  [`${m("disabled")}`]: disabled.value
8730
8904
  }]);
8905
+ vue.watch(() => props.searchInfo, () => {
8906
+ fetch2();
8907
+ }, {
8908
+ deep: true,
8909
+ immediate: props.immediate
8910
+ });
8911
+ async function fetch2(opt) {
8912
+ const {
8913
+ api,
8914
+ dynamicApi,
8915
+ searchInfo,
8916
+ fetchSetting,
8917
+ beforeFetch,
8918
+ afterFetch,
8919
+ handleSearchInfoFn
8920
+ } = props;
8921
+ if (!api && !dynamicApi || loading.value) return;
8922
+ try {
8923
+ loading.value = true;
8924
+ const {
8925
+ listField
8926
+ } = {
8927
+ listField: "resultList",
8928
+ ...fetchSetting
8929
+ };
8930
+ const searchInfoParams = handleSearchInfoFn ? handleSearchInfoFn() : {};
8931
+ let params = lodashEs.merge(searchInfoParams, searchInfo, opt != null ? opt : {});
8932
+ if (beforeFetch && utils.isFunction(beforeFetch)) {
8933
+ params = await beforeFetch(params) || params;
8934
+ }
8935
+ searchInfoRef.value = params;
8936
+ const apiFn = api || (dynamicApi == null ? void 0 : dynamicApi(params));
8937
+ const res = await (apiFn == null ? void 0 : apiFn(params));
8938
+ rawDataSourceRef.value = res.data;
8939
+ const isArrayResult = Array.isArray(res.data);
8940
+ let resultItems = isArrayResult ? res.data : lodashEs.get(res.data, listField);
8941
+ if (afterFetch && utils.isFunction(afterFetch)) {
8942
+ resultItems = await afterFetch(resultItems) || resultItems;
8943
+ }
8944
+ dataSourceRef.value = resultItems;
8945
+ } catch (error) {
8946
+ console.error(error);
8947
+ } finally {
8948
+ loading.value = false;
8949
+ }
8950
+ }
8731
8951
  const handleChange = (value) => {
8732
8952
  if (props.disabled) return;
8733
8953
  const {