szld-libs 0.4.46 → 0.4.49
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/dist/style.css +1 -1
- package/dist/szld-components.es.js +51950 -28754
- package/dist/szld-components.umd.js +396 -77
- package/es/components/AuthButton/index.d.ts +2 -1
- package/es/components/BackHeader/index.d.ts +1 -1
- package/es/components/CoralButton/index.d.ts +2 -1
- package/es/components/CreateForm/index.d.ts +1 -1
- package/es/components/CustomPagination/index.d.ts +2 -1
- package/es/components/DynamicForm/func.js +4 -0
- package/es/components/DynamicForm/index.d.ts +3 -0
- package/es/components/DynamicForm/myCascader/index.d.ts +1 -1
- package/es/components/DynamicForm/myCheckbox/index.d.ts +2 -1
- package/es/components/DynamicForm/myRadio/index.d.ts +2 -1
- package/es/components/DynamicForm/myRichText/index.d.ts +10 -0
- package/es/components/DynamicForm/myRichText/index.js +280 -0
- package/es/components/DynamicForm/myRichText/vite.svg +1 -0
- package/es/components/DynamicForm/mySelect/index.d.ts +2 -1
- package/es/components/DynamicForm/mySelect/index.js +51 -15
- package/es/components/DynamicForm/myUpload/index.d.ts +2 -1
- package/es/components/DynamicForm/radioCard/index.d.ts +1 -1
- package/es/components/DynamicForm/selectModel/index.d.ts +1 -1
- package/es/components/DynamicForm/selectModelBackfillFormItem/index.d.ts +1 -1
- package/es/components/DynamicForm/useDynamicForm.d.ts +1 -1
- package/es/components/DynamicForm/useDynamicForm.js +23 -3
- package/es/components/DynamicFormMobile/index.js +2 -0
- package/es/components/DynamicFormMobile/myCalendar/index.d.ts +2 -1
- package/es/components/DynamicFormMobile/myCascader/index.d.ts +1 -1
- package/es/components/DynamicFormMobile/myCheckbox/index.d.ts +2 -1
- package/es/components/DynamicFormMobile/myRadio/index.d.ts +2 -1
- package/es/components/DynamicFormMobile/mySelect/index.d.ts +2 -1
- package/es/components/DynamicFormMobile/myUpload/index.d.ts +2 -1
- package/es/components/DynamicFormMobile/radioCard/index.d.ts +1 -1
- package/es/components/DynamicFormMobile/selectModel/index.d.ts +1 -1
- package/es/components/DynamicFormMobile/selectModelBackfillFormItem/index.d.ts +1 -1
- package/es/components/DynamicFormMobile/useDynamicForm.d.ts +1 -1
- package/es/components/DynamicFormMobile/useDynamicForm.js +2 -0
- package/es/components/EditTable/index.d.ts +2 -1
- package/es/components/LoopSlide/index.js +1 -0
- package/es/components/SearchTable/index.d.ts +2 -1
- package/es/components/Upload/index.d.ts +1 -1
- package/es/components/VirtualTable/index.d.ts +2 -1
- package/es/components/WorkFlowNode/index.d.ts +1 -1
- package/es/components/common/403.d.ts +2 -1
- package/es/components/common/404.d.ts +2 -1
- package/es/hooks/useCaptcha.d.ts +2 -1
- package/es/hooks/useChangePwd.js +1 -0
- package/es/hooks/useDetailRender.d.ts +3 -2
- package/es/hooks/useUniversalTable.js +7 -0
- package/es/index.js +6 -9
- package/es/mock/index.d.ts +1 -14
- package/es/mock/index.js +9 -1404
- package/es/utils/formRules.js +6 -0
- package/es/utils/hmacSM3.js +40 -4
- package/es/utils/method.js +25 -5
- package/es/utils/szxkFunc.js +1 -0
- package/es/utils/verify-code.js +13 -0
- package/lib/components/AuthButton/index.d.ts +2 -1
- package/lib/components/BackHeader/index.d.ts +1 -1
- package/lib/components/CoralButton/index.d.ts +2 -1
- package/lib/components/CreateForm/index.d.ts +1 -1
- package/lib/components/CustomPagination/index.d.ts +2 -1
- package/lib/components/DynamicForm/func.js +4 -0
- package/lib/components/DynamicForm/index.d.ts +3 -0
- package/lib/components/DynamicForm/myCascader/index.d.ts +1 -1
- package/lib/components/DynamicForm/myCheckbox/index.d.ts +2 -1
- package/lib/components/DynamicForm/myRadio/index.d.ts +2 -1
- package/lib/components/DynamicForm/myRichText/index.d.ts +10 -0
- package/lib/components/DynamicForm/myRichText/index.js +279 -0
- package/lib/components/DynamicForm/myRichText/vite.svg +1 -0
- package/lib/components/DynamicForm/mySelect/index.d.ts +2 -1
- package/lib/components/DynamicForm/mySelect/index.js +49 -13
- package/lib/components/DynamicForm/myUpload/index.d.ts +2 -1
- package/lib/components/DynamicForm/radioCard/index.d.ts +1 -1
- package/lib/components/DynamicForm/selectModel/index.d.ts +1 -1
- package/lib/components/DynamicForm/selectModelBackfillFormItem/index.d.ts +1 -1
- package/lib/components/DynamicForm/useDynamicForm.d.ts +1 -1
- package/lib/components/DynamicForm/useDynamicForm.js +23 -3
- package/lib/components/DynamicFormMobile/index.js +2 -0
- package/lib/components/DynamicFormMobile/myCalendar/index.d.ts +2 -1
- package/lib/components/DynamicFormMobile/myCascader/index.d.ts +1 -1
- package/lib/components/DynamicFormMobile/myCheckbox/index.d.ts +2 -1
- package/lib/components/DynamicFormMobile/myRadio/index.d.ts +2 -1
- package/lib/components/DynamicFormMobile/mySelect/index.d.ts +2 -1
- package/lib/components/DynamicFormMobile/myUpload/index.d.ts +2 -1
- package/lib/components/DynamicFormMobile/radioCard/index.d.ts +1 -1
- package/lib/components/DynamicFormMobile/selectModel/index.d.ts +1 -1
- package/lib/components/DynamicFormMobile/selectModelBackfillFormItem/index.d.ts +1 -1
- package/lib/components/DynamicFormMobile/useDynamicForm.d.ts +1 -1
- package/lib/components/DynamicFormMobile/useDynamicForm.js +2 -0
- package/lib/components/EditTable/index.d.ts +2 -1
- package/lib/components/LoopSlide/index.js +1 -0
- package/lib/components/SearchTable/index.d.ts +2 -1
- package/lib/components/Upload/index.d.ts +1 -1
- package/lib/components/VirtualTable/index.d.ts +2 -1
- package/lib/components/WorkFlowNode/index.d.ts +1 -1
- package/lib/components/common/403.d.ts +2 -1
- package/lib/components/common/404.d.ts +2 -1
- package/lib/hooks/useCaptcha.d.ts +2 -1
- package/lib/hooks/useChangePwd.js +1 -0
- package/lib/hooks/useDetailRender.d.ts +3 -2
- package/lib/hooks/useUniversalTable.js +7 -0
- package/lib/index.js +6 -9
- package/lib/mock/index.d.ts +1 -14
- package/lib/mock/index.js +9 -1404
- package/lib/utils/formRules.js +6 -0
- package/lib/utils/hmacSM3.js +40 -4
- package/lib/utils/method.js +25 -5
- package/lib/utils/szxkFunc.js +1 -0
- package/lib/utils/verify-code.js +13 -0
- package/package.json +10 -1
|
@@ -14,6 +14,7 @@ import MySelect from "./mySelect";
|
|
|
14
14
|
import MyUpload from "./myUpload";
|
|
15
15
|
import MyRadio from "./myRadio";
|
|
16
16
|
import { App, Col, Collapse, Form, Card, Flex, Button, Space, Input, DatePicker, InputNumber, Tooltip } from "antd";
|
|
17
|
+
import MyRichText from "./myRichText";
|
|
17
18
|
dayjs.extend(isoWeek);
|
|
18
19
|
function useDynamicForm(props) {
|
|
19
20
|
const {
|
|
@@ -29,8 +30,11 @@ function useDynamicForm(props) {
|
|
|
29
30
|
actionUrlExtraParams,
|
|
30
31
|
CustomModalComponent,
|
|
31
32
|
isEdit,
|
|
33
|
+
// 新增:是否编辑模式,默认false
|
|
32
34
|
formShowType = "form",
|
|
35
|
+
// 新增:表单展示类型,默认form
|
|
33
36
|
langId,
|
|
37
|
+
// 新增:语言id,默认10001
|
|
34
38
|
getTitle
|
|
35
39
|
} = props;
|
|
36
40
|
const formConfigRef = useRef([]);
|
|
@@ -166,7 +170,8 @@ function useDynamicForm(props) {
|
|
|
166
170
|
var _a, _b, _c, _d, _e;
|
|
167
171
|
return /* @__PURE__ */ jsxs(Flex, { gap: 10, vertical: instructionShowMode === "flex", align: "center", children: [
|
|
168
172
|
/* @__PURE__ */ jsx("span", { children: itemWithJson.attrname }),
|
|
169
|
-
((_a = itemWithJson == null ? void 0 : itemWithJson.json) == null ? void 0 : _a.instruction) && instructionShowMode === "icon" &&
|
|
173
|
+
((_a = itemWithJson == null ? void 0 : itemWithJson.json) == null ? void 0 : _a.instruction) && instructionShowMode === "icon" && // 兼容语言匹配不到时直接展示instruction内容
|
|
174
|
+
/* @__PURE__ */ jsx(Tooltip, { title: (_b = itemWithJson == null ? void 0 : itemWithJson.json) == null ? void 0 : _b.instruction, children: /* @__PURE__ */ jsx(
|
|
170
175
|
InfoCircleOutlined,
|
|
171
176
|
{
|
|
172
177
|
style: {
|
|
@@ -486,7 +491,7 @@ function useDynamicForm(props) {
|
|
|
486
491
|
defaultWidth = 358,
|
|
487
492
|
customWidth = {}
|
|
488
493
|
}) => {
|
|
489
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v;
|
|
494
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w;
|
|
490
495
|
const mode = item.json.input || "text";
|
|
491
496
|
const format = ((_a = item.json) == null ? void 0 : _a.format) || "";
|
|
492
497
|
const attrid = item.attrid;
|
|
@@ -581,6 +586,7 @@ function useDynamicForm(props) {
|
|
|
581
586
|
form.setFieldsValue({
|
|
582
587
|
...form.getFieldsValue(),
|
|
583
588
|
...val
|
|
589
|
+
// 此时 TypeScript 能确定 val 是对象,不会报错
|
|
584
590
|
});
|
|
585
591
|
return;
|
|
586
592
|
}
|
|
@@ -770,6 +776,19 @@ function useDynamicForm(props) {
|
|
|
770
776
|
commonRequestWidthParams
|
|
771
777
|
}
|
|
772
778
|
);
|
|
779
|
+
case "rich-text":
|
|
780
|
+
return /* @__PURE__ */ jsx(
|
|
781
|
+
MyRichText,
|
|
782
|
+
{
|
|
783
|
+
item: item.json,
|
|
784
|
+
readonly: readonly || ((_v = item.json) == null ? void 0 : _v.readonly),
|
|
785
|
+
style: { width, ...itemStyle == null ? void 0 : itemStyle.style, ...customWidth },
|
|
786
|
+
value: item.attrvalue,
|
|
787
|
+
onChange: (value) => {
|
|
788
|
+
form.setFieldValue(item.attrid, value);
|
|
789
|
+
}
|
|
790
|
+
}
|
|
791
|
+
);
|
|
773
792
|
default:
|
|
774
793
|
return /* @__PURE__ */ jsx(
|
|
775
794
|
Input,
|
|
@@ -777,7 +796,7 @@ function useDynamicForm(props) {
|
|
|
777
796
|
placeholder: message2 || placeholder,
|
|
778
797
|
...params,
|
|
779
798
|
showCount: true,
|
|
780
|
-
disabled: readonly || ((
|
|
799
|
+
disabled: readonly || ((_w = item.json) == null ? void 0 : _w.readonly),
|
|
781
800
|
style: { width, ...itemStyle == null ? void 0 : itemStyle.style, ...customWidth }
|
|
782
801
|
}
|
|
783
802
|
);
|
|
@@ -804,6 +823,7 @@ function useDynamicForm(props) {
|
|
|
804
823
|
json: {
|
|
805
824
|
...json,
|
|
806
825
|
...item.json || {}
|
|
826
|
+
// 确保 item.json 中的动态更新能覆盖解析的值
|
|
807
827
|
}
|
|
808
828
|
};
|
|
809
829
|
if (((_a = itemWithJson.json) == null ? void 0 : _a.hide) === true) {
|
|
@@ -80,6 +80,7 @@ const DynamicForm = forwardRef((props, ref) => {
|
|
|
80
80
|
justify: "space-between",
|
|
81
81
|
style: {
|
|
82
82
|
height: 44,
|
|
83
|
+
// width: 'calc(100vw - 32px)',
|
|
83
84
|
marginLeft: 16,
|
|
84
85
|
marginRight: 16,
|
|
85
86
|
borderBottom: "1px solid #E3E3E3"
|
|
@@ -103,6 +104,7 @@ const DynamicForm = forwardRef((props, ref) => {
|
|
|
103
104
|
formItemStyle,
|
|
104
105
|
isFormListItem: true,
|
|
105
106
|
formListField: field
|
|
107
|
+
// isShowLabel: false,
|
|
106
108
|
}) }, index);
|
|
107
109
|
}) })
|
|
108
110
|
]
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
import { CalendarProps, CalendarType } from 'react-vant';
|
|
2
3
|
declare const StringCompatibleCalendar: (props: {
|
|
3
4
|
value?: string | string[] | undefined;
|
|
4
5
|
onChange?: ((date: string | string[]) => void) | undefined;
|
|
5
6
|
langId: string;
|
|
6
7
|
type?: CalendarType | undefined;
|
|
7
|
-
} & CalendarProps) => import("react
|
|
8
|
+
} & CalendarProps) => import("react").JSX.Element;
|
|
8
9
|
export default StringCompatibleCalendar;
|
|
@@ -14,5 +14,5 @@ interface MyCascaderProps {
|
|
|
14
14
|
actionUrlExtraParams: object;
|
|
15
15
|
langId: string;
|
|
16
16
|
}
|
|
17
|
-
declare const MyCascader: ({ item, readonly, value, onChange, style, commonRequestWidthParams, commonRequest, interfaceTypeDict, interfaceTypeSysDict, actionUrlKey, actionUrlExtraParams, langId, }: MyCascaderProps) => import("react
|
|
17
|
+
declare const MyCascader: ({ item, readonly, value, onChange, style, commonRequestWidthParams, commonRequest, interfaceTypeDict, interfaceTypeSysDict, actionUrlKey, actionUrlExtraParams, langId, }: MyCascaderProps) => import("react").JSX.Element;
|
|
18
18
|
export default MyCascader;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
import { AxiosResponse } from 'axios';
|
|
2
3
|
import { Ijson } from '../../DynamicForm/index.d';
|
|
3
4
|
export interface IMYRadio {
|
|
@@ -16,5 +17,5 @@ export interface IMYRadio {
|
|
|
16
17
|
actionUrlExtraParams: object;
|
|
17
18
|
langId?: string;
|
|
18
19
|
}
|
|
19
|
-
declare const MyCheckbox: (props: IMYRadio) => import("react
|
|
20
|
+
declare const MyCheckbox: (props: IMYRadio) => import("react").JSX.Element;
|
|
20
21
|
export default MyCheckbox;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
import { RadioChangeEvent } from 'antd';
|
|
2
3
|
import { AxiosResponse } from 'axios';
|
|
3
4
|
import { Ijson } from '../../DynamicForm/index.d';
|
|
@@ -17,5 +18,5 @@ export interface IMYRadio {
|
|
|
17
18
|
actionUrlExtraParams: object;
|
|
18
19
|
langId?: string;
|
|
19
20
|
}
|
|
20
|
-
declare const MyRadio: (props: IMYRadio) => import("react
|
|
21
|
+
declare const MyRadio: (props: IMYRadio) => import("react").JSX.Element;
|
|
21
22
|
export default MyRadio;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
import { Ijson } from '../index.d';
|
|
2
3
|
import { AxiosResponse } from 'axios';
|
|
3
4
|
declare const MySelect: ({ item, readonly, style, commonRequestWidthParams, commonRequest, value, onChange, interfaceTypeDict, interfaceTypeSysDict, actionUrlKey, actionUrlExtraParams, langId, getTitle, attrid, }: {
|
|
@@ -15,5 +16,5 @@ declare const MySelect: ({ item, readonly, style, commonRequestWidthParams, comm
|
|
|
15
16
|
langId?: string | undefined;
|
|
16
17
|
getTitle?: ((pageID: string, dataID: string) => string) | undefined;
|
|
17
18
|
attrid?: string | undefined;
|
|
18
|
-
}) => import("react
|
|
19
|
+
}) => import("react").JSX.Element;
|
|
19
20
|
export default MySelect;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
import { UploadFile } from 'antd/es/upload/interface';
|
|
2
3
|
import { Ijson } from '../index.d';
|
|
3
4
|
interface IMYUpload {
|
|
@@ -13,5 +14,5 @@ interface IMYUpload {
|
|
|
13
14
|
relatedidKey: string;
|
|
14
15
|
langId?: string;
|
|
15
16
|
}
|
|
16
|
-
declare const MyUpload: (props: IMYUpload) => import("react
|
|
17
|
+
declare const MyUpload: (props: IMYUpload) => import("react").JSX.Element;
|
|
17
18
|
export default MyUpload;
|
|
@@ -8,5 +8,5 @@ interface RadioCardProps {
|
|
|
8
8
|
style?: React.CSSProperties;
|
|
9
9
|
commonRequestWidthParams: (params: object, data?: any) => Promise<AxiosResponse<any, any>>;
|
|
10
10
|
}
|
|
11
|
-
declare const RadioCard: ({ item, readonly, value, onChange, style, commonRequestWidthParams }: RadioCardProps) => import("react
|
|
11
|
+
declare const RadioCard: ({ item, readonly, value, onChange, style, commonRequestWidthParams }: RadioCardProps) => import("react").JSX.Element;
|
|
12
12
|
export default RadioCard;
|
|
@@ -12,7 +12,7 @@ interface SelectModelProps {
|
|
|
12
12
|
CustomModalComponent?: React.FC<ICustomModal>;
|
|
13
13
|
langId?: string;
|
|
14
14
|
}
|
|
15
|
-
declare function SelectModel(props: SelectModelProps):
|
|
15
|
+
declare function SelectModel(props: SelectModelProps): React.JSX.Element;
|
|
16
16
|
/**
|
|
17
17
|
*
|
|
18
18
|
* @param selectedRows 选中的行数据
|
|
@@ -18,7 +18,7 @@ interface SelectModelProps {
|
|
|
18
18
|
langId?: string;
|
|
19
19
|
getTitle?: (pageID: string, dataID: string) => string;
|
|
20
20
|
}
|
|
21
|
-
declare function SelectModel(props: SelectModelProps):
|
|
21
|
+
declare function SelectModel(props: SelectModelProps): React.JSX.Element;
|
|
22
22
|
/**
|
|
23
23
|
*
|
|
24
24
|
* @param selectedRows 选中的行数据
|
|
@@ -40,7 +40,7 @@ declare function useDynamicForm(props: IDynamicFormProps): {
|
|
|
40
40
|
isFormListItem?: boolean | undefined;
|
|
41
41
|
formListField?: NestedFormListFieldData | undefined;
|
|
42
42
|
isShowLabel?: boolean | undefined;
|
|
43
|
-
}) => import("react
|
|
43
|
+
}) => import("react").JSX.Element | null;
|
|
44
44
|
handleSetFormItemInitialValue: (itemWithJson: import(".").IformConfigItem) => any;
|
|
45
45
|
};
|
|
46
46
|
export default useDynamicForm;
|
|
@@ -302,6 +302,7 @@ function useDynamicForm(props) {
|
|
|
302
302
|
style: {
|
|
303
303
|
flex: width,
|
|
304
304
|
pointerEvents: readonly ? "none" : "auto",
|
|
305
|
+
// 关键:禁用时阻止所有鼠标事件
|
|
305
306
|
opacity: readonly ? 0.5 : 1,
|
|
306
307
|
display: hidden ? "none" : "flex"
|
|
307
308
|
},
|
|
@@ -361,6 +362,7 @@ function useDynamicForm(props) {
|
|
|
361
362
|
initialValue,
|
|
362
363
|
style: {
|
|
363
364
|
pointerEvents: readonly ? "none" : "auto",
|
|
365
|
+
// 关键:禁用时阻止所有鼠标事件
|
|
364
366
|
opacity: readonly ? 0.5 : 1,
|
|
365
367
|
display: hidden ? "none" : "flex"
|
|
366
368
|
},
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { TableProps } from "antd";
|
|
2
2
|
import { Rule } from "antd/es/form";
|
|
3
3
|
import { ColumnType } from "antd/es/table";
|
|
4
|
+
import React from "react";
|
|
4
5
|
import { ValueProps, ValueType } from "../CreateForm";
|
|
5
6
|
export type ColumnsType<RecordType> = ColumnType<RecordType> & {
|
|
6
7
|
editable?: boolean;
|
|
@@ -13,5 +14,5 @@ export interface EditTableProps<RecordType> extends Omit<TableProps<RecordType>,
|
|
|
13
14
|
columns: ColumnsType<RecordType>[];
|
|
14
15
|
onChange?: (row: RecordType) => void;
|
|
15
16
|
}
|
|
16
|
-
declare function EditTable<DataType extends object = any>(props: EditTableProps<DataType>):
|
|
17
|
+
declare function EditTable<DataType extends object = any>(props: EditTableProps<DataType>): React.JSX.Element;
|
|
17
18
|
export default EditTable;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
import { TableProps } from 'antd';
|
|
2
3
|
import { ColumnType } from 'antd/es/table';
|
|
3
4
|
import { CreateFormProps } from '../CreateForm';
|
|
@@ -27,5 +28,5 @@ export interface SearchTableProps<RecordType> {
|
|
|
27
28
|
tableProps?: MTableProps<RecordType>;
|
|
28
29
|
langId?: string;
|
|
29
30
|
}
|
|
30
|
-
declare function SearchTable<RecordType extends object = any>(props: SearchTableProps<RecordType>): import("react
|
|
31
|
+
declare function SearchTable<RecordType extends object = any>(props: SearchTableProps<RecordType>): import("react").JSX.Element;
|
|
31
32
|
export default SearchTable;
|
|
@@ -10,5 +10,5 @@ export interface UploadFileProps extends UploadProps {
|
|
|
10
10
|
limit?: number;
|
|
11
11
|
};
|
|
12
12
|
}
|
|
13
|
-
declare const UploadFile: (props: UploadFileProps) => import("react
|
|
13
|
+
declare const UploadFile: (props: UploadFileProps) => import("react").JSX.Element;
|
|
14
14
|
export default UploadFile;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
import { EditTableProps } from "../EditTable";
|
|
2
|
-
declare function VirtualTable<DataType extends object = any>(props: EditTableProps<DataType>): import("react
|
|
3
|
+
declare function VirtualTable<DataType extends object = any>(props: EditTableProps<DataType>): import("react").JSX.Element;
|
|
3
4
|
export default VirtualTable;
|
|
@@ -7,7 +7,7 @@ interface WorkFlowNodeProps {
|
|
|
7
7
|
rowKey: string | ((record: any) => Key);
|
|
8
8
|
renderContent?: (record: any, index: number, currentIndex: number) => ReactNode;
|
|
9
9
|
}
|
|
10
|
-
export declare const WorkFlowNode: (props: WorkFlowNodeProps) => import("react
|
|
10
|
+
export declare const WorkFlowNode: (props: WorkFlowNodeProps) => import("react").JSX.Element;
|
|
11
11
|
interface showWorkFlow extends WorkFlowNodeProps, ModalFuncProps {
|
|
12
12
|
}
|
|
13
13
|
declare const showWorkFlow: (props: showWorkFlow) => null;
|
package/es/hooks/useCaptcha.d.ts
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
interface useCaptchaProps {
|
|
2
3
|
request: () => Promise<any>;
|
|
3
4
|
imgKey?: string;
|
|
4
5
|
}
|
|
5
6
|
export default function useCaptcha(props: useCaptchaProps): {
|
|
6
7
|
data: any;
|
|
7
|
-
renderCaptcha: () => import("react
|
|
8
|
+
renderCaptcha: () => import("react").JSX.Element;
|
|
8
9
|
loading: any;
|
|
9
10
|
refresh: any;
|
|
10
11
|
};
|
package/es/hooks/useChangePwd.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
/**
|
|
2
3
|
* 宠物详情渲染 Hook
|
|
3
4
|
* @param attrList 属性列表数据
|
|
@@ -12,7 +13,7 @@ interface IAttrSetDetailRendererProps {
|
|
|
12
13
|
layoutType?: 'row' | 'flex';
|
|
13
14
|
}
|
|
14
15
|
export default function useDetailRender({ labelSpan, valueSpan, imgWidth, imgHeight, layoutType, }: IAttrSetDetailRendererProps): {
|
|
15
|
-
renderDetail: (
|
|
16
|
+
renderDetail: (this: unknown, args_0: {
|
|
16
17
|
attrList?: any[] | undefined;
|
|
17
18
|
detailList?: any[] | undefined;
|
|
18
19
|
span?: number | undefined;
|
|
@@ -21,6 +22,6 @@ export default function useDetailRender({ labelSpan, valueSpan, imgWidth, imgHei
|
|
|
21
22
|
beforeExtraValue?: string | undefined;
|
|
22
23
|
operationColumn?: any;
|
|
23
24
|
langConfig?: any[] | undefined;
|
|
24
|
-
}) => import("react
|
|
25
|
+
}) => import("react").JSX.Element;
|
|
25
26
|
};
|
|
26
27
|
export {};
|
|
@@ -191,12 +191,14 @@ function useUniversalTable() {
|
|
|
191
191
|
shape: "default",
|
|
192
192
|
style: { ...defaultSearchStyle, ...styles == null ? void 0 : styles.searchStyle },
|
|
193
193
|
onClick: (values) => handleSearch(values, selListData)
|
|
194
|
+
// 传入当前的selListData
|
|
194
195
|
},
|
|
195
196
|
{
|
|
196
197
|
btnType: "reset",
|
|
197
198
|
title: resetText,
|
|
198
199
|
style: { ...defaultResetStyle, ...styles == null ? void 0 : styles.resetStyle },
|
|
199
200
|
onClick: () => handleReset(selListData)
|
|
201
|
+
// 传入当前的selListData
|
|
200
202
|
}
|
|
201
203
|
],
|
|
202
204
|
colProps: {
|
|
@@ -220,6 +222,7 @@ function useUniversalTable() {
|
|
|
220
222
|
isDefaultWidth = true,
|
|
221
223
|
otherLangPageId,
|
|
222
224
|
objDefaultLangPageId = "5000000"
|
|
225
|
+
// 处理这种数据时 如果没有拼接页面编号则使用默认编号{"list":["021"],"delimiter":""}
|
|
223
226
|
}) => {
|
|
224
227
|
if (!(universalHeader == null ? void 0 : universalHeader.length))
|
|
225
228
|
return message.error("请配置 universalHeader表头数据");
|
|
@@ -349,6 +352,7 @@ function useUniversalTable() {
|
|
|
349
352
|
}
|
|
350
353
|
const params = {
|
|
351
354
|
instanceid: record == null ? void 0 : record.instanceid,
|
|
355
|
+
//实例id(必传)
|
|
352
356
|
asid: record == null ? void 0 : record.asid,
|
|
353
357
|
...obj
|
|
354
358
|
};
|
|
@@ -475,8 +479,11 @@ function useUniversalTable() {
|
|
|
475
479
|
return list.map((item) => {
|
|
476
480
|
const current = {
|
|
477
481
|
label: item[label],
|
|
482
|
+
// 标签字段
|
|
478
483
|
value: item[value],
|
|
484
|
+
// 值字段(示例中与info一致)
|
|
479
485
|
children: []
|
|
486
|
+
// 子节点初始化为空数组
|
|
480
487
|
};
|
|
481
488
|
if (Array.isArray(item[children]) && item[children].length > 0) {
|
|
482
489
|
current.children = recursionTransform(item[children]);
|
package/es/index.js
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { handleAttrList, handleSubmitForm } from "./utils/method";
|
|
3
|
-
import { BackHeader,
|
|
3
|
+
import { BackHeader, DynamicForm } from "./main";
|
|
4
4
|
import { BrowserRouter } from "react-router-dom";
|
|
5
|
-
import { ConfigProvider, App } from "antd";
|
|
6
|
-
import { Form } from "react-vant";
|
|
5
|
+
import { ConfigProvider, App, Form, Button } from "antd";
|
|
7
6
|
import { useRef, useState, useEffect } from "react";
|
|
8
7
|
import ReactDOM from "react-dom/client";
|
|
9
8
|
import zhCN from "antd/es/locale/zh_CN";
|
|
@@ -21,13 +20,11 @@ const Demo = () => {
|
|
|
21
20
|
};
|
|
22
21
|
useEffect(() => {
|
|
23
22
|
setList(handleAttrList(attrList));
|
|
24
|
-
setTimeout(() => {
|
|
25
|
-
}, 2e3);
|
|
26
23
|
}, []);
|
|
27
24
|
const onFinish = async (values) => {
|
|
28
25
|
handleSubmitForm(
|
|
29
26
|
{
|
|
30
|
-
attr_list:
|
|
27
|
+
attr_list: list
|
|
31
28
|
},
|
|
32
29
|
values
|
|
33
30
|
);
|
|
@@ -36,14 +33,13 @@ const Demo = () => {
|
|
|
36
33
|
/* @__PURE__ */ jsx(BackHeader, { title: "页头组件", isBack: true }),
|
|
37
34
|
/* @__PURE__ */ jsx("div", { style: { padding: "20px" }, children: /* @__PURE__ */ jsxs(Form, { form, onValuesChange, layout: "vertical", onFinish, children: [
|
|
38
35
|
/* @__PURE__ */ jsx(
|
|
39
|
-
|
|
36
|
+
DynamicForm,
|
|
40
37
|
{
|
|
41
38
|
formConfig: list,
|
|
42
39
|
readonly: false,
|
|
43
40
|
form,
|
|
44
41
|
relatedid: "guid",
|
|
45
42
|
colNum: 1,
|
|
46
|
-
defaultWidth: 358,
|
|
47
43
|
commonRequestWidthParams: () => {
|
|
48
44
|
return new Promise((resolve, reject) => {
|
|
49
45
|
});
|
|
@@ -58,7 +54,7 @@ const Demo = () => {
|
|
|
58
54
|
langId
|
|
59
55
|
}
|
|
60
56
|
),
|
|
61
|
-
/* @__PURE__ */ jsx(Form.Item, { name: "submit", style: { marginLeft: "auto" } })
|
|
57
|
+
/* @__PURE__ */ jsx(Form.Item, { name: "submit", style: { marginLeft: "auto" }, children: /* @__PURE__ */ jsx(Button, { type: "primary", htmlType: "submit", children: "Submit" }) })
|
|
62
58
|
] }) }),
|
|
63
59
|
/* @__PURE__ */ jsxs("div", { children: [
|
|
64
60
|
"2. 测试循环滚动组件",
|
|
@@ -69,6 +65,7 @@ const Demo = () => {
|
|
|
69
65
|
height: "400px",
|
|
70
66
|
border: "1px solid #333",
|
|
71
67
|
margin: "20px"
|
|
68
|
+
// backgroundColor: '#000',
|
|
72
69
|
}
|
|
73
70
|
}
|
|
74
71
|
)
|
package/es/mock/index.d.ts
CHANGED
|
@@ -1,16 +1,3 @@
|
|
|
1
1
|
export declare const baseAttrList: never[];
|
|
2
2
|
export declare const attrList: any;
|
|
3
|
-
export declare const langConfig:
|
|
4
|
-
jxqyglbh: string;
|
|
5
|
-
lanid: string;
|
|
6
|
-
sysid: string;
|
|
7
|
-
sysname: string;
|
|
8
|
-
systype: string;
|
|
9
|
-
pageid: string;
|
|
10
|
-
pageinfo: string;
|
|
11
|
-
dataid: string;
|
|
12
|
-
datainfo: string;
|
|
13
|
-
dicid: string;
|
|
14
|
-
info: string;
|
|
15
|
-
content: string;
|
|
16
|
-
}[];
|
|
3
|
+
export declare const langConfig: never[];
|