szld-libs 0.3.96 → 0.3.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.
@@ -117,12 +117,20 @@ const MySelect = ({
117
117
  {
118
118
  popup: true,
119
119
  columns: options,
120
- placeholder: "",
121
120
  columnsFieldNames: {
122
- text: "value"
121
+ text: "label"
123
122
  },
124
123
  onConfirm: onChange,
125
124
  children: (val, _, actions) => {
125
+ var _a;
126
+ let str = "";
127
+ if (Array.isArray(val)) {
128
+ str = (val == null ? void 0 : val.map((v) => {
129
+ var _a2;
130
+ return ((_a2 = options.find((x) => x.value === v)) == null ? void 0 : _a2.label) || v;
131
+ }).join(",")) || "";
132
+ }
133
+ str = ((_a = options.find((v) => v.value === val)) == null ? void 0 : _a.label) || val || value || "";
126
134
  return /* @__PURE__ */ jsx(
127
135
  Field,
128
136
  {
@@ -131,7 +139,7 @@ const MySelect = ({
131
139
  readOnly: true,
132
140
  clickable: true,
133
141
  placeholder: langId === "10001" ? (item == null ? void 0 : item["default-prompt"]) || "请选择" : (item == null ? void 0 : item["default-prompt"]) || "Please select",
134
- value: Array.isArray(val) ? val.join(",") : val || value,
142
+ value: str,
135
143
  onClick: () => {
136
144
  if (readonly)
137
145
  return;
@@ -61,7 +61,7 @@ const handleObjDetailToSignleAttrList = (attrList, detail) => {
61
61
  };
62
62
  const handleSetTableRowColor = (record, index, ngColor) => ({
63
63
  style: {
64
- backgroundColor: index !== void 0 && index % 2 === 1 ? (ngColor == null ? void 0 : ngColor[0]) || "var(--bg-color-2)" : (ngColor == null ? void 0 : ngColor[1]) || "var(--bg-color-3)"
64
+ backgroundColor: index !== void 0 && index % 2 === 1 ? (ngColor == null ? void 0 : ngColor[0]) || "rgba(0, 77, 50, 0.16)" : (ngColor == null ? void 0 : ngColor[1]) || "rgba(0, 77, 50, 0.24)"
65
65
  }
66
66
  });
67
67
  const handleFormatMobileDate = (values, format = "YYYY-MM-DD") => {
@@ -118,12 +118,20 @@ const MySelect = ({
118
118
  {
119
119
  popup: true,
120
120
  columns: options,
121
- placeholder: "",
122
121
  columnsFieldNames: {
123
- text: "value"
122
+ text: "label"
124
123
  },
125
124
  onConfirm: onChange,
126
125
  children: (val, _, actions) => {
126
+ var _a;
127
+ let str = "";
128
+ if (Array.isArray(val)) {
129
+ str = (val == null ? void 0 : val.map((v) => {
130
+ var _a2;
131
+ return ((_a2 = options.find((x) => x.value === v)) == null ? void 0 : _a2.label) || v;
132
+ }).join(",")) || "";
133
+ }
134
+ str = ((_a = options.find((v) => v.value === val)) == null ? void 0 : _a.label) || val || value || "";
127
135
  return /* @__PURE__ */ jsxRuntime.jsx(
128
136
  reactVant.Field,
129
137
  {
@@ -132,7 +140,7 @@ const MySelect = ({
132
140
  readOnly: true,
133
141
  clickable: true,
134
142
  placeholder: langId === "10001" ? (item == null ? void 0 : item["default-prompt"]) || "请选择" : (item == null ? void 0 : item["default-prompt"]) || "Please select",
135
- value: Array.isArray(val) ? val.join(",") : val || value,
143
+ value: str,
136
144
  onClick: () => {
137
145
  if (readonly)
138
146
  return;
@@ -63,7 +63,7 @@ const handleObjDetailToSignleAttrList = (attrList, detail) => {
63
63
  };
64
64
  const handleSetTableRowColor = (record, index, ngColor) => ({
65
65
  style: {
66
- backgroundColor: index !== void 0 && index % 2 === 1 ? (ngColor == null ? void 0 : ngColor[0]) || "var(--bg-color-2)" : (ngColor == null ? void 0 : ngColor[1]) || "var(--bg-color-3)"
66
+ backgroundColor: index !== void 0 && index % 2 === 1 ? (ngColor == null ? void 0 : ngColor[0]) || "rgba(0, 77, 50, 0.16)" : (ngColor == null ? void 0 : ngColor[1]) || "rgba(0, 77, 50, 0.24)"
67
67
  }
68
68
  });
69
69
  const handleFormatMobileDate = (values, format = "YYYY-MM-DD") => {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "szld-libs",
3
3
  "private": false,
4
- "version": "0.3.96",
4
+ "version": "0.3.98",
5
5
  "type": "module",
6
6
  "scripts": {
7
7
  "dev": "vite",