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/index.js
CHANGED
|
@@ -1,18 +1,45 @@
|
|
|
1
1
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { useEffect } from "react";
|
|
2
|
+
import { useEffect, useRef } from "react";
|
|
3
3
|
import ReactDOM from "react-dom/client";
|
|
4
4
|
import { BrowserRouter } from "react-router-dom";
|
|
5
|
-
import { App, Form } from "antd";
|
|
6
|
-
import {
|
|
5
|
+
import { ConfigProvider, App, Form, Button } from "antd";
|
|
6
|
+
import { BackHeader, DynamicForm } from "./main";
|
|
7
|
+
import { attrList } from "./mock";
|
|
8
|
+
import { commonRequestWidthParams, uploadFormAction, commonRequest } from "./services";
|
|
9
|
+
import zhCN from "antd/es/locale/zh_CN";
|
|
10
|
+
import dayjs from "dayjs";
|
|
11
|
+
dayjs.locale("zh-cn");
|
|
7
12
|
const Demo = () => {
|
|
8
|
-
Form.useForm();
|
|
9
13
|
useEffect(() => {
|
|
10
14
|
}, []);
|
|
11
|
-
const
|
|
12
|
-
const
|
|
13
|
-
|
|
15
|
+
const formRef = useRef(null);
|
|
16
|
+
const [form] = Form.useForm();
|
|
17
|
+
const onFinish = (values) => {
|
|
18
|
+
};
|
|
14
19
|
return /* @__PURE__ */ jsxs("div", { style: { height: "100vh", display: "flex", flexDirection: "column", gap: 20 }, children: [
|
|
15
20
|
/* @__PURE__ */ jsx(BackHeader, { title: "页头组件", isBack: true }),
|
|
21
|
+
/* @__PURE__ */ jsxs(Form, { form, layout: "vertical", onFinish, children: [
|
|
22
|
+
"测试移动端动态组件",
|
|
23
|
+
/* @__PURE__ */ jsx(
|
|
24
|
+
DynamicForm,
|
|
25
|
+
{
|
|
26
|
+
interfaceTypeChildren: "YLFWLRDetailAttrlist",
|
|
27
|
+
formConfig: attrList,
|
|
28
|
+
form,
|
|
29
|
+
readonly: false,
|
|
30
|
+
relatedid: "",
|
|
31
|
+
colNum: 1,
|
|
32
|
+
defaultWidth: "100%",
|
|
33
|
+
commonRequestWidthParams,
|
|
34
|
+
uploadAction: uploadFormAction,
|
|
35
|
+
commonRequest,
|
|
36
|
+
instructionShowMode: "icon",
|
|
37
|
+
ref: formRef,
|
|
38
|
+
isMobile: true
|
|
39
|
+
}
|
|
40
|
+
),
|
|
41
|
+
/* @__PURE__ */ jsx(Form.Item, { children: /* @__PURE__ */ jsx(Button, { type: "primary", htmlType: "submit", children: "提交" }) })
|
|
42
|
+
] }),
|
|
16
43
|
/* @__PURE__ */ jsxs("div", { children: [
|
|
17
44
|
"2. 测试循环滚动组件",
|
|
18
45
|
/* @__PURE__ */ jsx(
|
|
@@ -29,5 +56,5 @@ const Demo = () => {
|
|
|
29
56
|
] });
|
|
30
57
|
};
|
|
31
58
|
ReactDOM.createRoot(document.getElementById("root")).render(
|
|
32
|
-
/* @__PURE__ */ jsx(BrowserRouter, { children: /* @__PURE__ */ jsx(App, { children: /* @__PURE__ */ jsx(Demo, {}) }) })
|
|
59
|
+
/* @__PURE__ */ jsx(ConfigProvider, { locale: zhCN, children: /* @__PURE__ */ jsx(BrowserRouter, { children: /* @__PURE__ */ jsx(App, { children: /* @__PURE__ */ jsx(Demo, {}) }) }) })
|
|
33
60
|
);
|
package/es/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
|
+
})[];
|