t20-common-lib 0.15.27 → 0.15.29
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/package.json
CHANGED
|
@@ -287,8 +287,8 @@ export default {
|
|
|
287
287
|
if (!item.prop) return;
|
|
288
288
|
const cfg = byFieldNo[item.prop];
|
|
289
289
|
if (!cfg) return;
|
|
290
|
-
if (cfg.
|
|
291
|
-
item.isShow = this.templateShowOrEditable(cfg.
|
|
290
|
+
if (cfg.isEnabled !== undefined && cfg.isEnabled !== null) {
|
|
291
|
+
item.isShow = this.templateShowOrEditable(cfg.isEnabled);
|
|
292
292
|
}
|
|
293
293
|
if (cfg.showName != null && String(cfg.showName).trim() !== "") {
|
|
294
294
|
item.label = cfg.showName;
|
|
@@ -412,7 +412,7 @@ export default {
|
|
|
412
412
|
this.$set(field, "options", options);
|
|
413
413
|
this.patchLinkageOverride(groupProp, fieldProp, { options });
|
|
414
414
|
},
|
|
415
|
-
|
|
415
|
+
/**
|
|
416
416
|
* 场景5:切换字段渲染的 elementType(如 INPUT / SELECT),须在 elementTypeChange 中已注册。
|
|
417
417
|
*/
|
|
418
418
|
setFieldElementType(groupProp, fieldProp, elementType) {
|
|
@@ -490,21 +490,6 @@ export default {
|
|
|
490
490
|
this.isApplyingLinkage = false;
|
|
491
491
|
});
|
|
492
492
|
},
|
|
493
|
-
/**
|
|
494
|
-
* 提交校验失败时,将可视区域滚动到第一个未通过的表单项(依赖 Element 的 .is-error)。
|
|
495
|
-
*/
|
|
496
|
-
scrollToFirstFormError() {
|
|
497
|
-
const formRef = this.$refs.dynamicForms;
|
|
498
|
-
const formEl = formRef && formRef.$el;
|
|
499
|
-
if (!formEl || typeof formEl.querySelector !== "function") return;
|
|
500
|
-
const firstError = formEl.querySelector(".el-form-item.is-error");
|
|
501
|
-
if (!firstError || typeof firstError.scrollIntoView !== "function") return;
|
|
502
|
-
firstError.scrollIntoView({
|
|
503
|
-
behavior: "smooth",
|
|
504
|
-
block: "center",
|
|
505
|
-
inline: "nearest",
|
|
506
|
-
});
|
|
507
|
-
},
|
|
508
493
|
/**
|
|
509
494
|
* 触发表单校验;通过后由返回值携带表单数据与附件(与 needFile 一致时含已落档行)。
|
|
510
495
|
* @returns {Promise<{ valid: false, formData: object } | { valid: true, formData: object, operate?: string, fileUploadTableData?: array }>}
|
|
@@ -157,8 +157,8 @@ export default {
|
|
|
157
157
|
if (!item.prop) return
|
|
158
158
|
const cfg = byFieldNo[item.prop]
|
|
159
159
|
if (!cfg) return
|
|
160
|
-
if (cfg.
|
|
161
|
-
item.isShow = this.templateShowOrEditable(cfg.
|
|
160
|
+
if (cfg.isEnabled !== undefined && cfg.isEnabled !== null) {
|
|
161
|
+
item.isShow = this.templateShowOrEditable(cfg.isEnabled)
|
|
162
162
|
}
|
|
163
163
|
if (cfg.showName != null && String(cfg.showName).trim() !== '') {
|
|
164
164
|
item.label = cfg.showName
|