szld-libs 0.3.97 → 0.3.99
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,16 @@ const MySelect = ({
|
|
|
122
122
|
},
|
|
123
123
|
onConfirm: onChange,
|
|
124
124
|
children: (val, _, actions) => {
|
|
125
|
+
var _a;
|
|
126
|
+
val = val || value;
|
|
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;
|
|
125
135
|
return /* @__PURE__ */ jsx(
|
|
126
136
|
Field,
|
|
127
137
|
{
|
|
@@ -130,7 +140,7 @@ const MySelect = ({
|
|
|
130
140
|
readOnly: true,
|
|
131
141
|
clickable: true,
|
|
132
142
|
placeholder: langId === "10001" ? (item == null ? void 0 : item["default-prompt"]) || "请选择" : (item == null ? void 0 : item["default-prompt"]) || "Please select",
|
|
133
|
-
value:
|
|
143
|
+
value: str,
|
|
134
144
|
onClick: () => {
|
|
135
145
|
if (readonly)
|
|
136
146
|
return;
|
|
@@ -123,6 +123,16 @@ const MySelect = ({
|
|
|
123
123
|
},
|
|
124
124
|
onConfirm: onChange,
|
|
125
125
|
children: (val, _, actions) => {
|
|
126
|
+
var _a;
|
|
127
|
+
val = val || value;
|
|
128
|
+
let str = "";
|
|
129
|
+
if (Array.isArray(val)) {
|
|
130
|
+
str = (val == null ? void 0 : val.map((v) => {
|
|
131
|
+
var _a2;
|
|
132
|
+
return ((_a2 = options.find((x) => x.value === v)) == null ? void 0 : _a2.label) || v;
|
|
133
|
+
}).join(",")) || "";
|
|
134
|
+
}
|
|
135
|
+
str = ((_a = options.find((v) => v.value === val)) == null ? void 0 : _a.label) || val;
|
|
126
136
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
127
137
|
reactVant.Field,
|
|
128
138
|
{
|
|
@@ -131,7 +141,7 @@ const MySelect = ({
|
|
|
131
141
|
readOnly: true,
|
|
132
142
|
clickable: true,
|
|
133
143
|
placeholder: langId === "10001" ? (item == null ? void 0 : item["default-prompt"]) || "请选择" : (item == null ? void 0 : item["default-prompt"]) || "Please select",
|
|
134
|
-
value:
|
|
144
|
+
value: str,
|
|
135
145
|
onClick: () => {
|
|
136
146
|
if (readonly)
|
|
137
147
|
return;
|