szld-libs 0.3.86 → 0.3.87

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.
@@ -38,8 +38,8 @@ declare function useUniversalTable(): {
38
38
  title?: string | undefined;
39
39
  okText?: string | undefined;
40
40
  cancelText?: string | undefined;
41
- okType?: string | undefined;
42
- cancelType?: string | undefined;
41
+ okType?: 'primary' | 'default' | 'link' | 'text' | 'dashed' | undefined;
42
+ cancelType?: 'primary' | 'default' | 'link' | 'text' | 'dashed' | undefined;
43
43
  getTitle?: ((pageID: string, dataID: string, defaultTitle?: string) => string) | undefined;
44
44
  pageID?: string | undefined;
45
45
  deleteItem?: Record<string, any> | undefined;
@@ -352,10 +352,10 @@ function useUniversalTable() {
352
352
  title: title || (deleteItem == null ? void 0 : deleteItem["title"]) || "",
353
353
  icon: null,
354
354
  okButtonProps: {
355
- type: "primary"
355
+ type: okType
356
356
  },
357
357
  cancelButtonProps: {
358
- type: "default"
358
+ type: cancelType
359
359
  },
360
360
  okText: okText || "",
361
361
  cancelText: cancelText || "",
package/es/index.js CHANGED
@@ -8,7 +8,7 @@ import { Form, Button } from "react-vant";
8
8
  import { useRef, useState, useEffect } from "react";
9
9
  import ReactDOM from "react-dom/client";
10
10
  import zhCN from "antd/es/locale/zh_CN";
11
- import { attrList, langConfig } from "./mock";
11
+ import { attrList } from "./mock";
12
12
  import dayjs from "dayjs";
13
13
  import "./utils/szxkFunc";
14
14
  const index = "";
@@ -22,7 +22,12 @@ const Demo = () => {
22
22
  const onValuesChange = async (values, allValues) => {
23
23
  };
24
24
  useEffect(() => {
25
- setList(handleAttrList(attrList, { langConfig }));
25
+ setList(handleAttrList(attrList));
26
+ setTimeout(() => {
27
+ form.setFieldsValue({
28
+ ["47081ED51BB4407C92070CB7CAA8D056"]: [new Date(), new Date()]
29
+ });
30
+ }, 2e3);
26
31
  }, []);
27
32
  const onFinish = async (values) => {
28
33
  };
package/es/mock/index.js CHANGED
@@ -2,112 +2,366 @@ const baseAttrList = [];
2
2
  const attrList = [
3
3
  {
4
4
  xh: 1,
5
- asid: "2FD08E801868439EA44CC593CA27F745",
5
+ asid: "2EA2AABF953F4A3483ED854A0034BF92",
6
6
  astype: 0,
7
- tname: "jy_table2_time",
8
- attrid: "6A5984BD547449088172BD33F2A965E8",
9
- attrname: "预定日期",
7
+ tname: "gg_table",
8
+ attrid: "BB5FFD9EC1034781BC3E89FEFD78879C",
9
+ attrname: "姓名",
10
10
  attrtype: 0,
11
- info: '{"input":"range-picker","range-picker-save":"range","dataType":"string","length":100,"disable-date-goover":true,"must":true}',
11
+ info: '{"input":"text","dataType":"string","length":20,"must":true,"regexp":"/^[A-Za-z]+$/","regexp-message":"请输入英文字母"}',
12
12
  info_base64: 0,
13
- createtime: "2026-02-11 14:27:16",
13
+ createtime: "2026-01-05 21:25:49",
14
14
  attrvalue: "",
15
15
  serialnum: 1,
16
16
  children: [],
17
17
  json: {
18
- input: "range-picker",
19
- "range-picker-save": "range",
18
+ input: "text",
19
+ dataType: "string",
20
+ length: 20,
21
+ must: true,
22
+ regexp: "/^[A-Za-z]+$/",
23
+ "regexp-message": "请输入英文字母"
24
+ }
25
+ },
26
+ {
27
+ xh: 2,
28
+ asid: "2EA2AABF953F4A3483ED854A0034BF92",
29
+ astype: 0,
30
+ tname: "gg_table",
31
+ attrid: "799FBD4386A04D8198FC7F33B120F68E",
32
+ attrname: "品种",
33
+ attrtype: 0,
34
+ info: '{"input":"text","dataType":"string","length":100}',
35
+ info_base64: 0,
36
+ createtime: "2026-01-05 21:26:01",
37
+ attrvalue: "",
38
+ serialnum: 2,
39
+ children: [],
40
+ json: {
41
+ input: "text",
42
+ dataType: "string",
43
+ length: 100
44
+ }
45
+ },
46
+ {
47
+ xh: 3,
48
+ asid: "2EA2AABF953F4A3483ED854A0034BF92",
49
+ astype: 0,
50
+ tname: "gg_table",
51
+ attrid: "B1B10494F9A949CCBD26567A597E8DAE",
52
+ attrname: "重量",
53
+ attrtype: 0,
54
+ info: '{"input":"text","dataType":"string","length":3,"combination":true,"combination-id":1,"combination-name":"重量","combination-width-ratio":0.7,"must":true}',
55
+ info_base64: 0,
56
+ createtime: "2026-01-05 21:26:13",
57
+ attrvalue: "",
58
+ serialnum: 3,
59
+ children: [],
60
+ json: {
61
+ input: "text",
62
+ dataType: "string",
63
+ length: 3,
64
+ combination: true,
65
+ "combination-id": 1,
66
+ "combination-name": "重量",
67
+ "combination-width-ratio": 0.7,
68
+ must: true,
69
+ combinations: [
70
+ {
71
+ xh: 3,
72
+ asid: "2EA2AABF953F4A3483ED854A0034BF92",
73
+ astype: 0,
74
+ tname: "gg_table",
75
+ attrid: "B1B10494F9A949CCBD26567A597E8DAE",
76
+ attrname: "重量",
77
+ attrtype: 0,
78
+ info: '{"input":"text","dataType":"string","length":3,"combination":true,"combination-id":1,"combination-name":"重量","combination-width-ratio":0.7,"must":true}',
79
+ info_base64: 0,
80
+ createtime: "2026-01-05 21:26:13",
81
+ attrvalue: "",
82
+ serialnum: 3,
83
+ children: [],
84
+ json: {
85
+ input: "text",
86
+ dataType: "string",
87
+ length: 3,
88
+ combination: true,
89
+ "combination-id": 1,
90
+ "combination-name": "重量",
91
+ "combination-width-ratio": 0.7,
92
+ must: true
93
+ }
94
+ },
95
+ {
96
+ xh: 4,
97
+ asid: "2EA2AABF953F4A3483ED854A0034BF92",
98
+ astype: 0,
99
+ tname: "gg_table",
100
+ attrid: "A3CB9307DED6493382C78E065F3C6A99",
101
+ attrname: "单位",
102
+ attrtype: 0,
103
+ info: '{"input":"select","dataType":"string","length":100,"inputType":"local","default":"5000008-1","combination":true,"combination-id":1,"combination-name":"重量","combination-width-ratio":0.3,"must":true,"options":[{"label":"磅","value":"5000008-1"},{"label":"斤","value":"5000008-2"}]}',
104
+ info_base64: 0,
105
+ createtime: "2026-01-05 21:27:16",
106
+ attrvalue: "",
107
+ serialnum: 4,
108
+ children: [],
109
+ json: {
110
+ input: "select",
111
+ dataType: "string",
112
+ length: 100,
113
+ inputType: "local",
114
+ default: "5000008-1",
115
+ combination: true,
116
+ "combination-id": 1,
117
+ "combination-name": "重量",
118
+ "combination-width-ratio": 0.3,
119
+ must: true,
120
+ options: [
121
+ {
122
+ label: "磅",
123
+ value: "5000008-1"
124
+ },
125
+ {
126
+ label: "斤",
127
+ value: "5000008-2"
128
+ }
129
+ ]
130
+ }
131
+ }
132
+ ]
133
+ }
134
+ },
135
+ {
136
+ xh: 5,
137
+ asid: "2EA2AABF953F4A3483ED854A0034BF92",
138
+ astype: 0,
139
+ tname: "gg_table",
140
+ attrid: "F0999F269D3C4425A59A883442055C5C",
141
+ attrname: "性别",
142
+ attrtype: 0,
143
+ info: '{"input":"radio","dataType":"string","length":100,"inputType":"local","options":[{"label":"公","value":"5000014-1"},{"label":"母","value":"5000014-2"}]}',
144
+ info_base64: 0,
145
+ createtime: "2026-01-05 21:28:11",
146
+ attrvalue: "",
147
+ serialnum: 5,
148
+ children: [],
149
+ json: {
150
+ input: "radio",
151
+ dataType: "string",
152
+ length: 100,
153
+ inputType: "local",
154
+ options: [
155
+ {
156
+ label: "公",
157
+ value: "5000014-1"
158
+ },
159
+ {
160
+ label: "母",
161
+ value: "5000014-2"
162
+ }
163
+ ]
164
+ }
165
+ },
166
+ {
167
+ xh: 6,
168
+ asid: "2EA2AABF953F4A3483ED854A0034BF92",
169
+ astype: 0,
170
+ tname: "gg_table",
171
+ attrid: "4986EE62B15E4C0197A1E073E098CCAF",
172
+ attrname: "是否绝育",
173
+ attrtype: 0,
174
+ info: '{"input":"radio","dataType":"string","length":100,"inputType":"local","must":true,"options":[{"label":"是","value":"5000011-1"},{"label":"否","value":"5000011-2"}]}',
175
+ info_base64: 0,
176
+ createtime: "2026-01-05 21:28:34",
177
+ attrvalue: "",
178
+ serialnum: 6,
179
+ children: [],
180
+ json: {
181
+ input: "radio",
182
+ dataType: "string",
183
+ length: 100,
184
+ inputType: "local",
185
+ must: true,
186
+ options: [
187
+ {
188
+ label: "是",
189
+ value: "5000011-1"
190
+ },
191
+ {
192
+ label: "否",
193
+ value: "5000011-2"
194
+ }
195
+ ]
196
+ }
197
+ },
198
+ {
199
+ xh: 7,
200
+ asid: "2EA2AABF953F4A3483ED854A0034BF92",
201
+ astype: 0,
202
+ tname: "gg_table",
203
+ attrid: "8561D992C88645EE9EA184800BBE0E1D",
204
+ attrname: "是否对其他狗有攻击性",
205
+ attrtype: 0,
206
+ info: '{"input":"radio","dataType":"string","length":100,"inputType":"local","must":true,"options":[{"label":"是","value":"5000013-1"},{"label":"否","value":"5000013-2"},{"label":"视情况而定","value":"5000013-3"},{"label":"不确定","value":"5000013-4"}]}',
207
+ info_base64: 0,
208
+ createtime: "2026-01-05 21:29:07",
209
+ attrvalue: "",
210
+ serialnum: 7,
211
+ children: [],
212
+ json: {
213
+ input: "radio",
20
214
  dataType: "string",
21
215
  length: 100,
22
- "disable-date-goover": true,
216
+ inputType: "local",
217
+ must: true,
218
+ options: [
219
+ {
220
+ label: "是",
221
+ value: "5000013-1"
222
+ },
223
+ {
224
+ label: "否",
225
+ value: "5000013-2"
226
+ },
227
+ {
228
+ label: "视情况而定",
229
+ value: "5000013-3"
230
+ },
231
+ {
232
+ label: "不确定",
233
+ value: "5000013-4"
234
+ }
235
+ ]
236
+ }
237
+ },
238
+ {
239
+ xh: 8,
240
+ asid: "2EA2AABF953F4A3483ED854A0034BF92",
241
+ astype: 0,
242
+ tname: "gg_table",
243
+ attrid: "93366648DF5146E98AE3D58DE5D6BD73",
244
+ attrname: "是否对人有攻击性",
245
+ attrtype: 0,
246
+ info: '{"input":"radio","dataType":"string","length":100,"inputType":"local","must":true,"options":[{"label":"是","value":"5000013-1"},{"label":"否","value":"5000013-2"},{"label":"视情况而定","value":"5000013-3"},{"label":"不确定","value":"5000013-4"}]}',
247
+ info_base64: 0,
248
+ createtime: "2026-01-05 21:29:24",
249
+ attrvalue: "",
250
+ serialnum: 8,
251
+ children: [],
252
+ json: {
253
+ input: "radio",
254
+ dataType: "string",
255
+ length: 100,
256
+ inputType: "local",
257
+ must: true,
258
+ options: [
259
+ {
260
+ label: "是",
261
+ value: "5000013-1"
262
+ },
263
+ {
264
+ label: "否",
265
+ value: "5000013-2"
266
+ },
267
+ {
268
+ label: "视情况而定",
269
+ value: "5000013-3"
270
+ },
271
+ {
272
+ label: "不确定",
273
+ value: "5000013-4"
274
+ }
275
+ ]
276
+ }
277
+ },
278
+ {
279
+ xh: 9,
280
+ asid: "2EA2AABF953F4A3483ED854A0034BF92",
281
+ astype: 0,
282
+ tname: "gg_table",
283
+ attrid: "6A63A6508C0E44D38AB68CB27EC332E8",
284
+ attrname: "狗狗照片",
285
+ attrtype: 0,
286
+ info: '{"input":"image","upload-accept":".png,.jpg,.jpeg","upload-max-count":"5","upload-size":"5","dataType":"string","length":4000}',
287
+ info_base64: 0,
288
+ createtime: "2026-01-05 21:29:46",
289
+ attrvalue: "",
290
+ serialnum: 9,
291
+ children: [],
292
+ json: {
293
+ input: "image",
294
+ "upload-accept": ".png,.jpg,.jpeg",
295
+ "upload-max-count": "5",
296
+ "upload-size": "5",
297
+ dataType: "string",
298
+ length: 4e3
299
+ }
300
+ },
301
+ {
302
+ xh: 10,
303
+ asid: "2EA2AABF953F4A3483ED854A0034BF92",
304
+ astype: 0,
305
+ tname: "gg_table",
306
+ attrid: "6730DFF94989425F9ED90A4A77EE3C5B",
307
+ attrname: "疫苗证明",
308
+ attrtype: 0,
309
+ info: '{"input":"file","upload-accept":".png,jpeg,jpg,.pdf,.doc,.docx,.xls,.xlsx,.txt,.zip,.rar,.7z","upload-max-count":"5","upload-size":"10","dataType":"string","length":4000}',
310
+ info_base64: 0,
311
+ createtime: "2026-01-05 21:30:05",
312
+ attrvalue: "",
313
+ serialnum: 10,
314
+ children: [],
315
+ json: {
316
+ input: "file",
317
+ "upload-accept": ".png,jpeg,jpg,.pdf,.doc,.docx,.xls,.xlsx,.txt,.zip,.rar,.7z",
318
+ "upload-max-count": "5",
319
+ "upload-size": "10",
320
+ dataType: "string",
321
+ length: 4e3
322
+ }
323
+ },
324
+ {
325
+ xh: 11,
326
+ asid: "2EA2AABF953F4A3483ED854A0034BF92",
327
+ astype: 0,
328
+ tname: "gg_table",
329
+ attrid: "23A6082D509340BCA10ED419A95F9B7D",
330
+ attrname: "生日",
331
+ attrtype: 0,
332
+ info: '{"input":"date-picker","dataType":"date","instruction":"如不确定出生日期可选择大概日期","instruction-color":"#999999","must":true}',
333
+ info_base64: 0,
334
+ createtime: "2026-01-05 21:30:21",
335
+ attrvalue: "",
336
+ serialnum: 11,
337
+ children: [],
338
+ json: {
339
+ input: "date-picker",
340
+ dataType: "date",
341
+ instruction: "如不确定出生日期可选择大概日期",
342
+ "instruction-color": "#999999",
23
343
  must: true
24
- },
25
- attrLangConfig: [
26
- {
27
- jxqyglbh: "2579",
28
- lanid: "2708E89E803144B799E775A763583601",
29
- sysid: "1",
30
- sysname: "属性集",
31
- systype: "",
32
- pageid: "2FD08E801868439EA44CC593CA27F745",
33
- pageinfo: "DPQ寄养填写信息",
34
- dataid: "27638FC5E2BA4FB88AFB0A9CF77558F7",
35
- datainfo: "接走时间",
36
- dicid: "10001",
37
- info: "中文",
38
- content: "接走时间"
39
- },
40
- {
41
- jxqyglbh: "2580",
42
- lanid: "FD9D30A5508447F7BFAE158A07F97DA1",
43
- sysid: "1",
44
- sysname: "属性集",
45
- systype: "",
46
- pageid: "2FD08E801868439EA44CC593CA27F745",
47
- pageinfo: "DPQ寄养填写信息",
48
- dataid: "4E507938BE7448E5883CFCD9C962707D",
49
- datainfo: "送到时间",
50
- dicid: "10001",
51
- info: "中文",
52
- content: "送到时间"
53
- },
54
- {
55
- jxqyglbh: "2582",
56
- lanid: "DBE02B29F07843678E8684D5A509F8EC",
57
- sysid: "1",
58
- sysname: "属性集",
59
- systype: "",
60
- pageid: "2FD08E801868439EA44CC593CA27F745",
61
- pageinfo: "DPQ寄养填写信息",
62
- dataid: "6A5984BD547449088172BD33F2A965E8",
63
- datainfo: "预定日期",
64
- dicid: "10001",
65
- info: "中文",
66
- content: "预定日期"
67
- },
68
- {
69
- jxqyglbh: "2804",
70
- lanid: "13455BEAD2054605AF4E7F2808E065F2",
71
- sysid: "1",
72
- sysname: "属性集",
73
- systype: "",
74
- pageid: "2FD08E801868439EA44CC593CA27F745",
75
- pageinfo: "DPQ寄养填写信息2",
76
- dataid: "6A5984BD547449088172BD33F2A965E8",
77
- datainfo: "表单Dates",
78
- dicid: "10001",
79
- info: "中文",
80
- content: "日期"
81
- },
82
- {
83
- jxqyglbh: "2805",
84
- lanid: "6D7CCAE35F3F463CBCDC8F6B3416526C",
85
- sysid: "1",
86
- sysname: "属性集",
87
- systype: "",
88
- pageid: "2FD08E801868439EA44CC593CA27F745",
89
- pageinfo: "DPQ寄养填写信息2",
90
- dataid: "4E507938BE7448E5883CFCD9C962707D",
91
- datainfo: "表单-到店时间",
92
- dicid: "10001",
93
- info: "中文",
94
- content: "到店时间"
95
- },
96
- {
97
- jxqyglbh: "2807",
98
- lanid: "FAFC582DC6104CF58A8ADEBDCCDA77A7",
99
- sysid: "1",
100
- sysname: "属性集",
101
- systype: "",
102
- pageid: "2FD08E801868439EA44CC593CA27F745",
103
- pageinfo: "DPQ寄养填写信息2",
104
- dataid: "27638FC5E2BA4FB88AFB0A9CF77558F7",
105
- datainfo: "表单-离店时间",
106
- dicid: "10001",
107
- info: "中文",
108
- content: "离店时间"
109
- }
110
- ]
344
+ }
345
+ },
346
+ {
347
+ xh: 12,
348
+ asid: "2EA2AABF953F4A3483ED854A0034BF92",
349
+ astype: 0,
350
+ tname: "gg_table",
351
+ attrid: "7A870062F2C94795ABA9923F300BE99A",
352
+ attrname: "备注",
353
+ attrtype: 0,
354
+ info: '{"input":"textarea","dataType":"string","length":500}',
355
+ info_base64: 0,
356
+ createtime: "2026-01-05 21:30:40",
357
+ attrvalue: "",
358
+ serialnum: 12,
359
+ children: [],
360
+ json: {
361
+ input: "textarea",
362
+ dataType: "string",
363
+ length: 500
364
+ }
111
365
  }
112
366
  ];
113
367
  const langConfig = [
@@ -38,8 +38,8 @@ declare function useUniversalTable(): {
38
38
  title?: string | undefined;
39
39
  okText?: string | undefined;
40
40
  cancelText?: string | undefined;
41
- okType?: string | undefined;
42
- cancelType?: string | undefined;
41
+ okType?: 'primary' | 'default' | 'link' | 'text' | 'dashed' | undefined;
42
+ cancelType?: 'primary' | 'default' | 'link' | 'text' | 'dashed' | undefined;
43
43
  getTitle?: ((pageID: string, dataID: string, defaultTitle?: string) => string) | undefined;
44
44
  pageID?: string | undefined;
45
45
  deleteItem?: Record<string, any> | undefined;
@@ -353,10 +353,10 @@ function useUniversalTable() {
353
353
  title: title || (deleteItem == null ? void 0 : deleteItem["title"]) || "",
354
354
  icon: null,
355
355
  okButtonProps: {
356
- type: "primary"
356
+ type: okType
357
357
  },
358
358
  cancelButtonProps: {
359
- type: "default"
359
+ type: cancelType
360
360
  },
361
361
  okText: okText || "",
362
362
  cancelText: cancelText || "",
package/lib/index.js CHANGED
@@ -23,7 +23,12 @@ const Demo = () => {
23
23
  const onValuesChange = async (values, allValues) => {
24
24
  };
25
25
  react.useEffect(() => {
26
- setList(method.handleAttrList(mock.attrList, { langConfig: mock.langConfig }));
26
+ setList(method.handleAttrList(mock.attrList));
27
+ setTimeout(() => {
28
+ form.setFieldsValue({
29
+ ["47081ED51BB4407C92070CB7CAA8D056"]: [new Date(), new Date()]
30
+ });
31
+ }, 2e3);
27
32
  }, []);
28
33
  const onFinish = async (values) => {
29
34
  };