form-custom-test 3.0.50 → 3.0.52
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/designer.es.js +83 -13
- package/dist/designer.style.css +1 -1
- package/dist/designer.umd.js +4 -4
- package/dist/render.es.js +83 -13
- package/dist/render.style.css +1 -1
- package/dist/render.umd.js +63 -63
- package/package.json +1 -1
package/dist/render.es.js
CHANGED
|
@@ -24297,6 +24297,10 @@ var containerItemMixin = {
|
|
|
24297
24297
|
return !this.rowIdData ? 0 : this.rowIdData.length;
|
|
24298
24298
|
},
|
|
24299
24299
|
disableSubFormRow(rowIndex) {
|
|
24300
|
+
if (!Array.isArray(this.rowIdData) || this.rowIdData[rowIndex] == null)
|
|
24301
|
+
return;
|
|
24302
|
+
if (!this.widget || !this.widget.widgetList)
|
|
24303
|
+
return;
|
|
24300
24304
|
this.widget.widgetList.forEach((subWidget) => {
|
|
24301
24305
|
let swRefName = subWidget.options.name + "@row" + this.rowIdData[rowIndex];
|
|
24302
24306
|
let foundSW = this.getWidgetRef(swRefName);
|
|
@@ -24306,6 +24310,10 @@ var containerItemMixin = {
|
|
|
24306
24310
|
});
|
|
24307
24311
|
},
|
|
24308
24312
|
enableSubFormRow(rowIndex) {
|
|
24313
|
+
if (!Array.isArray(this.rowIdData) || this.rowIdData[rowIndex] == null)
|
|
24314
|
+
return;
|
|
24315
|
+
if (!this.widget || !this.widget.widgetList)
|
|
24316
|
+
return;
|
|
24309
24317
|
this.widget.widgetList.forEach((subWidget) => {
|
|
24310
24318
|
let swRefName = subWidget.options.name + "@row" + this.rowIdData[rowIndex];
|
|
24311
24319
|
let foundSW = this.getWidgetRef(swRefName);
|
|
@@ -24315,20 +24323,30 @@ var containerItemMixin = {
|
|
|
24315
24323
|
});
|
|
24316
24324
|
},
|
|
24317
24325
|
disableSubForm() {
|
|
24318
|
-
if (this.rowIdData.length > 0) {
|
|
24326
|
+
if (Array.isArray(this.rowIdData) && this.rowIdData.length > 0) {
|
|
24319
24327
|
this.rowIdData.forEach((dataRow, rIdx) => {
|
|
24320
24328
|
this.disableSubFormRow(rIdx);
|
|
24321
24329
|
});
|
|
24322
24330
|
}
|
|
24323
|
-
this.actionDisabled
|
|
24331
|
+
if (typeof this.actionDisabled !== "undefined") {
|
|
24332
|
+
this.actionDisabled = true;
|
|
24333
|
+
}
|
|
24334
|
+
if (this.widget && this.widget.options) {
|
|
24335
|
+
this.widget.options.disabled = true;
|
|
24336
|
+
}
|
|
24324
24337
|
},
|
|
24325
24338
|
enableSubForm() {
|
|
24326
|
-
if (this.rowIdData.length > 0) {
|
|
24339
|
+
if (Array.isArray(this.rowIdData) && this.rowIdData.length > 0) {
|
|
24327
24340
|
this.rowIdData.forEach((dataRow, rIdx) => {
|
|
24328
24341
|
this.enableSubFormRow(rIdx);
|
|
24329
24342
|
});
|
|
24330
24343
|
}
|
|
24331
|
-
this.actionDisabled
|
|
24344
|
+
if (typeof this.actionDisabled !== "undefined") {
|
|
24345
|
+
this.actionDisabled = false;
|
|
24346
|
+
}
|
|
24347
|
+
if (this.widget && this.widget.options) {
|
|
24348
|
+
this.widget.options.disabled = false;
|
|
24349
|
+
}
|
|
24332
24350
|
},
|
|
24333
24351
|
resetSubForm() {
|
|
24334
24352
|
if (this.widget.type === "sub-form") {
|
|
@@ -25378,7 +25396,13 @@ const _sfc_main$o = {
|
|
|
25378
25396
|
findWidgetAndSetDisabled(widgetName, disabledFlag) {
|
|
25379
25397
|
let foundW = this.getWidgetRef(widgetName);
|
|
25380
25398
|
if (!!foundW) {
|
|
25381
|
-
foundW.
|
|
25399
|
+
if (disabledFlag && typeof foundW.disableSubForm === "function") {
|
|
25400
|
+
foundW.disableSubForm();
|
|
25401
|
+
} else if (!disabledFlag && typeof foundW.enableSubForm === "function") {
|
|
25402
|
+
foundW.enableSubForm();
|
|
25403
|
+
} else if (typeof foundW.setDisabled === "function") {
|
|
25404
|
+
foundW.setDisabled(disabledFlag);
|
|
25405
|
+
}
|
|
25382
25406
|
} else {
|
|
25383
25407
|
this.findWidgetOfSubFormAndSetDisabled(widgetName, disabledFlag);
|
|
25384
25408
|
}
|
|
@@ -25386,7 +25410,7 @@ const _sfc_main$o = {
|
|
|
25386
25410
|
findWidgetOfSubFormAndSetDisabled(widgetName, disabledFlag) {
|
|
25387
25411
|
this.findWidgetNameInSubForm(widgetName).forEach((wn) => {
|
|
25388
25412
|
let sw = this.getWidgetRef(wn);
|
|
25389
|
-
if (!!sw) {
|
|
25413
|
+
if (!!sw && typeof sw.setDisabled === "function") {
|
|
25390
25414
|
sw.setDisabled(disabledFlag);
|
|
25391
25415
|
}
|
|
25392
25416
|
});
|
|
@@ -25788,7 +25812,7 @@ function _sfc_render$o(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
25788
25812
|
_: 3
|
|
25789
25813
|
}, 8, ["label-position", "size", "class", "label-width", "model"]);
|
|
25790
25814
|
}
|
|
25791
|
-
var VFormRender = /* @__PURE__ */ _export_sfc$1(_sfc_main$o, [["render", _sfc_render$o], ["__scopeId", "data-v-
|
|
25815
|
+
var VFormRender = /* @__PURE__ */ _export_sfc$1(_sfc_main$o, [["render", _sfc_render$o], ["__scopeId", "data-v-581a58e9"]]);
|
|
25792
25816
|
function registerIcon(app) {
|
|
25793
25817
|
app.component("el-icon-edit", edit);
|
|
25794
25818
|
app.component("el-icon-minus", minus);
|
|
@@ -25803,13 +25827,13 @@ function registerIcon(app) {
|
|
|
25803
25827
|
if (typeof window !== "undefined") {
|
|
25804
25828
|
let loadSvg = function() {
|
|
25805
25829
|
var body = document.body;
|
|
25806
|
-
var svgDom = document.getElementById("
|
|
25830
|
+
var svgDom = document.getElementById("__svg__icons__dom__1772611254603__");
|
|
25807
25831
|
if (!svgDom) {
|
|
25808
25832
|
svgDom = document.createElementNS("http://www.w3.org/2000/svg", "svg");
|
|
25809
25833
|
svgDom.style.position = "absolute";
|
|
25810
25834
|
svgDom.style.width = "0";
|
|
25811
25835
|
svgDom.style.height = "0";
|
|
25812
|
-
svgDom.id = "
|
|
25836
|
+
svgDom.id = "__svg__icons__dom__1772611254603__";
|
|
25813
25837
|
svgDom.setAttribute("xmlns", "http://www.w3.org/2000/svg");
|
|
25814
25838
|
svgDom.setAttribute("xmlns:link", "http://www.w3.org/1999/xlink");
|
|
25815
25839
|
}
|
|
@@ -34068,6 +34092,50 @@ const _sfc_main$9 = {
|
|
|
34068
34092
|
deleteFromRowIdData(rowIndex) {
|
|
34069
34093
|
this.rowIdData.splice(rowIndex, 1);
|
|
34070
34094
|
},
|
|
34095
|
+
disableSubFormRow(rowIndex) {
|
|
34096
|
+
if (!this.widget.widgetList || !this.rowIdData[rowIndex])
|
|
34097
|
+
return;
|
|
34098
|
+
this.widget.widgetList.forEach((subWidget) => {
|
|
34099
|
+
const swRefName = subWidget.options.name + "@row" + this.rowIdData[rowIndex];
|
|
34100
|
+
const foundSW = this.getWidgetRef(swRefName);
|
|
34101
|
+
if (foundSW && typeof foundSW.setDisabled === "function") {
|
|
34102
|
+
foundSW.setDisabled(true);
|
|
34103
|
+
}
|
|
34104
|
+
});
|
|
34105
|
+
},
|
|
34106
|
+
enableSubFormRow(rowIndex) {
|
|
34107
|
+
if (!this.widget.widgetList || !this.rowIdData[rowIndex])
|
|
34108
|
+
return;
|
|
34109
|
+
this.widget.widgetList.forEach((subWidget) => {
|
|
34110
|
+
const swRefName = subWidget.options.name + "@row" + this.rowIdData[rowIndex];
|
|
34111
|
+
const foundSW = this.getWidgetRef(swRefName);
|
|
34112
|
+
if (foundSW && typeof foundSW.setDisabled === "function") {
|
|
34113
|
+
foundSW.setDisabled(false);
|
|
34114
|
+
}
|
|
34115
|
+
});
|
|
34116
|
+
},
|
|
34117
|
+
disableSubForm() {
|
|
34118
|
+
if (this.rowIdData.length > 0) {
|
|
34119
|
+
this.rowIdData.forEach((_, rIdx) => {
|
|
34120
|
+
this.disableSubFormRow(rIdx);
|
|
34121
|
+
});
|
|
34122
|
+
}
|
|
34123
|
+
this.actionDisabled = true;
|
|
34124
|
+
if (this.widget && this.widget.options) {
|
|
34125
|
+
this.widget.options.disabled = true;
|
|
34126
|
+
}
|
|
34127
|
+
},
|
|
34128
|
+
enableSubForm() {
|
|
34129
|
+
if (this.rowIdData.length > 0) {
|
|
34130
|
+
this.rowIdData.forEach((_, rIdx) => {
|
|
34131
|
+
this.enableSubFormRow(rIdx);
|
|
34132
|
+
});
|
|
34133
|
+
}
|
|
34134
|
+
this.actionDisabled = false;
|
|
34135
|
+
if (this.widget && this.widget.options) {
|
|
34136
|
+
this.widget.options.disabled = false;
|
|
34137
|
+
}
|
|
34138
|
+
},
|
|
34071
34139
|
initFieldSchemaData() {
|
|
34072
34140
|
if (!this.widget || this.widget.type !== "custom-sub-form") {
|
|
34073
34141
|
return;
|
|
@@ -34357,8 +34425,9 @@ function _sfc_render$9(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
34357
34425
|
"sub-form-row-index": sfrIdx,
|
|
34358
34426
|
"sub-form-row-id": subFormRowId,
|
|
34359
34427
|
"sub-form-col-index": swIdx,
|
|
34428
|
+
disabled: $props.widget.options.disabled,
|
|
34360
34429
|
"field-schema-data": $options.getFieldSchemaDataForContainer(subWidget, sfrIdx, swIdx)
|
|
34361
|
-
}, null, 8, ["widget", "parent-list", "index-of-parent-list", "parent-widget", "sub-form-row-index", "sub-form-row-id", "sub-form-col-index", "field-schema-data"])) : subWidget ? (openBlock(), createElementBlock(Fragment, { key: 1 }, [
|
|
34430
|
+
}, null, 8, ["widget", "parent-list", "index-of-parent-list", "parent-widget", "sub-form-row-index", "sub-form-row-id", "sub-form-col-index", "disabled", "field-schema-data"])) : subWidget ? (openBlock(), createElementBlock(Fragment, { key: 1 }, [
|
|
34362
34431
|
$data.fieldSchemaData && $data.fieldSchemaData[sfrIdx] && $data.fieldSchemaData[sfrIdx][swIdx] ? (openBlock(), createBlock(resolveDynamicComponent($options.getComponentName(subWidget)), {
|
|
34363
34432
|
key: 0,
|
|
34364
34433
|
field: $data.fieldSchemaData[sfrIdx][swIdx],
|
|
@@ -34367,8 +34436,9 @@ function _sfc_render$9(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
34367
34436
|
"parent-widget": $props.widget,
|
|
34368
34437
|
"sub-form-row-id": subFormRowId,
|
|
34369
34438
|
"sub-form-row-index": sfrIdx,
|
|
34370
|
-
"sub-form-col-index": swIdx
|
|
34371
|
-
|
|
34439
|
+
"sub-form-col-index": swIdx,
|
|
34440
|
+
disabled: $props.widget.options.disabled
|
|
34441
|
+
}, null, 8, ["field", "parent-list", "index-of-parent-list", "parent-widget", "sub-form-row-id", "sub-form-row-index", "sub-form-col-index", "disabled"])) : (openBlock(), createElementBlock("div", _hoisted_9, " \u5B57\u6BB5\u52A0\u8F7D\u4E2D... "))
|
|
34372
34442
|
], 64)) : createCommentVNode("", true)
|
|
34373
34443
|
], 64);
|
|
34374
34444
|
}), 128)) : (openBlock(), createElementBlock("div", _hoisted_10, [
|
|
@@ -34399,7 +34469,7 @@ function _sfc_render$9(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
34399
34469
|
_: 1
|
|
34400
34470
|
}, 8, ["widget"]);
|
|
34401
34471
|
}
|
|
34402
|
-
var CustomSubFormItem = /* @__PURE__ */ _export_sfc$1(_sfc_main$9, [["render", _sfc_render$9], ["__scopeId", "data-v-
|
|
34472
|
+
var CustomSubFormItem = /* @__PURE__ */ _export_sfc$1(_sfc_main$9, [["render", _sfc_render$9], ["__scopeId", "data-v-5993b6a5"]]);
|
|
34403
34473
|
var customTableCellWidget_vue_vue_type_style_index_0_scoped_true_lang = "";
|
|
34404
34474
|
const _sfc_main$8 = {
|
|
34405
34475
|
name: "custom-table-cell-widget",
|