szld-libs 0.2.97 → 0.2.98
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 +9 -6
- package/dist/szld-components.umd.js +1 -1
- package/es/index.js +35 -8
- package/es/mock/index.d.ts +306 -0
- package/es/mock/index.js +387 -1
- package/es/services/index.d.ts +6 -0
- package/es/services/index.js +85 -0
- package/es/services/request.d.ts +6 -0
- package/es/services/request.js +140 -0
- package/es/services/status.d.ts +1 -0
- package/es/services/status.js +44 -0
- package/es/services/vite.svg +1 -0
- package/es/utils/enum.d.ts +4 -0
- package/es/utils/enum.js +10 -0
- package/es/utils/method.js +14 -10
- package/es/vite-env.d.ts +5 -0
- package/lib/index.js +32 -5
- package/lib/mock/index.d.ts +306 -0
- package/lib/mock/index.js +386 -0
- package/lib/services/index.d.ts +6 -0
- package/lib/services/index.js +85 -0
- package/lib/services/request.d.ts +6 -0
- package/lib/services/request.js +140 -0
- package/lib/services/status.d.ts +1 -0
- package/lib/services/status.js +44 -0
- package/lib/services/vite.svg +1 -0
- package/lib/utils/enum.d.ts +4 -0
- package/lib/utils/enum.js +10 -0
- package/lib/utils/method.js +14 -10
- package/lib/vite-env.d.ts +5 -0
- package/package.json +3 -1
package/es/utils/method.js
CHANGED
|
@@ -176,16 +176,19 @@ const handleAttrList = (attrList, extraAttrs) => {
|
|
|
176
176
|
const combinationGroups = parsedAttrList.filter((item) => {
|
|
177
177
|
var _a;
|
|
178
178
|
return (_a = item.json) == null ? void 0 : _a.combination;
|
|
179
|
-
}).reduce(
|
|
180
|
-
|
|
181
|
-
|
|
179
|
+
}).reduce(
|
|
180
|
+
(groups, item) => {
|
|
181
|
+
const combinationId = item.json["combination-id"];
|
|
182
|
+
if (!combinationId)
|
|
183
|
+
return groups;
|
|
184
|
+
if (!groups[combinationId]) {
|
|
185
|
+
groups[combinationId] = [];
|
|
186
|
+
}
|
|
187
|
+
groups[combinationId].push(item);
|
|
182
188
|
return groups;
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
groups[combinationId].push(item);
|
|
187
|
-
return groups;
|
|
188
|
-
}, {});
|
|
189
|
+
},
|
|
190
|
+
{}
|
|
191
|
+
);
|
|
189
192
|
const excludeAttrIds = /* @__PURE__ */ new Set();
|
|
190
193
|
Object.values(combinationGroups).forEach((group) => {
|
|
191
194
|
if ((group == null ? void 0 : group.length) === 0)
|
|
@@ -310,7 +313,8 @@ const handleAttrListToObj = (attrList) => {
|
|
|
310
313
|
data_list: [processLevel(item.children)]
|
|
311
314
|
};
|
|
312
315
|
} else if (item.attrtype === 1 && item.children.length > 0 && Array.isArray(item.children)) {
|
|
313
|
-
|
|
316
|
+
let { attrvalue = [], children = [] } = item || {};
|
|
317
|
+
attrvalue = Array.isArray(attrvalue) ? attrvalue : [attrvalue];
|
|
314
318
|
if (Array.isArray(attrvalue) && (attrvalue == null ? void 0 : attrvalue.length)) {
|
|
315
319
|
item.children = attrvalue.map((v) => {
|
|
316
320
|
return handleObjDetailToSignleAttrList((children == null ? void 0 : children[0]) || [], v);
|
package/es/vite-env.d.ts
CHANGED
package/lib/index.js
CHANGED
|
@@ -5,15 +5,42 @@ const ReactDOM = require("react-dom/client");
|
|
|
5
5
|
const reactRouterDom = require("react-router-dom");
|
|
6
6
|
const antd = require("antd");
|
|
7
7
|
const main = require("./main");
|
|
8
|
+
const mock = require("./mock");
|
|
9
|
+
const services = require("./services");
|
|
10
|
+
const zhCN = require("antd/es/locale/zh_CN");
|
|
11
|
+
const dayjs = require("dayjs");
|
|
12
|
+
dayjs.locale("zh-cn");
|
|
8
13
|
const Demo = () => {
|
|
9
|
-
antd.Form.useForm();
|
|
10
14
|
react.useEffect(() => {
|
|
11
15
|
}, []);
|
|
12
|
-
const
|
|
13
|
-
const
|
|
14
|
-
|
|
16
|
+
const formRef = react.useRef(null);
|
|
17
|
+
const [form] = antd.Form.useForm();
|
|
18
|
+
const onFinish = (values) => {
|
|
19
|
+
};
|
|
15
20
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { height: "100vh", display: "flex", flexDirection: "column", gap: 20 }, children: [
|
|
16
21
|
/* @__PURE__ */ jsxRuntime.jsx(main.BackHeader, { title: "页头组件", isBack: true }),
|
|
22
|
+
/* @__PURE__ */ jsxRuntime.jsxs(antd.Form, { form, layout: "vertical", onFinish, children: [
|
|
23
|
+
"测试移动端动态组件",
|
|
24
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
25
|
+
main.DynamicForm,
|
|
26
|
+
{
|
|
27
|
+
interfaceTypeChildren: "YLFWLRDetailAttrlist",
|
|
28
|
+
formConfig: mock.attrList,
|
|
29
|
+
form,
|
|
30
|
+
readonly: false,
|
|
31
|
+
relatedid: "",
|
|
32
|
+
colNum: 1,
|
|
33
|
+
defaultWidth: "100%",
|
|
34
|
+
commonRequestWidthParams: services.commonRequestWidthParams,
|
|
35
|
+
uploadAction: services.uploadFormAction,
|
|
36
|
+
commonRequest: services.commonRequest,
|
|
37
|
+
instructionShowMode: "icon",
|
|
38
|
+
ref: formRef,
|
|
39
|
+
isMobile: true
|
|
40
|
+
}
|
|
41
|
+
),
|
|
42
|
+
/* @__PURE__ */ jsxRuntime.jsx(antd.Form.Item, { children: /* @__PURE__ */ jsxRuntime.jsx(antd.Button, { type: "primary", htmlType: "submit", children: "提交" }) })
|
|
43
|
+
] }),
|
|
17
44
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
18
45
|
"2. 测试循环滚动组件",
|
|
19
46
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -30,5 +57,5 @@ const Demo = () => {
|
|
|
30
57
|
] });
|
|
31
58
|
};
|
|
32
59
|
ReactDOM.createRoot(document.getElementById("root")).render(
|
|
33
|
-
/* @__PURE__ */ jsxRuntime.jsx(reactRouterDom.BrowserRouter, { children: /* @__PURE__ */ jsxRuntime.jsx(antd.App, { children: /* @__PURE__ */ jsxRuntime.jsx(Demo, {}) }) })
|
|
60
|
+
/* @__PURE__ */ jsxRuntime.jsx(antd.ConfigProvider, { locale: zhCN, children: /* @__PURE__ */ jsxRuntime.jsx(reactRouterDom.BrowserRouter, { children: /* @__PURE__ */ jsxRuntime.jsx(antd.App, { children: /* @__PURE__ */ jsxRuntime.jsx(Demo, {}) }) }) })
|
|
34
61
|
);
|
package/lib/mock/index.d.ts
CHANGED
|
@@ -0,0 +1,306 @@
|
|
|
1
|
+
export declare const baseAttrList: ({
|
|
2
|
+
xh: number;
|
|
3
|
+
asid: string;
|
|
4
|
+
astype: number;
|
|
5
|
+
tname: string;
|
|
6
|
+
attrid: string;
|
|
7
|
+
attrname: string;
|
|
8
|
+
attrtype: number;
|
|
9
|
+
info: string;
|
|
10
|
+
info_base64: number;
|
|
11
|
+
createtime: string;
|
|
12
|
+
attrvalue: string;
|
|
13
|
+
serialnum: number;
|
|
14
|
+
children: never[];
|
|
15
|
+
json: {
|
|
16
|
+
input: string;
|
|
17
|
+
dataType: string;
|
|
18
|
+
length: number;
|
|
19
|
+
'range-picker-save'?: undefined;
|
|
20
|
+
'disable-date-goover'?: undefined;
|
|
21
|
+
};
|
|
22
|
+
} | {
|
|
23
|
+
xh: number;
|
|
24
|
+
asid: string;
|
|
25
|
+
astype: number;
|
|
26
|
+
tname: string;
|
|
27
|
+
attrid: string;
|
|
28
|
+
attrname: string;
|
|
29
|
+
attrtype: number;
|
|
30
|
+
info: string;
|
|
31
|
+
info_base64: number;
|
|
32
|
+
createtime: string;
|
|
33
|
+
attrvalue: string;
|
|
34
|
+
serialnum: number;
|
|
35
|
+
children: never[];
|
|
36
|
+
json: {
|
|
37
|
+
input: string;
|
|
38
|
+
dataType: string;
|
|
39
|
+
length?: undefined;
|
|
40
|
+
'range-picker-save'?: undefined;
|
|
41
|
+
'disable-date-goover'?: undefined;
|
|
42
|
+
};
|
|
43
|
+
} | {
|
|
44
|
+
xh: number;
|
|
45
|
+
asid: string;
|
|
46
|
+
astype: number;
|
|
47
|
+
tname: string;
|
|
48
|
+
attrid: string;
|
|
49
|
+
attrname: string;
|
|
50
|
+
attrtype: number;
|
|
51
|
+
info: string;
|
|
52
|
+
info_base64: number;
|
|
53
|
+
createtime: string;
|
|
54
|
+
attrvalue: string;
|
|
55
|
+
serialnum: number;
|
|
56
|
+
children: never[];
|
|
57
|
+
json: {
|
|
58
|
+
input: string;
|
|
59
|
+
'range-picker-save': string;
|
|
60
|
+
dataType: string;
|
|
61
|
+
length: number;
|
|
62
|
+
'disable-date-goover': boolean;
|
|
63
|
+
};
|
|
64
|
+
})[];
|
|
65
|
+
export declare const attrList: any;
|
|
66
|
+
export declare const testList: ({
|
|
67
|
+
xh: number;
|
|
68
|
+
asid: string;
|
|
69
|
+
astype: number;
|
|
70
|
+
tname: string;
|
|
71
|
+
attrid: string;
|
|
72
|
+
attrname: string;
|
|
73
|
+
attrtype: number;
|
|
74
|
+
info: string;
|
|
75
|
+
info_base64: number;
|
|
76
|
+
createtime: string;
|
|
77
|
+
attrvalue: string;
|
|
78
|
+
serialnum: number;
|
|
79
|
+
children: never[];
|
|
80
|
+
json: {
|
|
81
|
+
input: string;
|
|
82
|
+
dataType: string;
|
|
83
|
+
length: number;
|
|
84
|
+
'auto-generate': boolean;
|
|
85
|
+
'auto-generate-type': string;
|
|
86
|
+
must?: undefined;
|
|
87
|
+
'upload-accept'?: undefined;
|
|
88
|
+
'upload-max-count'?: undefined;
|
|
89
|
+
'upload-size'?: undefined;
|
|
90
|
+
instruction?: undefined;
|
|
91
|
+
'instruction-color'?: undefined;
|
|
92
|
+
default?: undefined;
|
|
93
|
+
propertiesID?: undefined;
|
|
94
|
+
};
|
|
95
|
+
} | {
|
|
96
|
+
xh: number;
|
|
97
|
+
asid: string;
|
|
98
|
+
astype: number;
|
|
99
|
+
tname: string;
|
|
100
|
+
attrid: string;
|
|
101
|
+
attrname: string;
|
|
102
|
+
attrtype: number;
|
|
103
|
+
info: string;
|
|
104
|
+
info_base64: number;
|
|
105
|
+
createtime: string;
|
|
106
|
+
attrvalue: string;
|
|
107
|
+
serialnum: number;
|
|
108
|
+
children: never[];
|
|
109
|
+
json: {
|
|
110
|
+
input: string;
|
|
111
|
+
dataType: string;
|
|
112
|
+
length: number;
|
|
113
|
+
must: boolean;
|
|
114
|
+
'auto-generate'?: undefined;
|
|
115
|
+
'auto-generate-type'?: undefined;
|
|
116
|
+
'upload-accept'?: undefined;
|
|
117
|
+
'upload-max-count'?: undefined;
|
|
118
|
+
'upload-size'?: undefined;
|
|
119
|
+
instruction?: undefined;
|
|
120
|
+
'instruction-color'?: undefined;
|
|
121
|
+
default?: undefined;
|
|
122
|
+
propertiesID?: undefined;
|
|
123
|
+
};
|
|
124
|
+
} | {
|
|
125
|
+
xh: number;
|
|
126
|
+
asid: string;
|
|
127
|
+
astype: number;
|
|
128
|
+
tname: string;
|
|
129
|
+
attrid: string;
|
|
130
|
+
attrname: string;
|
|
131
|
+
attrtype: number;
|
|
132
|
+
info: string;
|
|
133
|
+
info_base64: number;
|
|
134
|
+
createtime: string;
|
|
135
|
+
attrvalue: string;
|
|
136
|
+
serialnum: number;
|
|
137
|
+
children: never[];
|
|
138
|
+
json: {
|
|
139
|
+
input: string;
|
|
140
|
+
dataType: string;
|
|
141
|
+
length: number;
|
|
142
|
+
'auto-generate'?: undefined;
|
|
143
|
+
'auto-generate-type'?: undefined;
|
|
144
|
+
must?: undefined;
|
|
145
|
+
'upload-accept'?: undefined;
|
|
146
|
+
'upload-max-count'?: undefined;
|
|
147
|
+
'upload-size'?: undefined;
|
|
148
|
+
instruction?: undefined;
|
|
149
|
+
'instruction-color'?: undefined;
|
|
150
|
+
default?: undefined;
|
|
151
|
+
propertiesID?: undefined;
|
|
152
|
+
};
|
|
153
|
+
} | {
|
|
154
|
+
xh: number;
|
|
155
|
+
asid: string;
|
|
156
|
+
astype: number;
|
|
157
|
+
tname: string;
|
|
158
|
+
attrid: string;
|
|
159
|
+
attrname: string;
|
|
160
|
+
attrtype: number;
|
|
161
|
+
info: string;
|
|
162
|
+
info_base64: number;
|
|
163
|
+
createtime: string;
|
|
164
|
+
attrvalue: string;
|
|
165
|
+
serialnum: number;
|
|
166
|
+
children: never[];
|
|
167
|
+
json: {
|
|
168
|
+
input: string;
|
|
169
|
+
'upload-accept': string;
|
|
170
|
+
'upload-max-count': string;
|
|
171
|
+
'upload-size': string;
|
|
172
|
+
dataType: string;
|
|
173
|
+
length: number;
|
|
174
|
+
instruction: string;
|
|
175
|
+
'instruction-color': string;
|
|
176
|
+
'auto-generate'?: undefined;
|
|
177
|
+
'auto-generate-type'?: undefined;
|
|
178
|
+
must?: undefined;
|
|
179
|
+
default?: undefined;
|
|
180
|
+
propertiesID?: undefined;
|
|
181
|
+
};
|
|
182
|
+
} | {
|
|
183
|
+
xh: number;
|
|
184
|
+
asid: string;
|
|
185
|
+
astype: number;
|
|
186
|
+
tname: string;
|
|
187
|
+
attrid: string;
|
|
188
|
+
attrname: string;
|
|
189
|
+
attrtype: number;
|
|
190
|
+
info: string;
|
|
191
|
+
info_base64: number;
|
|
192
|
+
createtime: string;
|
|
193
|
+
attrvalue: string;
|
|
194
|
+
serialnum: number;
|
|
195
|
+
children: never[];
|
|
196
|
+
json: {
|
|
197
|
+
input: string;
|
|
198
|
+
dataType: string;
|
|
199
|
+
default: string;
|
|
200
|
+
length?: undefined;
|
|
201
|
+
'auto-generate'?: undefined;
|
|
202
|
+
'auto-generate-type'?: undefined;
|
|
203
|
+
must?: undefined;
|
|
204
|
+
'upload-accept'?: undefined;
|
|
205
|
+
'upload-max-count'?: undefined;
|
|
206
|
+
'upload-size'?: undefined;
|
|
207
|
+
instruction?: undefined;
|
|
208
|
+
'instruction-color'?: undefined;
|
|
209
|
+
propertiesID?: undefined;
|
|
210
|
+
};
|
|
211
|
+
} | {
|
|
212
|
+
xh: number;
|
|
213
|
+
asid: string;
|
|
214
|
+
astype: number;
|
|
215
|
+
tname: string;
|
|
216
|
+
attrid: string;
|
|
217
|
+
attrname: string;
|
|
218
|
+
attrtype: number;
|
|
219
|
+
info: string;
|
|
220
|
+
info_base64: number;
|
|
221
|
+
createtime: string;
|
|
222
|
+
attrvalue: string;
|
|
223
|
+
serialnum: number;
|
|
224
|
+
children: ({
|
|
225
|
+
xh: number;
|
|
226
|
+
asid: string;
|
|
227
|
+
astype: number;
|
|
228
|
+
tname: string;
|
|
229
|
+
attrid: string;
|
|
230
|
+
attrname: string;
|
|
231
|
+
attrtype: number;
|
|
232
|
+
info: string;
|
|
233
|
+
info_base64: number;
|
|
234
|
+
createtime: string;
|
|
235
|
+
attrvalue: string;
|
|
236
|
+
serialnum: number;
|
|
237
|
+
children: never[];
|
|
238
|
+
json: {
|
|
239
|
+
input: string;
|
|
240
|
+
dataType: string;
|
|
241
|
+
length: number;
|
|
242
|
+
'auto-generate': boolean;
|
|
243
|
+
'auto-generate-type': string;
|
|
244
|
+
must?: undefined;
|
|
245
|
+
};
|
|
246
|
+
} | {
|
|
247
|
+
xh: number;
|
|
248
|
+
asid: string;
|
|
249
|
+
astype: number;
|
|
250
|
+
tname: string;
|
|
251
|
+
attrid: string;
|
|
252
|
+
attrname: string;
|
|
253
|
+
attrtype: number;
|
|
254
|
+
info: string;
|
|
255
|
+
info_base64: number;
|
|
256
|
+
createtime: string;
|
|
257
|
+
attrvalue: string;
|
|
258
|
+
serialnum: number;
|
|
259
|
+
children: never[];
|
|
260
|
+
json: {
|
|
261
|
+
input: string;
|
|
262
|
+
dataType: string;
|
|
263
|
+
length: number;
|
|
264
|
+
must: boolean;
|
|
265
|
+
'auto-generate'?: undefined;
|
|
266
|
+
'auto-generate-type'?: undefined;
|
|
267
|
+
};
|
|
268
|
+
} | {
|
|
269
|
+
xh: number;
|
|
270
|
+
asid: string;
|
|
271
|
+
astype: number;
|
|
272
|
+
tname: string;
|
|
273
|
+
attrid: string;
|
|
274
|
+
attrname: string;
|
|
275
|
+
attrtype: number;
|
|
276
|
+
info: string;
|
|
277
|
+
info_base64: number;
|
|
278
|
+
createtime: string;
|
|
279
|
+
attrvalue: string;
|
|
280
|
+
serialnum: number;
|
|
281
|
+
children: never[];
|
|
282
|
+
json: {
|
|
283
|
+
input: string;
|
|
284
|
+
dataType: string;
|
|
285
|
+
length: number;
|
|
286
|
+
'auto-generate'?: undefined;
|
|
287
|
+
'auto-generate-type'?: undefined;
|
|
288
|
+
must?: undefined;
|
|
289
|
+
};
|
|
290
|
+
})[][];
|
|
291
|
+
json: {
|
|
292
|
+
propertiesID: string;
|
|
293
|
+
input?: undefined;
|
|
294
|
+
dataType?: undefined;
|
|
295
|
+
length?: undefined;
|
|
296
|
+
'auto-generate'?: undefined;
|
|
297
|
+
'auto-generate-type'?: undefined;
|
|
298
|
+
must?: undefined;
|
|
299
|
+
'upload-accept'?: undefined;
|
|
300
|
+
'upload-max-count'?: undefined;
|
|
301
|
+
'upload-size'?: undefined;
|
|
302
|
+
instruction?: undefined;
|
|
303
|
+
'instruction-color'?: undefined;
|
|
304
|
+
default?: undefined;
|
|
305
|
+
};
|
|
306
|
+
})[];
|