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
|
@@ -303,6 +303,7 @@ function useDynamicForm(props) {
|
|
|
303
303
|
style: {
|
|
304
304
|
flex: width,
|
|
305
305
|
pointerEvents: readonly ? "none" : "auto",
|
|
306
|
+
// 关键:禁用时阻止所有鼠标事件
|
|
306
307
|
opacity: readonly ? 0.5 : 1,
|
|
307
308
|
display: hidden ? "none" : "flex"
|
|
308
309
|
},
|
|
@@ -362,6 +363,7 @@ function useDynamicForm(props) {
|
|
|
362
363
|
initialValue,
|
|
363
364
|
style: {
|
|
364
365
|
pointerEvents: readonly ? "none" : "auto",
|
|
366
|
+
// 关键:禁用时阻止所有鼠标事件
|
|
365
367
|
opacity: readonly ? 0.5 : 1,
|
|
366
368
|
display: hidden ? "none" : "flex"
|
|
367
369
|
},
|
|
@@ -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;
|
|
@@ -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
|
};
|
|
@@ -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 {};
|
|
@@ -192,12 +192,14 @@ function useUniversalTable() {
|
|
|
192
192
|
shape: "default",
|
|
193
193
|
style: { ...defaultSearchStyle, ...styles == null ? void 0 : styles.searchStyle },
|
|
194
194
|
onClick: (values) => handleSearch(values, selListData)
|
|
195
|
+
// 传入当前的selListData
|
|
195
196
|
},
|
|
196
197
|
{
|
|
197
198
|
btnType: "reset",
|
|
198
199
|
title: resetText,
|
|
199
200
|
style: { ...defaultResetStyle, ...styles == null ? void 0 : styles.resetStyle },
|
|
200
201
|
onClick: () => handleReset(selListData)
|
|
202
|
+
// 传入当前的selListData
|
|
201
203
|
}
|
|
202
204
|
],
|
|
203
205
|
colProps: {
|
|
@@ -221,6 +223,7 @@ function useUniversalTable() {
|
|
|
221
223
|
isDefaultWidth = true,
|
|
222
224
|
otherLangPageId,
|
|
223
225
|
objDefaultLangPageId = "5000000"
|
|
226
|
+
// 处理这种数据时 如果没有拼接页面编号则使用默认编号{"list":["021"],"delimiter":""}
|
|
224
227
|
}) => {
|
|
225
228
|
if (!(universalHeader == null ? void 0 : universalHeader.length))
|
|
226
229
|
return message.error("请配置 universalHeader表头数据");
|
|
@@ -350,6 +353,7 @@ function useUniversalTable() {
|
|
|
350
353
|
}
|
|
351
354
|
const params = {
|
|
352
355
|
instanceid: record == null ? void 0 : record.instanceid,
|
|
356
|
+
//实例id(必传)
|
|
353
357
|
asid: record == null ? void 0 : record.asid,
|
|
354
358
|
...obj
|
|
355
359
|
};
|
|
@@ -476,8 +480,11 @@ function useUniversalTable() {
|
|
|
476
480
|
return list.map((item) => {
|
|
477
481
|
const current = {
|
|
478
482
|
label: item[label],
|
|
483
|
+
// 标签字段
|
|
479
484
|
value: item[value],
|
|
485
|
+
// 值字段(示例中与info一致)
|
|
480
486
|
children: []
|
|
487
|
+
// 子节点初始化为空数组
|
|
481
488
|
};
|
|
482
489
|
if (Array.isArray(item[children]) && item[children].length > 0) {
|
|
483
490
|
current.children = recursionTransform(item[children]);
|
package/lib/index.js
CHANGED
|
@@ -4,7 +4,6 @@ const method = require("./utils/method");
|
|
|
4
4
|
const main = require("./main");
|
|
5
5
|
const reactRouterDom = require("react-router-dom");
|
|
6
6
|
const antd = require("antd");
|
|
7
|
-
const reactVant = require("react-vant");
|
|
8
7
|
const react = require("react");
|
|
9
8
|
const ReactDOM = require("react-dom/client");
|
|
10
9
|
const zhCN = require("antd/es/locale/zh_CN");
|
|
@@ -15,36 +14,33 @@ const tableDetail = "";
|
|
|
15
14
|
dayjs.locale("zh-cn");
|
|
16
15
|
const Demo = () => {
|
|
17
16
|
const formRef = react.useRef(null);
|
|
18
|
-
const [form] =
|
|
17
|
+
const [form] = antd.Form.useForm();
|
|
19
18
|
const [list, setList] = react.useState([]);
|
|
20
19
|
const [langId, setLangId] = react.useState("");
|
|
21
20
|
const onValuesChange = async (values, allValues) => {
|
|
22
21
|
};
|
|
23
22
|
react.useEffect(() => {
|
|
24
23
|
setList(method.handleAttrList(mock.attrList));
|
|
25
|
-
setTimeout(() => {
|
|
26
|
-
}, 2e3);
|
|
27
24
|
}, []);
|
|
28
25
|
const onFinish = async (values) => {
|
|
29
26
|
method.handleSubmitForm(
|
|
30
27
|
{
|
|
31
|
-
attr_list:
|
|
28
|
+
attr_list: list
|
|
32
29
|
},
|
|
33
30
|
values
|
|
34
31
|
);
|
|
35
32
|
};
|
|
36
33
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { height: "100vh", display: "flex", flexDirection: "column", gap: 20 }, children: [
|
|
37
34
|
/* @__PURE__ */ jsxRuntime.jsx(main.BackHeader, { title: "页头组件", isBack: true }),
|
|
38
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { style: { padding: "20px" }, children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
35
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { style: { padding: "20px" }, children: /* @__PURE__ */ jsxRuntime.jsxs(antd.Form, { form, onValuesChange, layout: "vertical", onFinish, children: [
|
|
39
36
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
40
|
-
main.
|
|
37
|
+
main.DynamicForm,
|
|
41
38
|
{
|
|
42
39
|
formConfig: list,
|
|
43
40
|
readonly: false,
|
|
44
41
|
form,
|
|
45
42
|
relatedid: "guid",
|
|
46
43
|
colNum: 1,
|
|
47
|
-
defaultWidth: 358,
|
|
48
44
|
commonRequestWidthParams: () => {
|
|
49
45
|
return new Promise((resolve, reject) => {
|
|
50
46
|
});
|
|
@@ -59,7 +55,7 @@ const Demo = () => {
|
|
|
59
55
|
langId
|
|
60
56
|
}
|
|
61
57
|
),
|
|
62
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
58
|
+
/* @__PURE__ */ jsxRuntime.jsx(antd.Form.Item, { name: "submit", style: { marginLeft: "auto" }, children: /* @__PURE__ */ jsxRuntime.jsx(antd.Button, { type: "primary", htmlType: "submit", children: "Submit" }) })
|
|
63
59
|
] }) }),
|
|
64
60
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
65
61
|
"2. 测试循环滚动组件",
|
|
@@ -70,6 +66,7 @@ const Demo = () => {
|
|
|
70
66
|
height: "400px",
|
|
71
67
|
border: "1px solid #333",
|
|
72
68
|
margin: "20px"
|
|
69
|
+
// backgroundColor: '#000',
|
|
73
70
|
}
|
|
74
71
|
}
|
|
75
72
|
)
|
package/lib/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[];
|