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.
- package/dist/szld-components.es.js +1023 -1017
- package/dist/szld-components.umd.js +25 -25
- package/es/components/DynamicFormMobile/mySelect/index.js +11 -3
- package/es/utils/szxkFunc.js +1 -1
- package/lib/components/DynamicFormMobile/mySelect/index.js +11 -3
- package/lib/utils/szxkFunc.js +1 -1
- package/package.json +1 -1
|
@@ -117,12 +117,20 @@ const MySelect = ({
|
|
|
117
117
|
{
|
|
118
118
|
popup: true,
|
|
119
119
|
columns: options,
|
|
120
|
-
placeholder: "",
|
|
121
120
|
columnsFieldNames: {
|
|
122
|
-
text: "
|
|
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:
|
|
142
|
+
value: str,
|
|
135
143
|
onClick: () => {
|
|
136
144
|
if (readonly)
|
|
137
145
|
return;
|
package/es/utils/szxkFunc.js
CHANGED
|
@@ -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]) || "
|
|
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: "
|
|
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:
|
|
143
|
+
value: str,
|
|
136
144
|
onClick: () => {
|
|
137
145
|
if (readonly)
|
|
138
146
|
return;
|
package/lib/utils/szxkFunc.js
CHANGED
|
@@ -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]) || "
|
|
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") => {
|