zy-react-library 1.0.178 → 1.1.0

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.
Files changed (33) hide show
  1. package/components/Cascader/Area/index.d.ts +1 -1
  2. package/components/Cascader/Industry/index.d.ts +1 -1
  3. package/components/FormBuilder/FormBuilder.d.ts +2 -2
  4. package/components/FormBuilder/FormBuilder.js +25 -19
  5. package/components/FormBuilder/FormItemsRenderer.d.ts +5 -5
  6. package/components/FormBuilder/FormItemsRenderer.js +1 -1
  7. package/components/HeaderBack/index.d.ts +2 -4
  8. package/components/HeaderBack/index.js +2 -2
  9. package/components/HeaderBack/index.less +1 -1
  10. package/components/HiddenInfo/gwj/index.d.ts +0 -2
  11. package/components/HiddenInfo/gwj/index.js +379 -375
  12. package/components/Map/MapSelector.js +2 -0
  13. package/components/Map/index.js +2 -0
  14. package/components/Page/index.d.ts +30 -0
  15. package/components/Page/index.js +49 -0
  16. package/components/Pdf/index.d.ts +1 -1
  17. package/components/Pdf/index.js +12 -8
  18. package/components/PreviewImg/index.js +3 -1
  19. package/components/PreviewPdf/index.js +2 -0
  20. package/components/Search/index.js +48 -46
  21. package/components/Select/Personnel/Gwj/index.js +1 -1
  22. package/components/SelectCreate/index.d.ts +1 -1
  23. package/components/SelectCreate/index.js +2 -0
  24. package/components/Signature/index.d.ts +2 -2
  25. package/components/Signature/index.js +2 -0
  26. package/components/Table/index.d.ts +6 -4
  27. package/components/Table/index.js +52 -7
  28. package/components/Table/index.less +2 -1
  29. package/components/TooltipPreviewImg/index.js +2 -0
  30. package/components/Upload/index.d.ts +1 -1
  31. package/components/Upload/index.js +2 -2
  32. package/css/common.less +31 -0
  33. package/package.json +2 -1
@@ -5,7 +5,7 @@ import type { BasicCascaderProps } from "../Basic";
5
5
  * 组件属性
6
6
  */
7
7
  export interface AreaCascaderProps extends Omit<BasicCascaderProps, "options" | "placeholder" | "nameKey" | "idKey" | "childrenKey"> {
8
- /** 占位符,默认为"属地" */
8
+ /** 占位符,默认 "属地" */
9
9
  placeholder?: string;
10
10
  }
11
11
 
@@ -5,7 +5,7 @@ import type { BasicCascaderProps } from "../Basic";
5
5
  * 组件属性
6
6
  */
7
7
  export interface IndustryCascaderProps extends Omit<BasicCascaderProps, "options" | "placeholder" | "nameKey" | "idKey" | "childrenKey"> {
8
- /** 占位符,默认为"行业类型" */
8
+ /** 占位符,默认 "行业类型" */
9
9
  placeholder?: string;
10
10
  }
11
11
 
@@ -19,9 +19,9 @@ export interface FormBuilderProps extends FormProps {
19
19
  useAutoGenerateRequired?: boolean;
20
20
  /** 是否显示操作按钮区域,默认 true */
21
21
  showActionButtons?: boolean;
22
- /** 提交按钮文字,默认为"提交" */
22
+ /** 提交按钮文字,默认 "提交" */
23
23
  submitButtonText?: string;
24
- /** 取消按钮文字,默认为"取消" */
24
+ /** 取消按钮文字,默认 "取消" */
25
25
  cancelButtonText?: string;
26
26
  /** 是否显示提交按钮,默认 true */
27
27
  showSubmitButton?: boolean;
@@ -51,25 +51,31 @@ const FormBuilder = (props) => {
51
51
  />
52
52
  </Row>
53
53
  {showActionButtons && (
54
- <Row gutter={gutter} style={{ marginTop: 24 }}>
55
- <Col span={24} style={{ textAlign: "center" }}>
56
- {customActionButtons || (
57
- <Space>
58
- {showSubmitButton && (
59
- <Button type="primary" htmlType="submit">
60
- {submitButtonText}
61
- </Button>
62
- )}
63
- {extraActionButtons}
64
- {showCancelButton && (
65
- <Button onClick={handleCancel}>
66
- {cancelButtonText}
67
- </Button>
68
- )}
69
- </Space>
70
- )}
71
- </Col>
72
- </Row>
54
+ <>
55
+ <div style={{ height: "52px" }}></div>
56
+ <Row
57
+ gutter={gutter}
58
+ style={{ textAlign: "center", backgroundColor: "rgb(241, 241, 242)", margin: "0px -44px", padding: "10px 0", position: "fixed", bottom: "0", width: "100%" }}
59
+ >
60
+ <Col span={24} style={{ textAlign: "center" }}>
61
+ {customActionButtons || (
62
+ <Space>
63
+ {showSubmitButton && (
64
+ <Button type="primary" htmlType="submit">
65
+ {submitButtonText}
66
+ </Button>
67
+ )}
68
+ {extraActionButtons}
69
+ {showCancelButton && (
70
+ <Button onClick={handleCancel}>
71
+ {cancelButtonText}
72
+ </Button>
73
+ )}
74
+ </Space>
75
+ )}
76
+ </Col>
77
+ </Row>
78
+ </>
73
79
  )}
74
80
  </Form>
75
81
  </Spin>
@@ -21,9 +21,9 @@ export interface OptionItem {
21
21
  * 字段键配置
22
22
  */
23
23
  export interface itemsFieldConfig {
24
- /** 值字段的键名,默认为 'bianma' */
24
+ /** 值字段的键名,默认 'bianma' */
25
25
  valueKey?: string;
26
- /** 标签字段的键名,默认为 'name' */
26
+ /** 标签字段的键名,默认 'name' */
27
27
  labelKey?: string | ((item: Record<string, any>) => ReactNode);
28
28
  }
29
29
 
@@ -39,7 +39,7 @@ export interface FormListOperations {
39
39
  /** 当前表单项的数据字段信息 */
40
40
  field: FormListFieldData;
41
41
  /** 当前项在列表中的索引位置 */
42
- index: number;
42
+ fieldIndex: number;
43
43
  /** 新增方法 */
44
44
  add: (defaultValue?: FormValues, insertIndex?: number) => void;
45
45
  /** 删除方法 */
@@ -61,7 +61,7 @@ export interface FormListUniqueProps {
61
61
  /** 删除按钮的文本,默认 '删除' */
62
62
  removeButtonText?: string;
63
63
  /** 表单配置项 */
64
- options: (field: FormListFieldData, operations: FormListOperations) => FormOption[];
64
+ options: (field: FormListFieldData, fieldIndex: number, operations: FormListOperations) => FormOption[];
65
65
  /** 点击新增按钮时的默认值 */
66
66
  addDefaultValue?: FormValues;
67
67
  /** 点击新增按钮时插入的索引位置 */
@@ -106,7 +106,7 @@ export interface FormOption<T extends keyof FORM_ITEM_RENDER_TYPE_MAP = keyof FO
106
106
  formItemProps?: FormItemProps | ((formValues: FormValues) => FormItemProps);
107
107
  /** label 栅格配置,默认直接使用外层的 labelCol,如果 span 等于 24,是外层的 labelCol.span 一半 */
108
108
  labelCol?: ColProps;
109
- /** wrapper 栅格配置,默认为 24 - labelCol.span */
109
+ /** wrapper 栅格配置,默认 24 - labelCol.span */
110
110
  wrapperCol?: ColProps;
111
111
  /** 是否应该更新(用于表单联动) */
112
112
  shouldUpdate?: boolean | ((prevValues: FormValues, nextValues: FormValues, info: { source?: string }) => boolean);
@@ -225,7 +225,7 @@ const FormItemsRenderer = ({
225
225
  // 获取 listOptions
226
226
  const getListOptions = (listOptions, field, fieldIndex, add, remove, move) => {
227
227
  return typeof listOptions === "function"
228
- ? listOptions(field, { field, fieldIndex, add, remove, move })
228
+ ? listOptions(field, fieldIndex, { field, fieldIndex, add, remove, move })
229
229
  : (listOptions ?? []);
230
230
  };
231
231
 
@@ -1,4 +1,4 @@
1
- import type { CSSProperties, FC, ReactNode } from "react";
1
+ import type { FC, ReactNode } from "react";
2
2
 
3
3
  export interface HeaderBackProps {
4
4
  /** 标题 */
@@ -8,10 +8,8 @@ export interface HeaderBackProps {
8
8
  goBack?: () => void;
9
9
  [key: string]: any;
10
10
  };
11
- /** 是否显示返回按钮,默认为 true */
11
+ /** 是否显示返回按钮,默认 true */
12
12
  previous?: boolean;
13
- /** 自定义样式 */
14
- style?: CSSProperties;
15
13
  }
16
14
 
17
15
  /** 头部返回组件 */
@@ -6,10 +6,10 @@ import "./index.less";
6
6
  * 头部返回组件
7
7
  */
8
8
  function HeaderBack(props) {
9
- const { title, history, previous = true, style = {} } = props;
9
+ const { title, history, previous = true } = props;
10
10
 
11
11
  return (
12
- <div className="header-back" style={style}>
12
+ <div className="header-back">
13
13
  <div className="action">
14
14
  {
15
15
  previous
@@ -1,7 +1,7 @@
1
1
  .header-back {
2
2
  padding: 10px 20px;
3
3
  border-bottom: 1px solid #dcdfe6;
4
- margin-bottom: 10px;
4
+ margin-bottom: 0;
5
5
  position: sticky;
6
6
  top: 0;
7
7
  background-color: #fff;
@@ -12,8 +12,6 @@ export interface HiddenInfoProps {
12
12
  hiddenId?: string;
13
13
  /** hiddenId 的字段,默认 hiddenId */
14
14
  hiddenIdKey?: string;
15
- /** 是否显示头部的返回,默认 true */
16
- isShowHeaderBack?: boolean;
17
15
  /** 是否是过往记录,后端会返回详细的步骤信息,默认 false */
18
16
  history?: boolean;
19
17
  /** 获取数据 */