hlyc-web-pack 3.6.12 → 3.6.14

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.
@@ -3,6 +3,7 @@ import { RadioChangeEvent } from 'antd';
3
3
  import { RowProps } from 'antd/es/row';
4
4
  import { ColProps } from 'antd/es/col';
5
5
  import { FormProps, Rule, FormItemProps } from 'antd/es/form';
6
+ import { NamePath } from 'rc-field-form/lib/interface';
6
7
  import { RangePickerSharedProps } from 'rc-picker/lib/RangePicker';
7
8
  import { PickerSharedProps } from 'rc-picker/lib/Picker';
8
9
  import { TimePickerProps } from 'antd/es/time-picker';
@@ -113,7 +114,7 @@ export interface FormCallType {
113
114
  getFormValues: (data: string[]) => AnyObjectType;
114
115
  setFormFields: FormInstance['setFields'];
115
116
  setFormValues: (values: AnyObjectType) => void;
116
- formSubmit: () => Promise<AnyObjectType>;
117
+ formSubmit: (nameList?: NamePath[]) => Promise<AnyObjectType>;
117
118
  formReset: (fields?: string[]) => void;
118
119
  }
119
120
  export interface GenerateFormPropType {
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  import { ButtonProps } from 'antd/es/button';
3
- import { FormInstance } from 'rc-field-form/es/interface';
3
+ import { FormInstance, NamePath } from 'rc-field-form/es/interface';
4
4
  import { FormProps } from 'antd/es/form';
5
5
  import { ColProps } from 'antd/es/col';
6
6
  import { FormListType } from '../GenerateForm';
@@ -50,17 +50,21 @@ export interface LayoutFormPropTypes {
50
50
  /** 支持antd Form组件官方传参所有类型 */
51
51
  formConfig?: FormProps;
52
52
  }
53
- interface SubmitOption {
54
- /** 不提交表单 true */
55
- notSubmit?: boolean;
56
- }
57
53
  export interface LayoutFormModalCallType {
54
+ /** 设置loading */
58
55
  setFormLoading: (data: boolean) => void;
56
+ /** 设置保存loading */
59
57
  setFormSaveLoading: (data: boolean) => void;
58
+ /** 设置一组字段状态 */
60
59
  setFormFields: FormInstance['setFields'];
60
+ /** 读取表单值 */
61
61
  getFormValues: (data: string[]) => AnyObjectType | undefined;
62
+ /** 设置表单值 */
62
63
  setFormValues: (values: AnyObjectType) => void;
63
- getFormSubmitValues: (option?: SubmitOption) => Promise<AnyObjectType | undefined>;
64
+ /** 排除指定表单后提交 */
65
+ excludeFormSubmitValues: (nameList?: NamePath[]) => Promise<AnyObjectType | undefined>;
66
+ /** 提交表单并验证 */
67
+ getFormSubmitValues: (nameList?: NamePath[]) => Promise<AnyObjectType | undefined>;
64
68
  }
65
69
  export declare type LayoutFormModalListType = FormListType;
66
70
  declare const _default: React.ForwardRefExoticComponent<LayoutFormPropTypes & React.RefAttributes<unknown>>;
@@ -0,0 +1,24 @@
1
+ import { TableProps } from 'antd/es/table';
2
+ declare type VirtualListProp = {
3
+ /** 虚拟列表参数 */
4
+ vl: {
5
+ /** (必填) 对应scrollY */
6
+ height: number | string;
7
+ /** (可选) 滚动条滚到底部触发api */
8
+ onReachEnd?: () => void;
9
+ /** (可选) 滚动时触发的api */
10
+ onScroll?: () => void;
11
+ onListRender?: (listInfo: {
12
+ start: number;
13
+ renderLen: number;
14
+ }) => void;
15
+ debounceListRenderMS?: number;
16
+ /** (可选, 如果同一页面存在多个虚拟表格时必填.) 唯一标识 */
17
+ vid?: string;
18
+ /** 默认为true. 是否数据变更后重置滚动条 */
19
+ resetTopWhenDataChange?: boolean;
20
+ };
21
+ } & TableProps<any>;
22
+ /** 虚拟列表 */
23
+ declare const VirtualList: (props: VirtualListProp) => JSX.Element;
24
+ export default VirtualList;
package/lib/index.d.ts CHANGED
@@ -9,6 +9,7 @@ export { default as LayoutTableModal } from './LayoutTableModal';
9
9
  export { default as QuicklyProcessForms } from './QuicklyProcessForms';
10
10
  export { default as LayoutFormModal } from './LayoutFormModal';
11
11
  export { default as IconSelectionModal } from './IconSelectionModal';
12
+ export { default as VirtualList } from './VirtualList';
12
13
  export { default as GenerateTable } from './GenerateTable';
13
14
  export { default as GenerateForm } from './GenerateForm';
14
15
  export { default as Empty } from './Empty';