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.
@@ -25959,6 +25959,9 @@ var containerItemMixin = {
25959
25959
  });
25960
25960
  }
25961
25961
  this.actionDisabled = true;
25962
+ if (this.widget && this.widget.options) {
25963
+ this.widget.options.disabled = true;
25964
+ }
25962
25965
  },
25963
25966
  enableSubForm() {
25964
25967
  if (this.rowIdData.length > 0) {
@@ -25967,6 +25970,9 @@ var containerItemMixin = {
25967
25970
  });
25968
25971
  }
25969
25972
  this.actionDisabled = false;
25973
+ if (this.widget && this.widget.options) {
25974
+ this.widget.options.disabled = false;
25975
+ }
25970
25976
  },
25971
25977
  resetSubForm() {
25972
25978
  if (this.widget.type === "sub-form") {
@@ -27016,7 +27022,13 @@ const _sfc_main$2L = {
27016
27022
  findWidgetAndSetDisabled(widgetName, disabledFlag) {
27017
27023
  let foundW = this.getWidgetRef(widgetName);
27018
27024
  if (!!foundW) {
27019
- foundW.setDisabled(disabledFlag);
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
+ }
27020
27032
  } else {
27021
27033
  this.findWidgetOfSubFormAndSetDisabled(widgetName, disabledFlag);
27022
27034
  }
@@ -27024,7 +27036,7 @@ const _sfc_main$2L = {
27024
27036
  findWidgetOfSubFormAndSetDisabled(widgetName, disabledFlag) {
27025
27037
  this.findWidgetNameInSubForm(widgetName).forEach((wn) => {
27026
27038
  let sw = this.getWidgetRef(wn);
27027
- if (!!sw) {
27039
+ if (!!sw && typeof sw.setDisabled === "function") {
27028
27040
  sw.setDisabled(disabledFlag);
27029
27041
  }
27030
27042
  });
@@ -27426,7 +27438,7 @@ function _sfc_render$2L(_ctx, _cache, $props, $setup, $data, $options) {
27426
27438
  _: 3
27427
27439
  }, 8, ["label-position", "size", "class", "label-width", "model"]);
27428
27440
  }
27429
- var VFormRender = /* @__PURE__ */ _export_sfc$1(_sfc_main$2L, [["render", _sfc_render$2L], ["__scopeId", "data-v-15a0247d"]]);
27441
+ var VFormRender = /* @__PURE__ */ _export_sfc$1(_sfc_main$2L, [["render", _sfc_render$2L], ["__scopeId", "data-v-581a58e9"]]);
27430
27442
  var ace$2 = { exports: {} };
27431
27443
  (function(module, exports) {
27432
27444
  (function() {
@@ -67884,13 +67896,13 @@ function registerIcon(app) {
67884
67896
  if (typeof window !== "undefined") {
67885
67897
  let loadSvg = function() {
67886
67898
  var body = document.body;
67887
- var svgDom = document.getElementById("__svg__icons__dom__1772609555271__");
67899
+ var svgDom = document.getElementById("__svg__icons__dom__1772610046085__");
67888
67900
  if (!svgDom) {
67889
67901
  svgDom = document.createElementNS("http://www.w3.org/2000/svg", "svg");
67890
67902
  svgDom.style.position = "absolute";
67891
67903
  svgDom.style.width = "0";
67892
67904
  svgDom.style.height = "0";
67893
- svgDom.id = "__svg__icons__dom__1772609555271__";
67905
+ svgDom.id = "__svg__icons__dom__1772610046085__";
67894
67906
  svgDom.setAttribute("xmlns", "http://www.w3.org/2000/svg");
67895
67907
  svgDom.setAttribute("xmlns:link", "http://www.w3.org/1999/xlink");
67896
67908
  }
@@ -75080,6 +75092,50 @@ const _sfc_main$8 = {
75080
75092
  deleteFromRowIdData(rowIndex) {
75081
75093
  this.rowIdData.splice(rowIndex, 1);
75082
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
+ },
75083
75139
  initFieldSchemaData() {
75084
75140
  if (!this.widget || this.widget.type !== "custom-sub-form") {
75085
75141
  return;
@@ -75369,8 +75425,9 @@ function _sfc_render$8(_ctx, _cache, $props, $setup, $data, $options) {
75369
75425
  "sub-form-row-index": sfrIdx,
75370
75426
  "sub-form-row-id": subFormRowId,
75371
75427
  "sub-form-col-index": swIdx,
75428
+ disabled: $props.widget.options.disabled,
75372
75429
  "field-schema-data": $options.getFieldSchemaDataForContainer(subWidget, sfrIdx, swIdx)
75373
- }, 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 }, [
75374
75431
  $data.fieldSchemaData && $data.fieldSchemaData[sfrIdx] && $data.fieldSchemaData[sfrIdx][swIdx] ? (openBlock(), createBlock(resolveDynamicComponent($options.getComponentName(subWidget)), {
75375
75432
  key: 0,
75376
75433
  field: $data.fieldSchemaData[sfrIdx][swIdx],
@@ -75379,8 +75436,9 @@ function _sfc_render$8(_ctx, _cache, $props, $setup, $data, $options) {
75379
75436
  "parent-widget": $props.widget,
75380
75437
  "sub-form-row-id": subFormRowId,
75381
75438
  "sub-form-row-index": sfrIdx,
75382
- "sub-form-col-index": swIdx
75383
- }, null, 8, ["field", "parent-list", "index-of-parent-list", "parent-widget", "sub-form-row-id", "sub-form-row-index", "sub-form-col-index"])) : (openBlock(), createElementBlock("div", _hoisted_9, " \u5B57\u6BB5\u52A0\u8F7D\u4E2D... "))
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... "))
75384
75442
  ], 64)) : createCommentVNode("", true)
75385
75443
  ], 64);
75386
75444
  }), 128)) : (openBlock(), createElementBlock("div", _hoisted_10, [
@@ -75411,7 +75469,7 @@ function _sfc_render$8(_ctx, _cache, $props, $setup, $data, $options) {
75411
75469
  _: 1
75412
75470
  }, 8, ["widget"]);
75413
75471
  }
75414
- var CustomSubFormItem = /* @__PURE__ */ _export_sfc$1(_sfc_main$8, [["render", _sfc_render$8], ["__scopeId", "data-v-4ce4d728"]]);
75472
+ var CustomSubFormItem = /* @__PURE__ */ _export_sfc$1(_sfc_main$8, [["render", _sfc_render$8], ["__scopeId", "data-v-5993b6a5"]]);
75415
75473
  const customTableCellSchema = {
75416
75474
  type: "custom-table-cell",
75417
75475
  category: "container",