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.
- package/components/Cascader/Area/index.d.ts +1 -1
- package/components/Cascader/Industry/index.d.ts +1 -1
- package/components/FormBuilder/FormBuilder.d.ts +2 -2
- package/components/FormBuilder/FormBuilder.js +25 -19
- package/components/FormBuilder/FormItemsRenderer.d.ts +5 -5
- package/components/FormBuilder/FormItemsRenderer.js +1 -1
- package/components/HeaderBack/index.d.ts +2 -4
- package/components/HeaderBack/index.js +2 -2
- package/components/HeaderBack/index.less +1 -1
- package/components/HiddenInfo/gwj/index.d.ts +0 -2
- package/components/HiddenInfo/gwj/index.js +379 -375
- package/components/Map/MapSelector.js +2 -0
- package/components/Map/index.js +2 -0
- package/components/Page/index.d.ts +30 -0
- package/components/Page/index.js +49 -0
- package/components/Pdf/index.d.ts +1 -1
- package/components/Pdf/index.js +12 -8
- package/components/PreviewImg/index.js +3 -1
- package/components/PreviewPdf/index.js +2 -0
- package/components/Search/index.js +48 -46
- package/components/Select/Personnel/Gwj/index.js +1 -1
- package/components/SelectCreate/index.d.ts +1 -1
- package/components/SelectCreate/index.js +2 -0
- package/components/Signature/index.d.ts +2 -2
- package/components/Signature/index.js +2 -0
- package/components/Table/index.d.ts +6 -4
- package/components/Table/index.js +52 -7
- package/components/Table/index.less +2 -1
- package/components/TooltipPreviewImg/index.js +2 -0
- package/components/Upload/index.d.ts +1 -1
- package/components/Upload/index.js +2 -2
- package/css/common.less +31 -0
- 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
|
-
|
|
55
|
-
<
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
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
|
-
/**
|
|
24
|
+
/** 值字段的键名,默认 'bianma' */
|
|
25
25
|
valueKey?: string;
|
|
26
|
-
/**
|
|
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
|
-
|
|
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
|
|
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 {
|
|
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
|
-
/**
|
|
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
|
|
9
|
+
const { title, history, previous = true } = props;
|
|
10
10
|
|
|
11
11
|
return (
|
|
12
|
-
<div className="header-back"
|
|
12
|
+
<div className="header-back">
|
|
13
13
|
<div className="action">
|
|
14
14
|
{
|
|
15
15
|
previous
|