form-custom-test 3.0.49 → 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 +82 -16
- package/dist/designer.style.css +1 -1
- package/dist/designer.umd.js +4 -4
- package/dist/render.es.js +82 -16
- package/dist/render.style.css +1 -1
- package/dist/render.umd.js +6 -6
- package/package.json +1 -1
package/dist/designer.es.js
CHANGED
|
@@ -25890,6 +25890,12 @@ var containerItemMixin = {
|
|
|
25890
25890
|
};
|
|
25891
25891
|
traverseFieldWidgetsOfContainer(this.widget, clearRulesFn);
|
|
25892
25892
|
},
|
|
25893
|
+
setDisabled(flag) {
|
|
25894
|
+
if (!this.widget || !this.widget.options) {
|
|
25895
|
+
return;
|
|
25896
|
+
}
|
|
25897
|
+
this.widget.options.disabled = flag;
|
|
25898
|
+
},
|
|
25893
25899
|
activeTab(tabIndex) {
|
|
25894
25900
|
if (tabIndex >= 0 && tabIndex < this.widget.tabs.length) {
|
|
25895
25901
|
this.widget.tabs.forEach((tp, idx) => {
|
|
@@ -25953,6 +25959,9 @@ var containerItemMixin = {
|
|
|
25953
25959
|
});
|
|
25954
25960
|
}
|
|
25955
25961
|
this.actionDisabled = true;
|
|
25962
|
+
if (this.widget && this.widget.options) {
|
|
25963
|
+
this.widget.options.disabled = true;
|
|
25964
|
+
}
|
|
25956
25965
|
},
|
|
25957
25966
|
enableSubForm() {
|
|
25958
25967
|
if (this.rowIdData.length > 0) {
|
|
@@ -25961,6 +25970,9 @@ var containerItemMixin = {
|
|
|
25961
25970
|
});
|
|
25962
25971
|
}
|
|
25963
25972
|
this.actionDisabled = false;
|
|
25973
|
+
if (this.widget && this.widget.options) {
|
|
25974
|
+
this.widget.options.disabled = false;
|
|
25975
|
+
}
|
|
25964
25976
|
},
|
|
25965
25977
|
resetSubForm() {
|
|
25966
25978
|
if (this.widget.type === "sub-form") {
|
|
@@ -27010,7 +27022,13 @@ const _sfc_main$2L = {
|
|
|
27010
27022
|
findWidgetAndSetDisabled(widgetName, disabledFlag) {
|
|
27011
27023
|
let foundW = this.getWidgetRef(widgetName);
|
|
27012
27024
|
if (!!foundW) {
|
|
27013
|
-
foundW.
|
|
27025
|
+
if (disabledFlag && typeof foundW.disableSubForm === "function") {
|
|
27026
|
+
foundW.disableSubForm();
|
|
27027
|
+
} else if (!disabledFlag && typeof foundW.enableSubForm === "function") {
|
|
27028
|
+
foundW.enableSubForm();
|
|
27029
|
+
} else if (typeof foundW.setDisabled === "function") {
|
|
27030
|
+
foundW.setDisabled(disabledFlag);
|
|
27031
|
+
}
|
|
27014
27032
|
} else {
|
|
27015
27033
|
this.findWidgetOfSubFormAndSetDisabled(widgetName, disabledFlag);
|
|
27016
27034
|
}
|
|
@@ -27018,7 +27036,7 @@ const _sfc_main$2L = {
|
|
|
27018
27036
|
findWidgetOfSubFormAndSetDisabled(widgetName, disabledFlag) {
|
|
27019
27037
|
this.findWidgetNameInSubForm(widgetName).forEach((wn) => {
|
|
27020
27038
|
let sw = this.getWidgetRef(wn);
|
|
27021
|
-
if (!!sw) {
|
|
27039
|
+
if (!!sw && typeof sw.setDisabled === "function") {
|
|
27022
27040
|
sw.setDisabled(disabledFlag);
|
|
27023
27041
|
}
|
|
27024
27042
|
});
|
|
@@ -27420,7 +27438,7 @@ function _sfc_render$2L(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
27420
27438
|
_: 3
|
|
27421
27439
|
}, 8, ["label-position", "size", "class", "label-width", "model"]);
|
|
27422
27440
|
}
|
|
27423
|
-
var VFormRender = /* @__PURE__ */ _export_sfc$1(_sfc_main$2L, [["render", _sfc_render$2L], ["__scopeId", "data-v-
|
|
27441
|
+
var VFormRender = /* @__PURE__ */ _export_sfc$1(_sfc_main$2L, [["render", _sfc_render$2L], ["__scopeId", "data-v-581a58e9"]]);
|
|
27424
27442
|
var ace$2 = { exports: {} };
|
|
27425
27443
|
(function(module, exports) {
|
|
27426
27444
|
(function() {
|
|
@@ -67878,13 +67896,13 @@ function registerIcon(app) {
|
|
|
67878
67896
|
if (typeof window !== "undefined") {
|
|
67879
67897
|
let loadSvg = function() {
|
|
67880
67898
|
var body = document.body;
|
|
67881
|
-
var svgDom = document.getElementById("
|
|
67899
|
+
var svgDom = document.getElementById("__svg__icons__dom__1772610046085__");
|
|
67882
67900
|
if (!svgDom) {
|
|
67883
67901
|
svgDom = document.createElementNS("http://www.w3.org/2000/svg", "svg");
|
|
67884
67902
|
svgDom.style.position = "absolute";
|
|
67885
67903
|
svgDom.style.width = "0";
|
|
67886
67904
|
svgDom.style.height = "0";
|
|
67887
|
-
svgDom.id = "
|
|
67905
|
+
svgDom.id = "__svg__icons__dom__1772610046085__";
|
|
67888
67906
|
svgDom.setAttribute("xmlns", "http://www.w3.org/2000/svg");
|
|
67889
67907
|
svgDom.setAttribute("xmlns:link", "http://www.w3.org/1999/xlink");
|
|
67890
67908
|
}
|
|
@@ -75074,6 +75092,50 @@ const _sfc_main$8 = {
|
|
|
75074
75092
|
deleteFromRowIdData(rowIndex) {
|
|
75075
75093
|
this.rowIdData.splice(rowIndex, 1);
|
|
75076
75094
|
},
|
|
75095
|
+
disableSubFormRow(rowIndex) {
|
|
75096
|
+
if (!this.widget.widgetList || !this.rowIdData[rowIndex])
|
|
75097
|
+
return;
|
|
75098
|
+
this.widget.widgetList.forEach((subWidget) => {
|
|
75099
|
+
const swRefName = subWidget.options.name + "@row" + this.rowIdData[rowIndex];
|
|
75100
|
+
const foundSW = this.getWidgetRef(swRefName);
|
|
75101
|
+
if (foundSW && typeof foundSW.setDisabled === "function") {
|
|
75102
|
+
foundSW.setDisabled(true);
|
|
75103
|
+
}
|
|
75104
|
+
});
|
|
75105
|
+
},
|
|
75106
|
+
enableSubFormRow(rowIndex) {
|
|
75107
|
+
if (!this.widget.widgetList || !this.rowIdData[rowIndex])
|
|
75108
|
+
return;
|
|
75109
|
+
this.widget.widgetList.forEach((subWidget) => {
|
|
75110
|
+
const swRefName = subWidget.options.name + "@row" + this.rowIdData[rowIndex];
|
|
75111
|
+
const foundSW = this.getWidgetRef(swRefName);
|
|
75112
|
+
if (foundSW && typeof foundSW.setDisabled === "function") {
|
|
75113
|
+
foundSW.setDisabled(false);
|
|
75114
|
+
}
|
|
75115
|
+
});
|
|
75116
|
+
},
|
|
75117
|
+
disableSubForm() {
|
|
75118
|
+
if (this.rowIdData.length > 0) {
|
|
75119
|
+
this.rowIdData.forEach((_, rIdx) => {
|
|
75120
|
+
this.disableSubFormRow(rIdx);
|
|
75121
|
+
});
|
|
75122
|
+
}
|
|
75123
|
+
this.actionDisabled = true;
|
|
75124
|
+
if (this.widget && this.widget.options) {
|
|
75125
|
+
this.widget.options.disabled = true;
|
|
75126
|
+
}
|
|
75127
|
+
},
|
|
75128
|
+
enableSubForm() {
|
|
75129
|
+
if (this.rowIdData.length > 0) {
|
|
75130
|
+
this.rowIdData.forEach((_, rIdx) => {
|
|
75131
|
+
this.enableSubFormRow(rIdx);
|
|
75132
|
+
});
|
|
75133
|
+
}
|
|
75134
|
+
this.actionDisabled = false;
|
|
75135
|
+
if (this.widget && this.widget.options) {
|
|
75136
|
+
this.widget.options.disabled = false;
|
|
75137
|
+
}
|
|
75138
|
+
},
|
|
75077
75139
|
initFieldSchemaData() {
|
|
75078
75140
|
if (!this.widget || this.widget.type !== "custom-sub-form") {
|
|
75079
75141
|
return;
|
|
@@ -75334,7 +75396,7 @@ function _sfc_render$8(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
75334
75396
|
$props.widget.options.showRowNumber ? (openBlock(), createElementBlock("span", _hoisted_5$2, toDisplayString($props.widget.options.label || "\u81EA\u5B9A\u4E49\u5B50\u8868\u5355") + " " + toDisplayString(sfrIdx + 1), 1)) : (openBlock(), createElementBlock("span", _hoisted_6$2, "\u8868\u5355\u7EC4"))
|
|
75335
75397
|
]),
|
|
75336
75398
|
createElementVNode("div", _hoisted_7$1, [
|
|
75337
|
-
sfrIdx > 0 ? (openBlock(), createBlock(_component_el_button, {
|
|
75399
|
+
sfrIdx > 0 && !$props.widget.options.disabled ? (openBlock(), createBlock(_component_el_button, {
|
|
75338
75400
|
key: 0,
|
|
75339
75401
|
size: "small",
|
|
75340
75402
|
type: "danger",
|
|
@@ -75363,8 +75425,9 @@ function _sfc_render$8(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
75363
75425
|
"sub-form-row-index": sfrIdx,
|
|
75364
75426
|
"sub-form-row-id": subFormRowId,
|
|
75365
75427
|
"sub-form-col-index": swIdx,
|
|
75428
|
+
disabled: $props.widget.options.disabled,
|
|
75366
75429
|
"field-schema-data": $options.getFieldSchemaDataForContainer(subWidget, sfrIdx, swIdx)
|
|
75367
|
-
}, 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 }, [
|
|
75430
|
+
}, 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 }, [
|
|
75368
75431
|
$data.fieldSchemaData && $data.fieldSchemaData[sfrIdx] && $data.fieldSchemaData[sfrIdx][swIdx] ? (openBlock(), createBlock(resolveDynamicComponent($options.getComponentName(subWidget)), {
|
|
75369
75432
|
key: 0,
|
|
75370
75433
|
field: $data.fieldSchemaData[sfrIdx][swIdx],
|
|
@@ -75373,8 +75436,9 @@ function _sfc_render$8(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
75373
75436
|
"parent-widget": $props.widget,
|
|
75374
75437
|
"sub-form-row-id": subFormRowId,
|
|
75375
75438
|
"sub-form-row-index": sfrIdx,
|
|
75376
|
-
"sub-form-col-index": swIdx
|
|
75377
|
-
|
|
75439
|
+
"sub-form-col-index": swIdx,
|
|
75440
|
+
disabled: $props.widget.options.disabled
|
|
75441
|
+
}, 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... "))
|
|
75378
75442
|
], 64)) : createCommentVNode("", true)
|
|
75379
75443
|
], 64);
|
|
75380
75444
|
}), 128)) : (openBlock(), createElementBlock("div", _hoisted_10, [
|
|
@@ -75384,7 +75448,8 @@ function _sfc_render$8(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
75384
75448
|
]);
|
|
75385
75449
|
}), 128)),
|
|
75386
75450
|
!$props.widget.widgetList || $props.widget.widgetList.length === 0 ? (openBlock(), createElementBlock("div", _hoisted_13, " \u8BF7\u5148\u5728\u8BBE\u8BA1\u5668\u4E2D\u62D6\u62FD\u7EC4\u4EF6\u5230\u5B50\u8868\u5355\u4E2D ")) : $data.rowIdData.length === 0 ? (openBlock(), createElementBlock("div", _hoisted_14, ' \u70B9\u51FB"\u6DFB\u52A0"\u6309\u94AE\u6DFB\u52A0\u6570\u636E\u884C ')) : createCommentVNode("", true),
|
|
75387
|
-
|
|
75451
|
+
!$props.widget.options.disabled ? (openBlock(), createBlock(_component_el_button, {
|
|
75452
|
+
key: 2,
|
|
75388
75453
|
disabled: $data.actionDisabled,
|
|
75389
75454
|
type: "primary",
|
|
75390
75455
|
plain: "",
|
|
@@ -75396,7 +75461,7 @@ function _sfc_render$8(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
75396
75461
|
_cache[1] || (_cache[1] = createTextVNode(" \u6DFB\u52A0 ", -1))
|
|
75397
75462
|
]),
|
|
75398
75463
|
_: 1
|
|
75399
|
-
}, 8, ["disabled", "onClick"])
|
|
75464
|
+
}, 8, ["disabled", "onClick"])) : createCommentVNode("", true)
|
|
75400
75465
|
], 2)), [
|
|
75401
75466
|
[vShow, $props.widget && $props.widget.options && !$props.widget.options.hidden]
|
|
75402
75467
|
]) : createCommentVNode("", true)
|
|
@@ -75404,7 +75469,7 @@ function _sfc_render$8(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
75404
75469
|
_: 1
|
|
75405
75470
|
}, 8, ["widget"]);
|
|
75406
75471
|
}
|
|
75407
|
-
var CustomSubFormItem = /* @__PURE__ */ _export_sfc$1(_sfc_main$8, [["render", _sfc_render$8], ["__scopeId", "data-v-
|
|
75472
|
+
var CustomSubFormItem = /* @__PURE__ */ _export_sfc$1(_sfc_main$8, [["render", _sfc_render$8], ["__scopeId", "data-v-5993b6a5"]]);
|
|
75408
75473
|
const customTableCellSchema = {
|
|
75409
75474
|
type: "custom-table-cell",
|
|
75410
75475
|
category: "container",
|
|
@@ -76824,7 +76889,8 @@ function _sfc_render$2(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
76824
76889
|
$props.widget.options.required ? (openBlock(), createElementBlock("span", _hoisted_2$1, "*")) : createCommentVNode("", true)
|
|
76825
76890
|
])) : createCommentVNode("", true),
|
|
76826
76891
|
createElementVNode("div", _hoisted_3$1, [
|
|
76827
|
-
|
|
76892
|
+
!$props.widget.options.disabled ? (openBlock(), createBlock(_component_el_button, {
|
|
76893
|
+
key: 0,
|
|
76828
76894
|
type: "primary",
|
|
76829
76895
|
size: "small",
|
|
76830
76896
|
disabled: $props.widget.options.disabled,
|
|
@@ -76835,7 +76901,7 @@ function _sfc_render$2(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
76835
76901
|
_cache[2] || (_cache[2] = createTextVNode(" \u65B0\u589E ", -1))
|
|
76836
76902
|
]),
|
|
76837
76903
|
_: 1
|
|
76838
|
-
}, 8, ["disabled", "onClick"])
|
|
76904
|
+
}, 8, ["disabled", "onClick"])) : createCommentVNode("", true)
|
|
76839
76905
|
]),
|
|
76840
76906
|
createVNode(_component_el_table, {
|
|
76841
76907
|
data: $data.tableData,
|
|
@@ -76875,7 +76941,7 @@ function _sfc_render$2(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
76875
76941
|
_: 2
|
|
76876
76942
|
}, 1032, ["prop", "label", "width", "min-width"]);
|
|
76877
76943
|
}), 128)),
|
|
76878
|
-
$props.widget.options.showOperation ? (openBlock(), createBlock(_component_el_table_column, {
|
|
76944
|
+
$props.widget.options.showOperation && !$props.widget.options.disabled ? (openBlock(), createBlock(_component_el_table_column, {
|
|
76879
76945
|
key: 1,
|
|
76880
76946
|
label: "\u64CD\u4F5C",
|
|
76881
76947
|
width: $props.widget.options.operationColumnWidth,
|
|
@@ -77051,7 +77117,7 @@ function _sfc_render$2(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
77051
77117
|
_: 1
|
|
77052
77118
|
}, 8, ["widget"]);
|
|
77053
77119
|
}
|
|
77054
|
-
var SubTableItem = /* @__PURE__ */ _export_sfc$1(_sfc_main$2, [["render", _sfc_render$2], ["__scopeId", "data-v-
|
|
77120
|
+
var SubTableItem = /* @__PURE__ */ _export_sfc$1(_sfc_main$2, [["render", _sfc_render$2], ["__scopeId", "data-v-0c285f08"]]);
|
|
77055
77121
|
var subTableColumnsEditor_vue_vue_type_style_index_0_scoped_true_lang = "";
|
|
77056
77122
|
const _sfc_main$1 = {
|
|
77057
77123
|
name: "sub-table-columns-editor",
|