szld-libs 0.4.6 → 0.4.8

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.
@@ -117,11 +117,23 @@ function useDynamicForm(props) {
117
117
  case "range-picker":
118
118
  baseProps.getValueFromEvent = (date) => date == null ? void 0 : date.map((d) => d == null ? void 0 : d.format(format || "YYYY-MM-DD"));
119
119
  baseProps.getValueProps = (value) => {
120
- if (!(value == null ? void 0 : value.length) && !Array.isArray(value))
120
+ if (!(value == null ? void 0 : value.length))
121
121
  return { value: null };
122
- return {
123
- value: (value == null ? void 0 : value.map((v) => dayjs(v))) || null
124
- };
122
+ if (typeof value === "string") {
123
+ const arr = value.split("~");
124
+ if (arr.length > 1) {
125
+ return {
126
+ value: (arr == null ? void 0 : arr.map((v) => dayjs(v))) || null
127
+ };
128
+ }
129
+ return { value: [dayjs(value), dayjs(value)] };
130
+ }
131
+ if (Array.isArray(value)) {
132
+ return {
133
+ value: (value == null ? void 0 : value.map((v) => dayjs(v))) || null
134
+ };
135
+ }
136
+ return null;
125
137
  };
126
138
  break;
127
139
  case "multiple-date-picker":
@@ -391,6 +391,10 @@ function useUniversalTable() {
391
391
  const updatedSelList = currentSelList.map((item) => {
392
392
  var _a, _b;
393
393
  const { input, inputType } = (item == null ? void 0 : item.renderdata) || {};
394
+ const defaultRenderData = item == null ? void 0 : item["default-render-data"];
395
+ if (defaultRenderData) {
396
+ return item;
397
+ }
394
398
  if (input === "tab" && (inputType == null ? void 0 : inputType.startsWith("local-")) && (tabItems == null ? void 0 : tabItems.length) && (currentActive || currentActive === 0)) {
395
399
  const tabConfig = currentSelList.find((item2) => input === "tab" && (inputType == null ? void 0 : inputType.startsWith("local-")));
396
400
  const selectedPackage = tabItems[currentActive];
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: '{"input":"multiple-date-picker","range-picker-save":"single","dataType":"string","length":1000,"input-width":240,"must":true}',
11
+ info: '{"input":"range-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: "",
@@ -118,11 +118,23 @@ function useDynamicForm(props) {
118
118
  case "range-picker":
119
119
  baseProps.getValueFromEvent = (date) => date == null ? void 0 : date.map((d) => d == null ? void 0 : d.format(format || "YYYY-MM-DD"));
120
120
  baseProps.getValueProps = (value) => {
121
- if (!(value == null ? void 0 : value.length) && !Array.isArray(value))
121
+ if (!(value == null ? void 0 : value.length))
122
122
  return { value: null };
123
- return {
124
- value: (value == null ? void 0 : value.map((v) => dayjs(v))) || null
125
- };
123
+ if (typeof value === "string") {
124
+ const arr = value.split("~");
125
+ if (arr.length > 1) {
126
+ return {
127
+ value: (arr == null ? void 0 : arr.map((v) => dayjs(v))) || null
128
+ };
129
+ }
130
+ return { value: [dayjs(value), dayjs(value)] };
131
+ }
132
+ if (Array.isArray(value)) {
133
+ return {
134
+ value: (value == null ? void 0 : value.map((v) => dayjs(v))) || null
135
+ };
136
+ }
137
+ return null;
126
138
  };
127
139
  break;
128
140
  case "multiple-date-picker":
@@ -392,6 +392,10 @@ function useUniversalTable() {
392
392
  const updatedSelList = currentSelList.map((item) => {
393
393
  var _a, _b;
394
394
  const { input, inputType } = (item == null ? void 0 : item.renderdata) || {};
395
+ const defaultRenderData = item == null ? void 0 : item["default-render-data"];
396
+ if (defaultRenderData) {
397
+ return item;
398
+ }
395
399
  if (input === "tab" && (inputType == null ? void 0 : inputType.startsWith("local-")) && (tabItems == null ? void 0 : tabItems.length) && (currentActive || currentActive === 0)) {
396
400
  const tabConfig = currentSelList.find((item2) => input === "tab" && (inputType == null ? void 0 : inputType.startsWith("local-")));
397
401
  const selectedPackage = tabItems[currentActive];
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: '{"input":"multiple-date-picker","range-picker-save":"single","dataType":"string","length":1000,"input-width":240,"must":true}',
13
+ info: '{"input":"range-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.6",
4
+ "version": "0.4.8",
5
5
  "type": "module",
6
6
  "scripts": {
7
7
  "dev": "vite",