super-page-runtime 2.0.85 → 2.0.86
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/es/components/runtime/utils/api/api-util.js +1 -2
- package/dist/es/components/runtime/utils/events/validator-util.js +6 -26
- package/dist/es/components/runtime/utils/page-helper-util.js +1 -2
- package/dist/es/components/runtime/utils/page-init-util.js +1 -2
- package/dist/es/components/runtime/views/assemblys/form/placeholder/placeholder-runtime.vue.js +1 -1
- package/dist/es/components/runtime/views/super-page.vue.js +1 -2
- package/package.json +1 -1
- package/dist/es/components/runtime/views/assemblys/form/placeholder/placeholder-runtime.vue3.js +0 -1
|
@@ -75,25 +75,10 @@ function getEndObjectRule(rule, props, currentProp) {
|
|
|
75
75
|
}
|
|
76
76
|
function getValidator(columns) {
|
|
77
77
|
const rules = {};
|
|
78
|
-
if (columns) {
|
|
79
|
-
columns.forEach((editField) => {
|
|
80
|
-
const prop = editField.model;
|
|
81
|
-
if (prop && editField.validations) {
|
|
82
|
-
const validations = editField.validations;
|
|
83
|
-
if (prop.indexOf(".") > 0) {
|
|
84
|
-
setObjectPropRule(editField.prop, rules, validations);
|
|
85
|
-
} else {
|
|
86
|
-
if (validations && validations.length > 0) {
|
|
87
|
-
rules[prop] = [...validations];
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
|
-
});
|
|
92
|
-
}
|
|
93
78
|
return rules;
|
|
94
79
|
}
|
|
95
80
|
function validator(entity, rules, columns, rowIndex, isSql) {
|
|
96
|
-
return validatorEntity(entity, rules, columns, rowIndex, true
|
|
81
|
+
return validatorEntity(entity, rules, columns, rowIndex, true);
|
|
97
82
|
}
|
|
98
83
|
function sublistVerify(rules) {
|
|
99
84
|
if (!rules) {
|
|
@@ -119,7 +104,7 @@ function sublistVerify(rules) {
|
|
|
119
104
|
function validatorEntity(entity, rules, columns, rowIndex, isShouldRepeateValdate, isSql) {
|
|
120
105
|
let validateRules = sublistVerify(rules);
|
|
121
106
|
if ((!rules || rules === null) && columns) {
|
|
122
|
-
validateRules = getValidator(
|
|
107
|
+
validateRules = getValidator();
|
|
123
108
|
}
|
|
124
109
|
if (!validateRules || Object.keys(validateRules).length === 0) {
|
|
125
110
|
entity["validateErrorField"] = "";
|
|
@@ -137,11 +122,6 @@ function validatorEntity(entity, rules, columns, rowIndex, isShouldRepeateValdat
|
|
|
137
122
|
if (errors) {
|
|
138
123
|
result = errors[0].message;
|
|
139
124
|
fieldName = errors[0]["field"];
|
|
140
|
-
if (typeof rowIndex !== "undefined" && rowIndex !== null) {
|
|
141
|
-
result = getI18n().t("superPageRuntimeMessage.recordLine", {
|
|
142
|
-
row: rowIndex + 1
|
|
143
|
-
}) + "," + result;
|
|
144
|
-
}
|
|
145
125
|
ElMessage({
|
|
146
126
|
message: result,
|
|
147
127
|
showClose: true,
|
|
@@ -154,11 +134,11 @@ function validatorEntity(entity, rules, columns, rowIndex, isShouldRepeateValdat
|
|
|
154
134
|
}
|
|
155
135
|
if (fieldName && isShouldRepeateValdate === true) {
|
|
156
136
|
const reg1 = /[A-Z]+/;
|
|
157
|
-
if (
|
|
137
|
+
if (reg1.test(fieldName) && entity[fieldName.toLowerCase()] !== void 0) {
|
|
158
138
|
const copyEntity = JSON.parse(JSON.stringify(entity));
|
|
159
139
|
copyEntity[fieldName.toUpperCase()] = entity[fieldName.toLowerCase()];
|
|
160
140
|
delete copyEntity[fieldName.toLowerCase()];
|
|
161
|
-
result = validatorEntity(copyEntity, rules, columns, rowIndex, false
|
|
141
|
+
result = validatorEntity(copyEntity, rules, columns, rowIndex, false);
|
|
162
142
|
}
|
|
163
143
|
}
|
|
164
144
|
}
|
|
@@ -206,7 +186,7 @@ function validateWorkflowFormDataModel(dataModel, pageContext) {
|
|
|
206
186
|
if (!rules || Object.keys(rules).length === 0) {
|
|
207
187
|
result = true;
|
|
208
188
|
} else {
|
|
209
|
-
result = validator(handleModels, rules, null, null
|
|
189
|
+
result = validator(handleModels, rules, null, null);
|
|
210
190
|
}
|
|
211
191
|
if (result === true) {
|
|
212
192
|
const workflowFieldPermissionRules = pageContext.workflowRules;
|
|
@@ -270,7 +250,7 @@ function validateCommonFormDataModel(dataModel, pageContext, rules) {
|
|
|
270
250
|
if (!rules || Object.keys(rules).length === 0) {
|
|
271
251
|
resolve(handleModels);
|
|
272
252
|
} else {
|
|
273
|
-
const validateEntityResult = validator(handleModels, rules, null, null
|
|
253
|
+
const validateEntityResult = validator(handleModels, rules, null, null);
|
|
274
254
|
if (validateEntityResult === true) {
|
|
275
255
|
const validateResult = validateSubTables(pageContext);
|
|
276
256
|
if (validateResult === true) {
|
|
@@ -116,8 +116,7 @@ function getRequestObject(pageRequest) {
|
|
|
116
116
|
requestObj[paramStrs[0]] = paramStrs.length > 1 ? paramStrs[1] : "";
|
|
117
117
|
}
|
|
118
118
|
}
|
|
119
|
-
if (requestObj["_t_"])
|
|
120
|
-
;
|
|
119
|
+
if (requestObj["_t_"]) ;
|
|
121
120
|
return requestObj;
|
|
122
121
|
}
|
|
123
122
|
function packageAdditionalMapWithRoute(route, requestObj) {
|
package/dist/es/components/runtime/views/assemblys/form/placeholder/placeholder-runtime.vue.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import _sfc_main from "./placeholder-runtime.vue2.js";
|
|
2
|
-
|
|
2
|
+
/* empty css */
|
|
3
3
|
import _export_sfc from "../../../../../../_virtual/_plugin-vue_export-helper.js";
|
|
4
4
|
const placeholderRuntime = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-a0860ff0"]]);
|
|
5
5
|
export {
|
|
@@ -336,8 +336,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
336
336
|
if (!_selectFile_.value) {
|
|
337
337
|
return;
|
|
338
338
|
}
|
|
339
|
-
if (_selectFile_.value.value === "" || _selectFile_.value.value === null)
|
|
340
|
-
return;
|
|
339
|
+
if (_selectFile_.value.value === "" || _selectFile_.value.value === null) return;
|
|
341
340
|
const fileObj = _selectFile_.value.files[0];
|
|
342
341
|
if (fileObj) {
|
|
343
342
|
_selectFile_.value.value = null;
|
package/package.json
CHANGED
package/dist/es/components/runtime/views/assemblys/form/placeholder/placeholder-runtime.vue3.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
|