xmirror-components 1.0.26-alpha.4 → 1.0.26
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/build/dist/index.cjs +16 -25
- package/build/dist/index.mjs +1686 -1846
- package/build/es/components/IconButton/index.d.ts +2 -2
- package/build/es/components/IconFont/index.d.ts +3 -4
- package/build/lib/index.d.ts +31 -32
- package/build/package.json +1 -1
- package/build/types/components/IconButton/index.d.ts +2 -2
- package/build/types/components/IconFont/index.d.ts +3 -4
- package/package.json +1 -1
- package/build/lib/components/AntdApp/index.d.ts +0 -14
- package/build/lib/components/CheckboxValue/index.d.ts +0 -40
- package/build/lib/components/ConfigProvider/index.d.ts +0 -9
- package/build/lib/components/ConfigProvider/types.d.ts +0 -15
- package/build/lib/components/GlobalLoading/index.d.ts +0 -5
- package/build/lib/components/IconButton/index.d.ts +0 -56
- package/build/lib/components/IconFont/index.d.ts +0 -27
- package/build/lib/components/SwitchValue/index.d.ts +0 -30
- package/build/lib/hooks/useRequest/index.d.ts +0 -19
|
@@ -50,7 +50,7 @@ export interface IconButtonProps extends Omit<ButtonTooltipProps, 'children'> {
|
|
|
50
50
|
/**
|
|
51
51
|
* 其他属性
|
|
52
52
|
*/
|
|
53
|
-
|
|
53
|
+
flag?: never;
|
|
54
54
|
}
|
|
55
|
-
export declare const IconButton: React.ForwardRefExoticComponent<
|
|
55
|
+
export declare const IconButton: React.ForwardRefExoticComponent<IconButtonProps & React.RefAttributes<HTMLButtonElement | HTMLAnchorElement>>;
|
|
56
56
|
export default IconButton;
|
|
@@ -12,16 +12,15 @@ interface IconFontCommonProps {
|
|
|
12
12
|
* 是否使用 symbol 模式
|
|
13
13
|
*/
|
|
14
14
|
symbol?: boolean;
|
|
15
|
-
[attrs: string]: any;
|
|
16
15
|
}
|
|
17
16
|
export type IconFontProps = (IconFontCommonProps & React.SVGProps<SVGSVGElement> & {
|
|
18
17
|
symbol: true;
|
|
19
18
|
}) | (IconFontCommonProps & React.HTMLAttributes<HTMLElement> & {
|
|
20
19
|
symbol?: false;
|
|
21
20
|
});
|
|
22
|
-
declare const IconFont: React.ForwardRefExoticComponent<(
|
|
23
|
-
symbol: true;
|
|
24
|
-
}, "ref"> | Omit<IconFontCommonProps & React.HTMLAttributes<HTMLElement> & {
|
|
21
|
+
declare const IconFont: React.ForwardRefExoticComponent<((IconFontCommonProps & React.HTMLAttributes<HTMLElement> & {
|
|
25
22
|
symbol?: false;
|
|
23
|
+
}) | Omit<IconFontCommonProps & React.SVGProps<SVGSVGElement> & {
|
|
24
|
+
symbol: true;
|
|
26
25
|
}, "ref">) & React.RefAttributes<HTMLElement | SVGSVGElement>>;
|
|
27
26
|
export default IconFont;
|
package/build/lib/index.d.ts
CHANGED
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
import { AppProps } from 'antd';
|
|
2
2
|
import { Checkbox } from 'antd';
|
|
3
3
|
import { CheckboxChangeEvent } from 'antd/es/checkbox';
|
|
4
|
+
import { default as default_2 } from 'react';
|
|
4
5
|
import { MessageInstance } from 'antd/es/message/interface';
|
|
5
6
|
import { ModalStaticFunctions } from 'antd/es/modal/confirm';
|
|
6
7
|
import { NotificationInstance } from 'antd/es/notification/interface';
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import {
|
|
10
|
-
import
|
|
11
|
-
import type { Service } from 'ahooks/lib/useRequest/src/types';
|
|
8
|
+
import { Options as Options_2 } from 'ahooks/lib/useRequest/src/types';
|
|
9
|
+
import { Plugin as Plugin_2 } from 'ahooks/lib/useRequest/src/types';
|
|
10
|
+
import { Result } from 'ahooks/lib/useRequest/src/types';
|
|
11
|
+
import { Service } from 'ahooks/lib/useRequest/src/types';
|
|
12
12
|
import { SwitchProps } from 'antd/es/switch';
|
|
13
13
|
|
|
14
14
|
export declare function App({ children, config, ...props }: AppProps & {
|
|
15
15
|
config?: ConfigProviderConfigProps;
|
|
16
|
-
}):
|
|
16
|
+
}): default_2.JSX.Element;
|
|
17
17
|
|
|
18
18
|
declare interface ButtonTooltipProps {
|
|
19
19
|
/**
|
|
20
20
|
* 气泡内容
|
|
21
21
|
*/
|
|
22
|
-
title?:
|
|
22
|
+
title?: default_2.ReactNode;
|
|
23
23
|
/**
|
|
24
24
|
* 是否禁用 tooltip
|
|
25
25
|
*/
|
|
@@ -27,7 +27,7 @@ declare interface ButtonTooltipProps {
|
|
|
27
27
|
/**
|
|
28
28
|
* 禁用原因
|
|
29
29
|
*/
|
|
30
|
-
disabledReason?:
|
|
30
|
+
disabledReason?: default_2.ReactNode;
|
|
31
31
|
/**
|
|
32
32
|
* 是否隐藏按钮
|
|
33
33
|
*/
|
|
@@ -36,17 +36,17 @@ declare interface ButtonTooltipProps {
|
|
|
36
36
|
* 是否禁用
|
|
37
37
|
*/
|
|
38
38
|
disabled?: boolean;
|
|
39
|
-
children?:
|
|
39
|
+
children?: default_2.ReactNode;
|
|
40
40
|
}
|
|
41
41
|
|
|
42
|
-
export declare const CheckboxValue: <T = any, F = any>({ checked, onChange, trueValue, falseValue, trueLabel, falseLabel, children, ...props }: CheckboxValueProps<T, F>) =>
|
|
42
|
+
export declare const CheckboxValue: <T = any, F = any>({ checked, onChange, trueValue, falseValue, trueLabel, falseLabel, children, ...props }: CheckboxValueProps<T, F>) => default_2.JSX.Element;
|
|
43
43
|
|
|
44
44
|
/**
|
|
45
45
|
* checkbox 可自定义 value 和 label
|
|
46
46
|
* 使用场景:
|
|
47
47
|
* 1. 需要自定义 value 和 label
|
|
48
48
|
*/
|
|
49
|
-
declare interface CheckboxValueProps<T = any, F = any> extends Omit<
|
|
49
|
+
declare interface CheckboxValueProps<T = any, F = any> extends Omit<default_2.ComponentProps<typeof Checkbox>, 'checked' | 'onChange'> {
|
|
50
50
|
/**
|
|
51
51
|
* 选中值
|
|
52
52
|
*/
|
|
@@ -74,44 +74,44 @@ declare interface CheckboxValueProps<T = any, F = any> extends Omit<React_2.Comp
|
|
|
74
74
|
/**
|
|
75
75
|
* 子元素
|
|
76
76
|
*/
|
|
77
|
-
children?:
|
|
77
|
+
children?: default_2.ReactNode;
|
|
78
78
|
}
|
|
79
79
|
|
|
80
|
-
export declare const ConfigContext:
|
|
80
|
+
export declare const ConfigContext: default_2.Context<ConfigContextProps>;
|
|
81
81
|
|
|
82
82
|
declare interface ConfigContextProps {
|
|
83
83
|
iconButton: IconButtonConfig;
|
|
84
84
|
iconFont: IconFontConfig;
|
|
85
85
|
}
|
|
86
86
|
|
|
87
|
-
export declare function ConfigProvider({ children, config }: ConfigProviderProps):
|
|
87
|
+
export declare function ConfigProvider({ children, config }: ConfigProviderProps): default_2.JSX.Element;
|
|
88
88
|
|
|
89
89
|
declare type ConfigProviderConfigProps = Partial<ConfigContextProps>;
|
|
90
90
|
|
|
91
91
|
declare interface ConfigProviderProps {
|
|
92
|
-
children:
|
|
92
|
+
children: default_2.ReactNode;
|
|
93
93
|
config: ConfigProviderConfigProps;
|
|
94
94
|
}
|
|
95
95
|
|
|
96
|
-
export declare function GlobalLoading():
|
|
96
|
+
export declare function GlobalLoading(): default_2.JSX.Element;
|
|
97
97
|
|
|
98
|
-
export declare const IconButton:
|
|
98
|
+
export declare const IconButton: default_2.ForwardRefExoticComponent<IconButtonProps & default_2.RefAttributes<HTMLButtonElement | HTMLAnchorElement>>;
|
|
99
99
|
|
|
100
100
|
declare type IconButtonConfig = Pick<IconButtonProps, 'size' | 'className' | 'style'> & {
|
|
101
101
|
render: (props: IconButtonProps & {
|
|
102
|
-
children:
|
|
103
|
-
}) =>
|
|
102
|
+
children: default_2.ReactNode;
|
|
103
|
+
}) => default_2.ReactNode;
|
|
104
104
|
};
|
|
105
105
|
|
|
106
106
|
declare interface IconButtonProps extends Omit<ButtonTooltipProps, 'children'> {
|
|
107
107
|
/**
|
|
108
108
|
* 图标
|
|
109
109
|
*/
|
|
110
|
-
icon?:
|
|
110
|
+
icon?: default_2.ReactNode | string;
|
|
111
111
|
/**
|
|
112
112
|
* 点击事件
|
|
113
113
|
*/
|
|
114
|
-
onClick?: (e:
|
|
114
|
+
onClick?: (e: default_2.MouseEvent<HTMLElement>) => void;
|
|
115
115
|
/**
|
|
116
116
|
* 大小
|
|
117
117
|
*/
|
|
@@ -119,7 +119,7 @@ declare interface IconButtonProps extends Omit<ButtonTooltipProps, 'children'> {
|
|
|
119
119
|
/**
|
|
120
120
|
* 样式
|
|
121
121
|
*/
|
|
122
|
-
style?:
|
|
122
|
+
style?: default_2.CSSProperties;
|
|
123
123
|
/**
|
|
124
124
|
* 类名
|
|
125
125
|
*/
|
|
@@ -131,14 +131,14 @@ declare interface IconButtonProps extends Omit<ButtonTooltipProps, 'children'> {
|
|
|
131
131
|
/**
|
|
132
132
|
* 其他属性
|
|
133
133
|
*/
|
|
134
|
-
|
|
134
|
+
flag?: never;
|
|
135
135
|
}
|
|
136
136
|
|
|
137
|
-
export declare const IconFont:
|
|
138
|
-
symbol: true;
|
|
139
|
-
}, "ref"> | Omit<IconFontCommonProps & React_2.HTMLAttributes<HTMLElement> & {
|
|
137
|
+
export declare const IconFont: default_2.ForwardRefExoticComponent<((IconFontCommonProps & default_2.HTMLAttributes<HTMLElement> & {
|
|
140
138
|
symbol?: false;
|
|
141
|
-
}
|
|
139
|
+
}) | Omit<IconFontCommonProps & default_2.SVGProps<SVGSVGElement> & {
|
|
140
|
+
symbol: true;
|
|
141
|
+
}, "ref">) & default_2.RefAttributes<HTMLElement | SVGSVGElement>>;
|
|
142
142
|
|
|
143
143
|
declare interface IconFontCommonProps {
|
|
144
144
|
/**
|
|
@@ -153,14 +153,13 @@ declare interface IconFontCommonProps {
|
|
|
153
153
|
* 是否使用 symbol 模式
|
|
154
154
|
*/
|
|
155
155
|
symbol?: boolean;
|
|
156
|
-
[attrs: string]: any;
|
|
157
156
|
}
|
|
158
157
|
|
|
159
158
|
declare type IconFontConfig = Pick<IconFontProps, 'className' | 'style'>;
|
|
160
159
|
|
|
161
|
-
declare type IconFontProps = (IconFontCommonProps &
|
|
160
|
+
declare type IconFontProps = (IconFontCommonProps & default_2.SVGProps<SVGSVGElement> & {
|
|
162
161
|
symbol: true;
|
|
163
|
-
}) | (IconFontCommonProps &
|
|
162
|
+
}) | (IconFontCommonProps & default_2.HTMLAttributes<HTMLElement> & {
|
|
164
163
|
symbol?: false;
|
|
165
164
|
});
|
|
166
165
|
|
|
@@ -183,7 +182,7 @@ export declare let setGlobalLoading: (_value: boolean) => void;
|
|
|
183
182
|
/**
|
|
184
183
|
* Switch 可自定义 value
|
|
185
184
|
*/
|
|
186
|
-
export declare const SwitchValue: ({ checked, onChange, trueValue, falseValue, ...props }: SwitchValueProps) =>
|
|
185
|
+
export declare const SwitchValue: ({ checked, onChange, trueValue, falseValue, ...props }: SwitchValueProps) => default_2.JSX.Element;
|
|
187
186
|
|
|
188
187
|
/**
|
|
189
188
|
* Switch 可自定义 value
|
|
@@ -206,7 +205,7 @@ declare interface SwitchValueProps<T = boolean | string | number, F = boolean |
|
|
|
206
205
|
/**
|
|
207
206
|
* 选中事件
|
|
208
207
|
*/
|
|
209
|
-
onChange?: (value: T | F, event:
|
|
208
|
+
onChange?: (value: T | F, event: default_2.MouseEvent<HTMLButtonElement> | default_2.KeyboardEvent<HTMLButtonElement>) => void;
|
|
210
209
|
}
|
|
211
210
|
|
|
212
211
|
export declare function useRequest<TData, TParams extends unknown[]>(service: Service<TData, TParams>, options?: Options<TData, TParams>, plugins?: Array<Plugin_2<TData, TParams>>): WrappedResult<TData, TParams>;
|
package/build/package.json
CHANGED
|
@@ -50,7 +50,7 @@ export interface IconButtonProps extends Omit<ButtonTooltipProps, 'children'> {
|
|
|
50
50
|
/**
|
|
51
51
|
* 其他属性
|
|
52
52
|
*/
|
|
53
|
-
|
|
53
|
+
flag?: never;
|
|
54
54
|
}
|
|
55
|
-
export declare const IconButton: React.ForwardRefExoticComponent<
|
|
55
|
+
export declare const IconButton: React.ForwardRefExoticComponent<IconButtonProps & React.RefAttributes<HTMLButtonElement | HTMLAnchorElement>>;
|
|
56
56
|
export default IconButton;
|
|
@@ -12,16 +12,15 @@ interface IconFontCommonProps {
|
|
|
12
12
|
* 是否使用 symbol 模式
|
|
13
13
|
*/
|
|
14
14
|
symbol?: boolean;
|
|
15
|
-
[attrs: string]: any;
|
|
16
15
|
}
|
|
17
16
|
export type IconFontProps = (IconFontCommonProps & React.SVGProps<SVGSVGElement> & {
|
|
18
17
|
symbol: true;
|
|
19
18
|
}) | (IconFontCommonProps & React.HTMLAttributes<HTMLElement> & {
|
|
20
19
|
symbol?: false;
|
|
21
20
|
});
|
|
22
|
-
declare const IconFont: React.ForwardRefExoticComponent<(
|
|
23
|
-
symbol: true;
|
|
24
|
-
}, "ref"> | Omit<IconFontCommonProps & React.HTMLAttributes<HTMLElement> & {
|
|
21
|
+
declare const IconFont: React.ForwardRefExoticComponent<((IconFontCommonProps & React.HTMLAttributes<HTMLElement> & {
|
|
25
22
|
symbol?: false;
|
|
23
|
+
}) | Omit<IconFontCommonProps & React.SVGProps<SVGSVGElement> & {
|
|
24
|
+
symbol: true;
|
|
26
25
|
}, "ref">) & React.RefAttributes<HTMLElement | SVGSVGElement>>;
|
|
27
26
|
export default IconFont;
|
package/package.json
CHANGED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { type AppProps } from 'antd';
|
|
3
|
-
import { type MessageInstance } from 'antd/es/message/interface';
|
|
4
|
-
import { type NotificationInstance } from 'antd/es/notification/interface';
|
|
5
|
-
import { type ModalStaticFunctions } from 'antd/es/modal/confirm';
|
|
6
|
-
import { type ConfigProviderConfigProps } from './../ConfigProvider';
|
|
7
|
-
declare let message: MessageInstance;
|
|
8
|
-
declare let notification: NotificationInstance;
|
|
9
|
-
declare let modal: Omit<ModalStaticFunctions, 'warn'>;
|
|
10
|
-
declare function Index({ children, config, ...props }: AppProps & {
|
|
11
|
-
config?: ConfigProviderConfigProps;
|
|
12
|
-
}): React.JSX.Element;
|
|
13
|
-
export { message, notification, modal };
|
|
14
|
-
export default Index;
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { Checkbox } from 'antd';
|
|
3
|
-
import { type CheckboxChangeEvent } from 'antd/es/checkbox';
|
|
4
|
-
/**
|
|
5
|
-
* checkbox 可自定义 value 和 label
|
|
6
|
-
* 使用场景:
|
|
7
|
-
* 1. 需要自定义 value 和 label
|
|
8
|
-
*/
|
|
9
|
-
interface CheckboxValueProps<T = any, F = any> extends Omit<React.ComponentProps<typeof Checkbox>, 'checked' | 'onChange'> {
|
|
10
|
-
/**
|
|
11
|
-
* 选中值
|
|
12
|
-
*/
|
|
13
|
-
trueValue?: T;
|
|
14
|
-
/**
|
|
15
|
-
* 未选中值
|
|
16
|
-
*/
|
|
17
|
-
falseValue?: F;
|
|
18
|
-
/**
|
|
19
|
-
* 选中值
|
|
20
|
-
*/
|
|
21
|
-
checked?: T | F;
|
|
22
|
-
/**
|
|
23
|
-
* 选中事件
|
|
24
|
-
*/
|
|
25
|
-
onChange?: (value: T | F, event: CheckboxChangeEvent) => void;
|
|
26
|
-
/**
|
|
27
|
-
* 选中标签
|
|
28
|
-
*/
|
|
29
|
-
trueLabel?: string;
|
|
30
|
-
/**
|
|
31
|
-
* 未选中标签
|
|
32
|
-
*/
|
|
33
|
-
falseLabel?: string;
|
|
34
|
-
/**
|
|
35
|
-
* 子元素
|
|
36
|
-
*/
|
|
37
|
-
children?: React.ReactNode;
|
|
38
|
-
}
|
|
39
|
-
declare const CheckboxValue: <T = any, F = any>({ checked, onChange, trueValue, falseValue, trueLabel, falseLabel, children, ...props }: CheckboxValueProps<T, F>) => React.JSX.Element;
|
|
40
|
-
export default CheckboxValue;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { ConfigContextProps, ConfigProviderConfigProps } from './types';
|
|
3
|
-
export type { ConfigProviderConfigProps, ConfigContextProps } from './types';
|
|
4
|
-
export declare const ConfigContext: React.Context<ConfigContextProps>;
|
|
5
|
-
interface ConfigProviderProps {
|
|
6
|
-
children: React.ReactNode;
|
|
7
|
-
config: ConfigProviderConfigProps;
|
|
8
|
-
}
|
|
9
|
-
export default function ConfigProvider({ children, config }: ConfigProviderProps): React.JSX.Element;
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { IconButtonProps } from "../IconButton";
|
|
3
|
-
import { IconFontProps } from "../IconFont";
|
|
4
|
-
type IconButtonConfig = Pick<IconButtonProps, 'size' | 'className' | 'style'> & {
|
|
5
|
-
render: (props: IconButtonProps & {
|
|
6
|
-
children: React.ReactNode;
|
|
7
|
-
}) => React.ReactNode;
|
|
8
|
-
};
|
|
9
|
-
type IconFontConfig = Pick<IconFontProps, 'className' | 'style'>;
|
|
10
|
-
export interface ConfigContextProps {
|
|
11
|
-
iconButton: IconButtonConfig;
|
|
12
|
-
iconFont: IconFontConfig;
|
|
13
|
-
}
|
|
14
|
-
export type ConfigProviderConfigProps = Partial<ConfigContextProps>;
|
|
15
|
-
export {};
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
interface ButtonTooltipProps {
|
|
3
|
-
/**
|
|
4
|
-
* 气泡内容
|
|
5
|
-
*/
|
|
6
|
-
title?: React.ReactNode;
|
|
7
|
-
/**
|
|
8
|
-
* 是否禁用 tooltip
|
|
9
|
-
*/
|
|
10
|
-
tooltipDisabled?: boolean;
|
|
11
|
-
/**
|
|
12
|
-
* 禁用原因
|
|
13
|
-
*/
|
|
14
|
-
disabledReason?: React.ReactNode;
|
|
15
|
-
/**
|
|
16
|
-
* 是否隐藏按钮
|
|
17
|
-
*/
|
|
18
|
-
hide?: boolean;
|
|
19
|
-
/**
|
|
20
|
-
* 是否禁用
|
|
21
|
-
*/
|
|
22
|
-
disabled?: boolean;
|
|
23
|
-
children?: React.ReactNode;
|
|
24
|
-
}
|
|
25
|
-
export interface IconButtonProps extends Omit<ButtonTooltipProps, 'children'> {
|
|
26
|
-
/**
|
|
27
|
-
* 图标
|
|
28
|
-
*/
|
|
29
|
-
icon?: React.ReactNode | string;
|
|
30
|
-
/**
|
|
31
|
-
* 点击事件
|
|
32
|
-
*/
|
|
33
|
-
onClick?: (e: React.MouseEvent<HTMLElement>) => void;
|
|
34
|
-
/**
|
|
35
|
-
* 大小
|
|
36
|
-
*/
|
|
37
|
-
size?: 'small' | 'middle' | 'large';
|
|
38
|
-
/**
|
|
39
|
-
* 样式
|
|
40
|
-
*/
|
|
41
|
-
style?: React.CSSProperties;
|
|
42
|
-
/**
|
|
43
|
-
* 类名
|
|
44
|
-
*/
|
|
45
|
-
className?: string;
|
|
46
|
-
/**
|
|
47
|
-
* 是否加载中
|
|
48
|
-
*/
|
|
49
|
-
loading?: boolean;
|
|
50
|
-
/**
|
|
51
|
-
* 其他属性
|
|
52
|
-
*/
|
|
53
|
-
[key: string]: any;
|
|
54
|
-
}
|
|
55
|
-
export declare const IconButton: React.ForwardRefExoticComponent<Omit<IconButtonProps, "ref"> & React.RefAttributes<HTMLButtonElement | HTMLAnchorElement>>;
|
|
56
|
-
export default IconButton;
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
interface IconFontCommonProps {
|
|
3
|
-
/**
|
|
4
|
-
* 图标类型
|
|
5
|
-
*/
|
|
6
|
-
type: string;
|
|
7
|
-
/**
|
|
8
|
-
* 类名
|
|
9
|
-
*/
|
|
10
|
-
className?: string;
|
|
11
|
-
/**
|
|
12
|
-
* 是否使用 symbol 模式
|
|
13
|
-
*/
|
|
14
|
-
symbol?: boolean;
|
|
15
|
-
[attrs: string]: any;
|
|
16
|
-
}
|
|
17
|
-
export type IconFontProps = (IconFontCommonProps & React.SVGProps<SVGSVGElement> & {
|
|
18
|
-
symbol: true;
|
|
19
|
-
}) | (IconFontCommonProps & React.HTMLAttributes<HTMLElement> & {
|
|
20
|
-
symbol?: false;
|
|
21
|
-
});
|
|
22
|
-
declare const IconFont: React.ForwardRefExoticComponent<(Omit<IconFontCommonProps & React.SVGProps<SVGSVGElement> & {
|
|
23
|
-
symbol: true;
|
|
24
|
-
}, "ref"> | Omit<IconFontCommonProps & React.HTMLAttributes<HTMLElement> & {
|
|
25
|
-
symbol?: false;
|
|
26
|
-
}, "ref">) & React.RefAttributes<HTMLElement | SVGSVGElement>>;
|
|
27
|
-
export default IconFont;
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { type SwitchProps } from 'antd/es/switch';
|
|
3
|
-
/**
|
|
4
|
-
* Switch 可自定义 value
|
|
5
|
-
* 使用场景:
|
|
6
|
-
* 1. 需要自定义 value 的 switch
|
|
7
|
-
*/
|
|
8
|
-
interface SwitchValueProps<T = boolean | string | number, F = boolean | string | number> extends Omit<SwitchProps, 'checked' | 'onChange'> {
|
|
9
|
-
/**
|
|
10
|
-
* 选中值
|
|
11
|
-
*/
|
|
12
|
-
trueValue?: T;
|
|
13
|
-
/**
|
|
14
|
-
* 未选中值
|
|
15
|
-
*/
|
|
16
|
-
falseValue?: F;
|
|
17
|
-
/**
|
|
18
|
-
* 选中值
|
|
19
|
-
*/
|
|
20
|
-
checked?: T | F;
|
|
21
|
-
/**
|
|
22
|
-
* 选中事件
|
|
23
|
-
*/
|
|
24
|
-
onChange?: (value: T | F, event: React.MouseEvent<HTMLButtonElement> | React.KeyboardEvent<HTMLButtonElement>) => void;
|
|
25
|
-
}
|
|
26
|
-
/**
|
|
27
|
-
* Switch 可自定义 value
|
|
28
|
-
*/
|
|
29
|
-
declare const Index: ({ checked, onChange, trueValue, falseValue, ...props }: SwitchValueProps) => React.JSX.Element;
|
|
30
|
-
export default Index;
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import type { Options as OriginalOptions, Plugin, Service, Result as OriginalResult } from 'ahooks/lib/useRequest/src/types';
|
|
2
|
-
interface Options<TData, TParams extends unknown[]> extends OriginalOptions<TData, TParams> {
|
|
3
|
-
/**
|
|
4
|
-
* 是否显示错误信息
|
|
5
|
-
* @default true
|
|
6
|
-
*/
|
|
7
|
-
errorMessage?: boolean;
|
|
8
|
-
}
|
|
9
|
-
interface WrappedResult<TData, TParams extends unknown[]> extends Omit<OriginalResult<TData, TParams>, 'data'> {
|
|
10
|
-
/**
|
|
11
|
-
* 直接返回data,而不是返回 { code, data, success } 形式
|
|
12
|
-
* @default data
|
|
13
|
-
*/
|
|
14
|
-
data?: TData extends {
|
|
15
|
-
data: infer U;
|
|
16
|
-
} ? U : TData;
|
|
17
|
-
}
|
|
18
|
-
declare function useWrappedRequest<TData, TParams extends unknown[]>(service: Service<TData, TParams>, options?: Options<TData, TParams>, plugins?: Array<Plugin<TData, TParams>>): WrappedResult<TData, TParams>;
|
|
19
|
-
export default useWrappedRequest;
|