form-custom-test 3.0.50 → 3.0.51
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 +67 -9
- package/dist/designer.style.css +1 -1
- package/dist/designer.umd.js +4 -4
- package/dist/render.es.js +67 -9
- package/dist/render.style.css +1 -1
- package/dist/render.umd.js +6 -6
- package/package.json +1 -1
package/dist/render.es.js
CHANGED
|
@@ -24321,6 +24321,9 @@ var containerItemMixin = {
|
|
|
24321
24321
|
});
|
|
24322
24322
|
}
|
|
24323
24323
|
this.actionDisabled = true;
|
|
24324
|
+
if (this.widget && this.widget.options) {
|
|
24325
|
+
this.widget.options.disabled = true;
|
|
24326
|
+
}
|
|
24324
24327
|
},
|
|
24325
24328
|
enableSubForm() {
|
|
24326
24329
|
if (this.rowIdData.length > 0) {
|
|
@@ -24329,6 +24332,9 @@ var containerItemMixin = {
|
|
|
24329
24332
|
});
|
|
24330
24333
|
}
|
|
24331
24334
|
this.actionDisabled = false;
|
|
24335
|
+
if (this.widget && this.widget.options) {
|
|
24336
|
+
this.widget.options.disabled = false;
|
|
24337
|
+
}
|
|
24332
24338
|
},
|
|
24333
24339
|
resetSubForm() {
|
|
24334
24340
|
if (this.widget.type === "sub-form") {
|
|
@@ -25378,7 +25384,13 @@ const _sfc_main$o = {
|
|
|
25378
25384
|
findWidgetAndSetDisabled(widgetName, disabledFlag) {
|
|
25379
25385
|
let foundW = this.getWidgetRef(widgetName);
|
|
25380
25386
|
if (!!foundW) {
|
|
25381
|
-
foundW.
|
|
25387
|
+
if (disabledFlag && typeof foundW.disableSubForm === "function") {
|
|
25388
|
+
foundW.disableSubForm();
|
|
25389
|
+
} else if (!disabledFlag && typeof foundW.enableSubForm === "function") {
|
|
25390
|
+
foundW.enableSubForm();
|
|
25391
|
+
} else if (typeof foundW.setDisabled === "function") {
|
|
25392
|
+
foundW.setDisabled(disabledFlag);
|
|
25393
|
+
}
|
|
25382
25394
|
} else {
|
|
25383
25395
|
this.findWidgetOfSubFormAndSetDisabled(widgetName, disabledFlag);
|
|
25384
25396
|
}
|
|
@@ -25386,7 +25398,7 @@ const _sfc_main$o = {
|
|
|
25386
25398
|
findWidgetOfSubFormAndSetDisabled(widgetName, disabledFlag) {
|
|
25387
25399
|
this.findWidgetNameInSubForm(widgetName).forEach((wn) => {
|
|
25388
25400
|
let sw = this.getWidgetRef(wn);
|
|
25389
|
-
if (!!sw) {
|
|
25401
|
+
if (!!sw && typeof sw.setDisabled === "function") {
|
|
25390
25402
|
sw.setDisabled(disabledFlag);
|
|
25391
25403
|
}
|
|
25392
25404
|
});
|
|
@@ -25788,7 +25800,7 @@ function _sfc_render$o(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
25788
25800
|
_: 3
|
|
25789
25801
|
}, 8, ["label-position", "size", "class", "label-width", "model"]);
|
|
25790
25802
|
}
|
|
25791
|
-
var VFormRender = /* @__PURE__ */ _export_sfc$1(_sfc_main$o, [["render", _sfc_render$o], ["__scopeId", "data-v-
|
|
25803
|
+
var VFormRender = /* @__PURE__ */ _export_sfc$1(_sfc_main$o, [["render", _sfc_render$o], ["__scopeId", "data-v-581a58e9"]]);
|
|
25792
25804
|
function registerIcon(app) {
|
|
25793
25805
|
app.component("el-icon-edit", edit);
|
|
25794
25806
|
app.component("el-icon-minus", minus);
|
|
@@ -25803,13 +25815,13 @@ function registerIcon(app) {
|
|
|
25803
25815
|
if (typeof window !== "undefined") {
|
|
25804
25816
|
let loadSvg = function() {
|
|
25805
25817
|
var body = document.body;
|
|
25806
|
-
var svgDom = document.getElementById("
|
|
25818
|
+
var svgDom = document.getElementById("__svg__icons__dom__1772610054304__");
|
|
25807
25819
|
if (!svgDom) {
|
|
25808
25820
|
svgDom = document.createElementNS("http://www.w3.org/2000/svg", "svg");
|
|
25809
25821
|
svgDom.style.position = "absolute";
|
|
25810
25822
|
svgDom.style.width = "0";
|
|
25811
25823
|
svgDom.style.height = "0";
|
|
25812
|
-
svgDom.id = "
|
|
25824
|
+
svgDom.id = "__svg__icons__dom__1772610054304__";
|
|
25813
25825
|
svgDom.setAttribute("xmlns", "http://www.w3.org/2000/svg");
|
|
25814
25826
|
svgDom.setAttribute("xmlns:link", "http://www.w3.org/1999/xlink");
|
|
25815
25827
|
}
|
|
@@ -34068,6 +34080,50 @@ const _sfc_main$9 = {
|
|
|
34068
34080
|
deleteFromRowIdData(rowIndex) {
|
|
34069
34081
|
this.rowIdData.splice(rowIndex, 1);
|
|
34070
34082
|
},
|
|
34083
|
+
disableSubFormRow(rowIndex) {
|
|
34084
|
+
if (!this.widget.widgetList || !this.rowIdData[rowIndex])
|
|
34085
|
+
return;
|
|
34086
|
+
this.widget.widgetList.forEach((subWidget) => {
|
|
34087
|
+
const swRefName = subWidget.options.name + "@row" + this.rowIdData[rowIndex];
|
|
34088
|
+
const foundSW = this.getWidgetRef(swRefName);
|
|
34089
|
+
if (foundSW && typeof foundSW.setDisabled === "function") {
|
|
34090
|
+
foundSW.setDisabled(true);
|
|
34091
|
+
}
|
|
34092
|
+
});
|
|
34093
|
+
},
|
|
34094
|
+
enableSubFormRow(rowIndex) {
|
|
34095
|
+
if (!this.widget.widgetList || !this.rowIdData[rowIndex])
|
|
34096
|
+
return;
|
|
34097
|
+
this.widget.widgetList.forEach((subWidget) => {
|
|
34098
|
+
const swRefName = subWidget.options.name + "@row" + this.rowIdData[rowIndex];
|
|
34099
|
+
const foundSW = this.getWidgetRef(swRefName);
|
|
34100
|
+
if (foundSW && typeof foundSW.setDisabled === "function") {
|
|
34101
|
+
foundSW.setDisabled(false);
|
|
34102
|
+
}
|
|
34103
|
+
});
|
|
34104
|
+
},
|
|
34105
|
+
disableSubForm() {
|
|
34106
|
+
if (this.rowIdData.length > 0) {
|
|
34107
|
+
this.rowIdData.forEach((_, rIdx) => {
|
|
34108
|
+
this.disableSubFormRow(rIdx);
|
|
34109
|
+
});
|
|
34110
|
+
}
|
|
34111
|
+
this.actionDisabled = true;
|
|
34112
|
+
if (this.widget && this.widget.options) {
|
|
34113
|
+
this.widget.options.disabled = true;
|
|
34114
|
+
}
|
|
34115
|
+
},
|
|
34116
|
+
enableSubForm() {
|
|
34117
|
+
if (this.rowIdData.length > 0) {
|
|
34118
|
+
this.rowIdData.forEach((_, rIdx) => {
|
|
34119
|
+
this.enableSubFormRow(rIdx);
|
|
34120
|
+
});
|
|
34121
|
+
}
|
|
34122
|
+
this.actionDisabled = false;
|
|
34123
|
+
if (this.widget && this.widget.options) {
|
|
34124
|
+
this.widget.options.disabled = false;
|
|
34125
|
+
}
|
|
34126
|
+
},
|
|
34071
34127
|
initFieldSchemaData() {
|
|
34072
34128
|
if (!this.widget || this.widget.type !== "custom-sub-form") {
|
|
34073
34129
|
return;
|
|
@@ -34357,8 +34413,9 @@ function _sfc_render$9(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
34357
34413
|
"sub-form-row-index": sfrIdx,
|
|
34358
34414
|
"sub-form-row-id": subFormRowId,
|
|
34359
34415
|
"sub-form-col-index": swIdx,
|
|
34416
|
+
disabled: $props.widget.options.disabled,
|
|
34360
34417
|
"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 }, [
|
|
34418
|
+
}, 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
34419
|
$data.fieldSchemaData && $data.fieldSchemaData[sfrIdx] && $data.fieldSchemaData[sfrIdx][swIdx] ? (openBlock(), createBlock(resolveDynamicComponent($options.getComponentName(subWidget)), {
|
|
34363
34420
|
key: 0,
|
|
34364
34421
|
field: $data.fieldSchemaData[sfrIdx][swIdx],
|
|
@@ -34367,8 +34424,9 @@ function _sfc_render$9(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
34367
34424
|
"parent-widget": $props.widget,
|
|
34368
34425
|
"sub-form-row-id": subFormRowId,
|
|
34369
34426
|
"sub-form-row-index": sfrIdx,
|
|
34370
|
-
"sub-form-col-index": swIdx
|
|
34371
|
-
|
|
34427
|
+
"sub-form-col-index": swIdx,
|
|
34428
|
+
disabled: $props.widget.options.disabled
|
|
34429
|
+
}, 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
34430
|
], 64)) : createCommentVNode("", true)
|
|
34373
34431
|
], 64);
|
|
34374
34432
|
}), 128)) : (openBlock(), createElementBlock("div", _hoisted_10, [
|
|
@@ -34399,7 +34457,7 @@ function _sfc_render$9(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
34399
34457
|
_: 1
|
|
34400
34458
|
}, 8, ["widget"]);
|
|
34401
34459
|
}
|
|
34402
|
-
var CustomSubFormItem = /* @__PURE__ */ _export_sfc$1(_sfc_main$9, [["render", _sfc_render$9], ["__scopeId", "data-v-
|
|
34460
|
+
var CustomSubFormItem = /* @__PURE__ */ _export_sfc$1(_sfc_main$9, [["render", _sfc_render$9], ["__scopeId", "data-v-5993b6a5"]]);
|
|
34403
34461
|
var customTableCellWidget_vue_vue_type_style_index_0_scoped_true_lang = "";
|
|
34404
34462
|
const _sfc_main$8 = {
|
|
34405
34463
|
name: "custom-table-cell-widget",
|