szld-libs 0.4.16 → 0.4.17
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/szld-components.es.js +239 -239
- package/dist/szld-components.umd.js +1 -1
- package/es/components/DynamicForm/mySelect/index.js +1 -0
- package/es/index.js +4 -16
- package/es/mock/index.js +231 -39
- package/lib/components/DynamicForm/mySelect/index.js +1 -0
- package/lib/index.js +4 -16
- package/lib/mock/index.js +231 -39
- package/package.json +1 -1
package/es/index.js
CHANGED
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { commonRequestWidthParams, uploadFormAction, commonRequest } from "./services";
|
|
3
|
-
import {
|
|
4
|
-
import { BackHeader, DynamicFormMobile } from "./main";
|
|
3
|
+
import { BackHeader, DynamicForm } from "./main";
|
|
5
4
|
import { BrowserRouter } from "react-router-dom";
|
|
6
|
-
import { ConfigProvider, App } from "antd";
|
|
7
|
-
import { Form } from "react-vant";
|
|
5
|
+
import { ConfigProvider, App, Form } from "antd";
|
|
8
6
|
import { useRef, useState, useEffect } from "react";
|
|
9
7
|
import ReactDOM from "react-dom/client";
|
|
10
8
|
import zhCN from "antd/es/locale/zh_CN";
|
|
@@ -22,23 +20,14 @@ const Demo = () => {
|
|
|
22
20
|
const onValuesChange = async (values, allValues) => {
|
|
23
21
|
};
|
|
24
22
|
useEffect(() => {
|
|
25
|
-
setList(
|
|
26
|
-
setTimeout(() => {
|
|
27
|
-
form.setFieldsValue({
|
|
28
|
-
customFormList: [
|
|
29
|
-
{
|
|
30
|
-
"30BDE6E7977E40069B55DDE61C8795AE": "2026-05-29"
|
|
31
|
-
}
|
|
32
|
-
]
|
|
33
|
-
});
|
|
34
|
-
}, 2e3);
|
|
23
|
+
setList(attrList);
|
|
35
24
|
}, []);
|
|
36
25
|
const onFinish = async (values) => {
|
|
37
26
|
};
|
|
38
27
|
return /* @__PURE__ */ jsxs("div", { style: { height: "100vh", display: "flex", flexDirection: "column", gap: 20 }, children: [
|
|
39
28
|
/* @__PURE__ */ jsx(BackHeader, { title: "页头组件", isBack: true }),
|
|
40
29
|
/* @__PURE__ */ jsx("div", { style: { padding: "20px" }, children: /* @__PURE__ */ jsx(Form, { form, onValuesChange, onFinish, children: /* @__PURE__ */ jsx(
|
|
41
|
-
|
|
30
|
+
DynamicForm,
|
|
42
31
|
{
|
|
43
32
|
formConfig: list,
|
|
44
33
|
readonly: false,
|
|
@@ -51,7 +40,6 @@ const Demo = () => {
|
|
|
51
40
|
commonRequest,
|
|
52
41
|
instructionShowMode: "icon",
|
|
53
42
|
ref: formRef,
|
|
54
|
-
formShowType: "table",
|
|
55
43
|
langId
|
|
56
44
|
}
|
|
57
45
|
) }) }),
|
package/es/mock/index.js
CHANGED
|
@@ -2,78 +2,270 @@ const baseAttrList = [];
|
|
|
2
2
|
const attrList = [
|
|
3
3
|
{
|
|
4
4
|
xh: 1,
|
|
5
|
-
asid: "
|
|
5
|
+
asid: "A16FC2DAFC9F4786A0BCE4842F680B21",
|
|
6
6
|
astype: 0,
|
|
7
|
-
tname: "
|
|
8
|
-
attrid: "
|
|
9
|
-
attrname: "
|
|
7
|
+
tname: "tcdkpz_table",
|
|
8
|
+
attrid: "452A52271CB640E8A7EBA64114E41823",
|
|
9
|
+
attrname: "套餐编号",
|
|
10
10
|
attrtype: 0,
|
|
11
|
-
info: '{"
|
|
11
|
+
info: '{"input":"text","dataType":"string","length":100,"auto-generate":true,"auto-generate-type":"guid","hidden":true}',
|
|
12
12
|
info_base64: 0,
|
|
13
|
-
createtime: "2026-
|
|
13
|
+
createtime: "2026-05-20 15:03:42",
|
|
14
14
|
attrvalue: "",
|
|
15
|
-
serialnum:
|
|
16
|
-
children: []
|
|
15
|
+
serialnum: 0,
|
|
16
|
+
children: [],
|
|
17
|
+
json: {
|
|
18
|
+
input: "text",
|
|
19
|
+
dataType: "string",
|
|
20
|
+
length: 100,
|
|
21
|
+
"auto-generate": true,
|
|
22
|
+
"auto-generate-type": "guid",
|
|
23
|
+
hidden: true
|
|
24
|
+
}
|
|
17
25
|
},
|
|
18
26
|
{
|
|
19
27
|
xh: 2,
|
|
20
|
-
asid: "
|
|
28
|
+
asid: "A16FC2DAFC9F4786A0BCE4842F680B21",
|
|
21
29
|
astype: 0,
|
|
22
|
-
tname: "
|
|
23
|
-
attrid: "
|
|
24
|
-
attrname: "
|
|
30
|
+
tname: "tcdkpz_table",
|
|
31
|
+
attrid: "8B8A0AE3A5EB498982E03F4EA937A3E0",
|
|
32
|
+
attrname: "顺序号",
|
|
25
33
|
attrtype: 0,
|
|
26
|
-
info: '{"input":"
|
|
34
|
+
info: '{"input":"number","dataType":"int","must":true}',
|
|
27
35
|
info_base64: 0,
|
|
28
|
-
createtime: "2026-
|
|
36
|
+
createtime: "2026-05-22 14:56:07",
|
|
29
37
|
attrvalue: "",
|
|
30
|
-
serialnum:
|
|
31
|
-
children: []
|
|
38
|
+
serialnum: 1,
|
|
39
|
+
children: [],
|
|
40
|
+
json: {
|
|
41
|
+
input: "number",
|
|
42
|
+
dataType: "int",
|
|
43
|
+
must: true
|
|
44
|
+
}
|
|
32
45
|
},
|
|
33
46
|
{
|
|
34
47
|
xh: 3,
|
|
35
|
-
asid: "
|
|
48
|
+
asid: "A16FC2DAFC9F4786A0BCE4842F680B21",
|
|
36
49
|
astype: 0,
|
|
37
|
-
tname: "
|
|
38
|
-
attrid: "
|
|
39
|
-
attrname: "
|
|
50
|
+
tname: "tcdkpz_table",
|
|
51
|
+
attrid: "A8D4CF41106F4E1F8090A767F962A744",
|
|
52
|
+
attrname: "套餐说明",
|
|
40
53
|
attrtype: 0,
|
|
41
|
-
info: '{"input":"
|
|
54
|
+
info: '{"input":"text","dataType":"string","length":200,"must":true}',
|
|
42
55
|
info_base64: 0,
|
|
43
|
-
createtime: "2026-
|
|
56
|
+
createtime: "2026-05-20 15:03:42",
|
|
44
57
|
attrvalue: "",
|
|
45
|
-
serialnum:
|
|
46
|
-
children: []
|
|
58
|
+
serialnum: 2,
|
|
59
|
+
children: [],
|
|
60
|
+
json: {
|
|
61
|
+
input: "text",
|
|
62
|
+
dataType: "string",
|
|
63
|
+
length: 200,
|
|
64
|
+
must: true
|
|
65
|
+
}
|
|
47
66
|
},
|
|
48
67
|
{
|
|
49
68
|
xh: 4,
|
|
50
|
-
asid: "
|
|
69
|
+
asid: "A16FC2DAFC9F4786A0BCE4842F680B21",
|
|
51
70
|
astype: 0,
|
|
52
|
-
tname: "
|
|
53
|
-
attrid: "
|
|
54
|
-
attrname: "
|
|
71
|
+
tname: "tcdkpz_table",
|
|
72
|
+
attrid: "350AF384E18C490D862A3B930A7DED8B",
|
|
73
|
+
attrname: "关联服务编号",
|
|
55
74
|
attrtype: 0,
|
|
56
|
-
info: '{"input":"text","dataType":"string","length":
|
|
75
|
+
info: '{"input":"text","dataType":"string","length":100,"must":true,"hidden":true}',
|
|
57
76
|
info_base64: 0,
|
|
58
|
-
createtime: "2026-
|
|
77
|
+
createtime: "2026-05-20 15:03:42",
|
|
59
78
|
attrvalue: "",
|
|
60
|
-
serialnum:
|
|
61
|
-
children: []
|
|
79
|
+
serialnum: 3,
|
|
80
|
+
children: [],
|
|
81
|
+
json: {
|
|
82
|
+
input: "text",
|
|
83
|
+
dataType: "string",
|
|
84
|
+
length: 100,
|
|
85
|
+
must: true,
|
|
86
|
+
hidden: true
|
|
87
|
+
}
|
|
62
88
|
},
|
|
63
89
|
{
|
|
64
90
|
xh: 5,
|
|
65
|
-
asid: "
|
|
91
|
+
asid: "A16FC2DAFC9F4786A0BCE4842F680B21",
|
|
92
|
+
astype: 0,
|
|
93
|
+
tname: "tcdkpz_table",
|
|
94
|
+
attrid: "06DDAB9B8DC34A6FB65602238FF35DAD",
|
|
95
|
+
attrname: "关联服务名称",
|
|
96
|
+
attrtype: 0,
|
|
97
|
+
info: '{"input":"select","inputType":"instance-url","dataType":"string","length":100,"instance-source-number":"5000245","key-field":{"06DDAB9B8DC34A6FB65602238FF35DAD":{"list":["003AB3221AE84161B87368F67FD7F4F4"],"delimiter":"-"},"350AF384E18C490D862A3B930A7DED8B":{"list":["B4604AEB3C3C46239958C90C98911839"],"delimiter":","}}}',
|
|
98
|
+
info_base64: 0,
|
|
99
|
+
createtime: "2026-05-25 16:00:07",
|
|
100
|
+
attrvalue: "",
|
|
101
|
+
serialnum: 4,
|
|
102
|
+
children: [],
|
|
103
|
+
json: {
|
|
104
|
+
input: "select",
|
|
105
|
+
inputType: "instance-url",
|
|
106
|
+
dataType: "string",
|
|
107
|
+
length: 100,
|
|
108
|
+
"instance-source-number": "5000245",
|
|
109
|
+
"key-field": {
|
|
110
|
+
"06DDAB9B8DC34A6FB65602238FF35DAD": {
|
|
111
|
+
list: ["003AB3221AE84161B87368F67FD7F4F4"],
|
|
112
|
+
delimiter: "-"
|
|
113
|
+
},
|
|
114
|
+
"350AF384E18C490D862A3B930A7DED8B": {
|
|
115
|
+
list: ["B4604AEB3C3C46239958C90C98911839"],
|
|
116
|
+
delimiter: ","
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
},
|
|
121
|
+
{
|
|
122
|
+
xh: 6,
|
|
123
|
+
asid: "A16FC2DAFC9F4786A0BCE4842F680B21",
|
|
66
124
|
astype: 0,
|
|
67
|
-
tname: "
|
|
68
|
-
attrid: "
|
|
69
|
-
attrname: "
|
|
125
|
+
tname: "tcdkpz_table",
|
|
126
|
+
attrid: "78B7A74ECE664836917FEB4502965E14",
|
|
127
|
+
attrname: "关联房型编号",
|
|
70
128
|
attrtype: 0,
|
|
71
|
-
info: '{"input":"text","dataType":"string","length":
|
|
129
|
+
info: '{"input":"text","dataType":"string","length":100,"hidden":true}',
|
|
72
130
|
info_base64: 0,
|
|
73
|
-
createtime: "2026-
|
|
131
|
+
createtime: "2026-05-25 16:00:16",
|
|
74
132
|
attrvalue: "",
|
|
75
133
|
serialnum: 5,
|
|
76
|
-
children: []
|
|
134
|
+
children: [],
|
|
135
|
+
json: {
|
|
136
|
+
input: "text",
|
|
137
|
+
dataType: "string",
|
|
138
|
+
length: 100,
|
|
139
|
+
hidden: true
|
|
140
|
+
}
|
|
141
|
+
},
|
|
142
|
+
{
|
|
143
|
+
xh: 7,
|
|
144
|
+
asid: "A16FC2DAFC9F4786A0BCE4842F680B21",
|
|
145
|
+
astype: 0,
|
|
146
|
+
tname: "tcdkpz_table",
|
|
147
|
+
attrid: "AFFAD31706E84259B4A3FF71F0752362",
|
|
148
|
+
attrname: "关联房型名称",
|
|
149
|
+
attrtype: 0,
|
|
150
|
+
info: '{"input":"text","inputType":"instance-url","dataType":"string","length":100,"instance-source-number":5000033,"key-field":{"AFFAD31706E84259B4A3FF71F0752362":{"list":["DCC3C536A7BC41A2B972CA8779FC3CAC"],"delimiter":"-"},"78B7A74ECE664836917FEB4502965E14":{"list":["1710D157CDFF46A7A4E4501095C8ACBE"],"delimiter":","}}}',
|
|
151
|
+
info_base64: 0,
|
|
152
|
+
createtime: "2026-05-25 16:00:36",
|
|
153
|
+
attrvalue: "",
|
|
154
|
+
serialnum: 6,
|
|
155
|
+
children: [],
|
|
156
|
+
json: {
|
|
157
|
+
input: "text",
|
|
158
|
+
inputType: "instance-url",
|
|
159
|
+
dataType: "string",
|
|
160
|
+
length: 100,
|
|
161
|
+
"instance-source-number": 5000033,
|
|
162
|
+
"key-field": {
|
|
163
|
+
AFFAD31706E84259B4A3FF71F0752362: {
|
|
164
|
+
list: ["DCC3C536A7BC41A2B972CA8779FC3CAC"],
|
|
165
|
+
delimiter: "-"
|
|
166
|
+
},
|
|
167
|
+
"78B7A74ECE664836917FEB4502965E14": {
|
|
168
|
+
list: ["1710D157CDFF46A7A4E4501095C8ACBE"],
|
|
169
|
+
delimiter: ","
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
},
|
|
174
|
+
{
|
|
175
|
+
xh: 8,
|
|
176
|
+
asid: "A16FC2DAFC9F4786A0BCE4842F680B21",
|
|
177
|
+
astype: 0,
|
|
178
|
+
tname: "tcdkpz_table",
|
|
179
|
+
attrid: "571CDE321CE74DA48B5FC74537551689",
|
|
180
|
+
attrname: "可抵扣天(晚)数",
|
|
181
|
+
attrtype: 0,
|
|
182
|
+
info: '{"input":"number","dataType":"int","must":true}',
|
|
183
|
+
info_base64: 0,
|
|
184
|
+
createtime: "2026-05-20 15:03:42",
|
|
185
|
+
attrvalue: "",
|
|
186
|
+
serialnum: 7,
|
|
187
|
+
children: [],
|
|
188
|
+
json: {
|
|
189
|
+
input: "number",
|
|
190
|
+
dataType: "int",
|
|
191
|
+
must: true
|
|
192
|
+
}
|
|
193
|
+
},
|
|
194
|
+
{
|
|
195
|
+
xh: 9,
|
|
196
|
+
asid: "A16FC2DAFC9F4786A0BCE4842F680B21",
|
|
197
|
+
astype: 0,
|
|
198
|
+
tname: "tcdkpz_table",
|
|
199
|
+
attrid: "0EFC42CF4F9946DDA52C754F545E963A",
|
|
200
|
+
attrname: "套餐金额",
|
|
201
|
+
attrtype: 0,
|
|
202
|
+
info: '{"input":"text","dataType":"string","length":"100","must":true}',
|
|
203
|
+
info_base64: 0,
|
|
204
|
+
createtime: "2026-05-20 15:03:42",
|
|
205
|
+
attrvalue: "",
|
|
206
|
+
serialnum: 8,
|
|
207
|
+
children: [],
|
|
208
|
+
json: {
|
|
209
|
+
input: "text",
|
|
210
|
+
dataType: "string",
|
|
211
|
+
length: "100",
|
|
212
|
+
must: true
|
|
213
|
+
}
|
|
214
|
+
},
|
|
215
|
+
{
|
|
216
|
+
xh: 10,
|
|
217
|
+
asid: "A16FC2DAFC9F4786A0BCE4842F680B21",
|
|
218
|
+
astype: 0,
|
|
219
|
+
tname: "tcdkpz_table",
|
|
220
|
+
attrid: "E5560CDEC6E3467C87BB5EEBEA4A9A5B",
|
|
221
|
+
attrname: "是否启用",
|
|
222
|
+
attrtype: 0,
|
|
223
|
+
info: '{"input":"select","dataType":"string","length":100,"inputType":"local","must":true,"options":[{"label":"是","value":"5000024-1"},{"label":"否","value":"5000024-2"}]}',
|
|
224
|
+
info_base64: 0,
|
|
225
|
+
createtime: "2026-05-21 09:51:28",
|
|
226
|
+
attrvalue: "",
|
|
227
|
+
serialnum: 9,
|
|
228
|
+
children: [],
|
|
229
|
+
json: {
|
|
230
|
+
input: "select",
|
|
231
|
+
dataType: "string",
|
|
232
|
+
length: 100,
|
|
233
|
+
inputType: "local",
|
|
234
|
+
must: true,
|
|
235
|
+
options: [
|
|
236
|
+
{
|
|
237
|
+
label: "是",
|
|
238
|
+
value: "5000024-1"
|
|
239
|
+
},
|
|
240
|
+
{
|
|
241
|
+
label: "否",
|
|
242
|
+
value: "5000024-2"
|
|
243
|
+
}
|
|
244
|
+
]
|
|
245
|
+
}
|
|
246
|
+
},
|
|
247
|
+
{
|
|
248
|
+
xh: 11,
|
|
249
|
+
asid: "A16FC2DAFC9F4786A0BCE4842F680B21",
|
|
250
|
+
astype: 0,
|
|
251
|
+
tname: "tcdkpz_table",
|
|
252
|
+
attrid: "B602827557DB4F87B760FA243FCFB581",
|
|
253
|
+
attrname: "创建时间",
|
|
254
|
+
attrtype: 0,
|
|
255
|
+
info: '{"input":"time-picker","dataType":"datetime","must":true,"auto-generate":true,"auto-generate-type":"currenttime","hidden":true}',
|
|
256
|
+
info_base64: 0,
|
|
257
|
+
createtime: "2026-05-20 15:03:42",
|
|
258
|
+
attrvalue: "",
|
|
259
|
+
serialnum: 10,
|
|
260
|
+
children: [],
|
|
261
|
+
json: {
|
|
262
|
+
input: "time-picker",
|
|
263
|
+
dataType: "datetime",
|
|
264
|
+
must: true,
|
|
265
|
+
"auto-generate": true,
|
|
266
|
+
"auto-generate-type": "currenttime",
|
|
267
|
+
hidden: true
|
|
268
|
+
}
|
|
77
269
|
}
|
|
78
270
|
];
|
|
79
271
|
const langConfig = [
|
package/lib/index.js
CHANGED
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
const jsxRuntime = require("react/jsx-runtime");
|
|
3
3
|
const services = require("./services");
|
|
4
|
-
const method = require("./utils/method");
|
|
5
4
|
const main = require("./main");
|
|
6
5
|
const reactRouterDom = require("react-router-dom");
|
|
7
6
|
const antd = require("antd");
|
|
8
|
-
const reactVant = require("react-vant");
|
|
9
7
|
const react = require("react");
|
|
10
8
|
const ReactDOM = require("react-dom/client");
|
|
11
9
|
const zhCN = require("antd/es/locale/zh_CN");
|
|
@@ -17,29 +15,20 @@ const tableDetail = "";
|
|
|
17
15
|
dayjs.locale("zh-cn");
|
|
18
16
|
const Demo = () => {
|
|
19
17
|
const formRef = react.useRef(null);
|
|
20
|
-
const [form] =
|
|
18
|
+
const [form] = antd.Form.useForm();
|
|
21
19
|
const [list, setList] = react.useState([]);
|
|
22
20
|
const [langId, setLangId] = react.useState("");
|
|
23
21
|
const onValuesChange = async (values, allValues) => {
|
|
24
22
|
};
|
|
25
23
|
react.useEffect(() => {
|
|
26
|
-
setList(
|
|
27
|
-
setTimeout(() => {
|
|
28
|
-
form.setFieldsValue({
|
|
29
|
-
customFormList: [
|
|
30
|
-
{
|
|
31
|
-
"30BDE6E7977E40069B55DDE61C8795AE": "2026-05-29"
|
|
32
|
-
}
|
|
33
|
-
]
|
|
34
|
-
});
|
|
35
|
-
}, 2e3);
|
|
24
|
+
setList(mock.attrList);
|
|
36
25
|
}, []);
|
|
37
26
|
const onFinish = async (values) => {
|
|
38
27
|
};
|
|
39
28
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { height: "100vh", display: "flex", flexDirection: "column", gap: 20 }, children: [
|
|
40
29
|
/* @__PURE__ */ jsxRuntime.jsx(main.BackHeader, { title: "页头组件", isBack: true }),
|
|
41
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { style: { padding: "20px" }, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
42
|
-
main.
|
|
30
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { style: { padding: "20px" }, children: /* @__PURE__ */ jsxRuntime.jsx(antd.Form, { form, onValuesChange, onFinish, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
31
|
+
main.DynamicForm,
|
|
43
32
|
{
|
|
44
33
|
formConfig: list,
|
|
45
34
|
readonly: false,
|
|
@@ -52,7 +41,6 @@ const Demo = () => {
|
|
|
52
41
|
commonRequest: services.commonRequest,
|
|
53
42
|
instructionShowMode: "icon",
|
|
54
43
|
ref: formRef,
|
|
55
|
-
formShowType: "table",
|
|
56
44
|
langId
|
|
57
45
|
}
|
|
58
46
|
) }) }),
|