szld-libs 0.4.11 → 0.4.12

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.
@@ -108,12 +108,6 @@ function useDynamicForm(props) {
108
108
  value: value ? dayjs(value) : null
109
109
  });
110
110
  break;
111
- case "second-picker":
112
- baseProps.getValueFromEvent = (date) => date == null ? void 0 : date.format(format || "HH:mm:ss");
113
- baseProps.getValueProps = (value) => ({
114
- value: value ? dayjs(value, format || "HH:mm:ss") : null
115
- });
116
- break;
117
111
  }
118
112
  return baseProps;
119
113
  },
@@ -608,6 +602,13 @@ function useDynamicForm(props) {
608
602
  }
609
603
  case "range-picker":
610
604
  return /* @__PURE__ */ jsx(Calendar, { type: "range", readOnly: readonly, children: (val, actions) => {
605
+ const valType = typeof val;
606
+ if (valType === "string") {
607
+ val = val.split("~");
608
+ if (val.length === 1) {
609
+ val = [val[0], val[1]];
610
+ }
611
+ }
611
612
  return /* @__PURE__ */ jsx(
612
613
  Cell,
613
614
  {
@@ -623,6 +624,10 @@ function useDynamicForm(props) {
623
624
  } });
624
625
  case "multiple-date-picker":
625
626
  return /* @__PURE__ */ jsx(Calendar, { type: "multiple", children: (val, actions) => {
627
+ const valType = typeof val;
628
+ if (valType === "string") {
629
+ val = val.split(",");
630
+ }
626
631
  return /* @__PURE__ */ jsx(
627
632
  Cell,
628
633
  {
package/es/index.js CHANGED
@@ -23,6 +23,15 @@ const Demo = () => {
23
23
  };
24
24
  useEffect(() => {
25
25
  setList(handleAttrList(attrList));
26
+ setTimeout(() => {
27
+ form.setFieldsValue({
28
+ customFormList: [
29
+ {
30
+ "30BDE6E7977E40069B55DDE61C8795AE": "2026-05-29"
31
+ }
32
+ ]
33
+ });
34
+ }, 2e3);
26
35
  }, []);
27
36
  const onFinish = async (values) => {
28
37
  };
package/es/mock/index.js CHANGED
@@ -8,7 +8,7 @@ const attrList = [
8
8
  attrid: "30BDE6E7977E40069B55DDE61C8795AE",
9
9
  attrname: "Dates",
10
10
  attrtype: 0,
11
- info: '{"readonly":true,"input":"range-picker","range-picker-save":"single","dataType":"string","length":1000,"input-width":240,"must":true}',
11
+ info: '{"readonly":false,"input":"multiple-date-picker","range-picker-save":"single","dataType":"string","length":1000,"input-width":240,"must":true}',
12
12
  info_base64: 0,
13
13
  createtime: "2026-02-11 15:12:26",
14
14
  attrvalue: "",
@@ -109,12 +109,6 @@ function useDynamicForm(props) {
109
109
  value: value ? dayjs(value) : null
110
110
  });
111
111
  break;
112
- case "second-picker":
113
- baseProps.getValueFromEvent = (date) => date == null ? void 0 : date.format(format || "HH:mm:ss");
114
- baseProps.getValueProps = (value) => ({
115
- value: value ? dayjs(value, format || "HH:mm:ss") : null
116
- });
117
- break;
118
112
  }
119
113
  return baseProps;
120
114
  },
@@ -609,6 +603,13 @@ function useDynamicForm(props) {
609
603
  }
610
604
  case "range-picker":
611
605
  return /* @__PURE__ */ jsxRuntime.jsx(reactVant.Calendar, { type: "range", readOnly: readonly, children: (val, actions) => {
606
+ const valType = typeof val;
607
+ if (valType === "string") {
608
+ val = val.split("~");
609
+ if (val.length === 1) {
610
+ val = [val[0], val[1]];
611
+ }
612
+ }
612
613
  return /* @__PURE__ */ jsxRuntime.jsx(
613
614
  reactVant.Cell,
614
615
  {
@@ -624,6 +625,10 @@ function useDynamicForm(props) {
624
625
  } });
625
626
  case "multiple-date-picker":
626
627
  return /* @__PURE__ */ jsxRuntime.jsx(reactVant.Calendar, { type: "multiple", children: (val, actions) => {
628
+ const valType = typeof val;
629
+ if (valType === "string") {
630
+ val = val.split(",");
631
+ }
627
632
  return /* @__PURE__ */ jsxRuntime.jsx(
628
633
  reactVant.Cell,
629
634
  {
package/lib/index.js CHANGED
@@ -24,6 +24,15 @@ const Demo = () => {
24
24
  };
25
25
  react.useEffect(() => {
26
26
  setList(method.handleAttrList(mock.attrList));
27
+ setTimeout(() => {
28
+ form.setFieldsValue({
29
+ customFormList: [
30
+ {
31
+ "30BDE6E7977E40069B55DDE61C8795AE": "2026-05-29"
32
+ }
33
+ ]
34
+ });
35
+ }, 2e3);
27
36
  }, []);
28
37
  const onFinish = async (values) => {
29
38
  };
package/lib/mock/index.js CHANGED
@@ -10,7 +10,7 @@ const attrList = [
10
10
  attrid: "30BDE6E7977E40069B55DDE61C8795AE",
11
11
  attrname: "Dates",
12
12
  attrtype: 0,
13
- info: '{"readonly":true,"input":"range-picker","range-picker-save":"single","dataType":"string","length":1000,"input-width":240,"must":true}',
13
+ info: '{"readonly":false,"input":"multiple-date-picker","range-picker-save":"single","dataType":"string","length":1000,"input-width":240,"must":true}',
14
14
  info_base64: 0,
15
15
  createtime: "2026-02-11 15:12:26",
16
16
  attrvalue: "",
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "szld-libs",
3
3
  "private": false,
4
- "version": "0.4.11",
4
+ "version": "0.4.12",
5
5
  "type": "module",
6
6
  "scripts": {
7
7
  "dev": "vite",