@jiaozhiye/qm-design-react 1.10.9 → 1.10.11

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,5 +1,4 @@
1
- import React, { Component } from 'react';
2
- import PropTypes from 'prop-types';
1
+ import React from 'react';
3
2
  import type { IConfig } from '../context';
4
3
  type IProps = {
5
4
  locale: IConfig['locale'];
@@ -8,29 +7,6 @@ type IProps = {
8
7
  global?: IConfig['global'];
9
8
  children?: React.ReactNode;
10
9
  };
11
- type IState = {
12
- value: IConfig;
13
- };
14
10
  export type ConfigProviderProps = IProps;
15
- declare class QmConfigProvider extends Component<IProps, IState> {
16
- static propTypes: {
17
- locale: PropTypes.Requireable<string>;
18
- size: (props: any, propName: any, componentName: any) => void;
19
- theme: PropTypes.Requireable<string>;
20
- global: PropTypes.Requireable<object>;
21
- };
22
- static defaultProps: {
23
- locale: string;
24
- size: string;
25
- global: {};
26
- };
27
- constructor(props: IProps);
28
- static getDerivedStateFromProps(nextProps: IProps, prevState: IState): {
29
- value: IConfig & {
30
- locale: import("../../_utils/types").Locale;
31
- size: import("../../_utils/types").ComponentSize;
32
- };
33
- } | null;
34
- render(): React.JSX.Element;
35
- }
11
+ declare const QmConfigProvider: React.FC<IProps>;
36
12
  export default QmConfigProvider;
@@ -185,11 +185,12 @@ export type IFormItem = {
185
185
  fileSize?: number;
186
186
  draggable?: boolean;
187
187
  editable?: boolean;
188
- batchDownload?: (fileList: UploadFile[]) => Promise<void> | boolean;
188
+ batchDownload?: ((fileList: UploadFile[]) => Promise<void>) | boolean;
189
189
  fileDirection?: IFormLayout;
190
190
  showTip?: boolean;
191
191
  openCropper?: boolean;
192
192
  onPreview?: (file: UploadFile, cb: (file?: UploadFile) => void) => void;
193
+ onDownload?: (file: UploadFile) => void;
193
194
  onRemove?: (file: UploadFile) => void;
194
195
  onSortChange?: (fileList: UploadFile[]) => void;
195
196
  onEditChange?: (file: UploadFile, fileList: UploadFile[]) => void;
package/lib/index.d.ts CHANGED
@@ -16,7 +16,7 @@ export type { EmptyProps as QmEmptyProps } from './empty';
16
16
  export { default as QmEmpty } from './empty';
17
17
  export type { SpinProps as QmSpinProps } from './spin';
18
18
  export { default as QmSpin } from './spin';
19
- export type { ScrollbarProps as QmScrollbarProps } from './scrollbar';
19
+ export type { ScrollbarRef as QmScrollbarRef, ScrollbarProps as QmScrollbarProps } from './scrollbar';
20
20
  export { default as QmScrollbar } from './scrollbar';
21
21
  export type { DownloadProps as QmDownloadProps } from './download';
22
22
  export { default as QmDownload } from './download';
@@ -64,7 +64,7 @@ export type { WatermarkProps as QmWatermarkProps } from './watermark';
64
64
  export { default as QmWatermark } from './watermark';
65
65
  export type { LazyLoadProps as QmLazyLoadProps } from './lazy-load';
66
66
  export { default as QmLazyLoad } from './lazy-load';
67
- export type { SignatureProps as QmSignatureProps } from './signature';
67
+ export type { SignatureRef as QmSignatureRef, SignatureProps as QmSignatureProps } from './signature';
68
68
  export { default as QmSignature } from './signature';
69
69
  export type { ConfigProviderProps as DcpConfigProviderProps } from './config-provider';
70
70
  export { default as DcpConfigProvider } from './config-provider';
@@ -84,7 +84,7 @@ export type { EmptyProps as DcpEmptyProps } from './empty';
84
84
  export { default as DcpEmpty } from './empty';
85
85
  export type { SpinProps as DcpSpinProps } from './spin';
86
86
  export { default as DcpSpin } from './spin';
87
- export type { ScrollbarProps as DcpScrollbarProps } from './scrollbar';
87
+ export type { ScrollbarRef as DcpScrollbarRef, ScrollbarProps as DcpScrollbarProps } from './scrollbar';
88
88
  export { default as DcpScrollbar } from './scrollbar';
89
89
  export type { DownloadProps as DcpDownloadProps } from './download';
90
90
  export { default as DcpDownload } from './download';
@@ -132,7 +132,7 @@ export type { WatermarkProps as DcpWatermarkProps } from './watermark';
132
132
  export { default as DcpWatermark } from './watermark';
133
133
  export type { LazyLoadProps as DcpLazyLoadProps } from './lazy-load';
134
134
  export { default as DcpLazyLoad } from './lazy-load';
135
- export type { SignatureProps as DcpSignatureProps } from './signature';
135
+ export type { SignatureRef as DcpSignatureRef, SignatureProps as DcpSignatureProps } from './signature';
136
136
  export { default as DcpSignature } from './signature';
137
137
  export { default as pinyin } from './pinyin';
138
138
  export { default as version } from './version';