szld-libs 0.3.97 → 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.
|
@@ -122,6 +122,15 @@ const MySelect = ({
|
|
|
122
122
|
},
|
|
123
123
|
onConfirm: onChange,
|
|
124
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 || "";
|
|
125
134
|
return /* @__PURE__ */ jsx(
|
|
126
135
|
Field,
|
|
127
136
|
{
|
|
@@ -130,7 +139,7 @@ const MySelect = ({
|
|
|
130
139
|
readOnly: true,
|
|
131
140
|
clickable: true,
|
|
132
141
|
placeholder: langId === "10001" ? (item == null ? void 0 : item["default-prompt"]) || "请选择" : (item == null ? void 0 : item["default-prompt"]) || "Please select",
|
|
133
|
-
value:
|
|
142
|
+
value: str,
|
|
134
143
|
onClick: () => {
|
|
135
144
|
if (readonly)
|
|
136
145
|
return;
|
|
@@ -123,6 +123,15 @@ const MySelect = ({
|
|
|
123
123
|
},
|
|
124
124
|
onConfirm: onChange,
|
|
125
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 || "";
|
|
126
135
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
127
136
|
reactVant.Field,
|
|
128
137
|
{
|
|
@@ -131,7 +140,7 @@ const MySelect = ({
|
|
|
131
140
|
readOnly: true,
|
|
132
141
|
clickable: true,
|
|
133
142
|
placeholder: langId === "10001" ? (item == null ? void 0 : item["default-prompt"]) || "请选择" : (item == null ? void 0 : item["default-prompt"]) || "Please select",
|
|
134
|
-
value:
|
|
143
|
+
value: str,
|
|
135
144
|
onClick: () => {
|
|
136
145
|
if (readonly)
|
|
137
146
|
return;
|