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.
@@ -25935,6 +25935,10 @@ var containerItemMixin = {
25935
25935
  return !this.rowIdData ? 0 : this.rowIdData.length;
25936
25936
  },
25937
25937
  disableSubFormRow(rowIndex) {
25938
+ if (!Array.isArray(this.rowIdData) || this.rowIdData[rowIndex] == null)
25939
+ return;
25940
+ if (!this.widget || !this.widget.widgetList)
25941
+ return;
25938
25942
  this.widget.widgetList.forEach((subWidget) => {
25939
25943
  let swRefName = subWidget.options.name + "@row" + this.rowIdData[rowIndex];
25940
25944
  let foundSW = this.getWidgetRef(swRefName);
@@ -25944,6 +25948,10 @@ var containerItemMixin = {
25944
25948
  });
25945
25949
  },
25946
25950
  enableSubFormRow(rowIndex) {
25951
+ if (!Array.isArray(this.rowIdData) || this.rowIdData[rowIndex] == null)
25952
+ return;
25953
+ if (!this.widget || !this.widget.widgetList)
25954
+ return;
25947
25955
  this.widget.widgetList.forEach((subWidget) => {
25948
25956
  let swRefName = subWidget.options.name + "@row" + this.rowIdData[rowIndex];
25949
25957
  let foundSW = this.getWidgetRef(swRefName);
@@ -25953,20 +25961,30 @@ var containerItemMixin = {
25953
25961
  });
25954
25962
  },
25955
25963
  disableSubForm() {
25956
- if (this.rowIdData.length > 0) {
25964
+ if (Array.isArray(this.rowIdData) && this.rowIdData.length > 0) {
25957
25965
  this.rowIdData.forEach((dataRow, rIdx) => {
25958
25966
  this.disableSubFormRow(rIdx);
25959
25967
  });
25960
25968
  }
25961
- this.actionDisabled = true;
25969
+ if (typeof this.actionDisabled !== "undefined") {
25970
+ this.actionDisabled = true;
25971
+ }
25972
+ if (this.widget && this.widget.options) {
25973
+ this.widget.options.disabled = true;
25974
+ }
25962
25975
  },
25963
25976
  enableSubForm() {
25964
- if (this.rowIdData.length > 0) {
25977
+ if (Array.isArray(this.rowIdData) && this.rowIdData.length > 0) {
25965
25978
  this.rowIdData.forEach((dataRow, rIdx) => {
25966
25979
  this.enableSubFormRow(rIdx);
25967
25980
  });
25968
25981
  }
25969
- this.actionDisabled = false;
25982
+ if (typeof this.actionDisabled !== "undefined") {
25983
+ this.actionDisabled = false;
25984
+ }
25985
+ if (this.widget && this.widget.options) {
25986
+ this.widget.options.disabled = false;
25987
+ }
25970
25988
  },
25971
25989
  resetSubForm() {
25972
25990
  if (this.widget.type === "sub-form") {
@@ -27016,7 +27034,13 @@ const _sfc_main$2L = {
27016
27034
  findWidgetAndSetDisabled(widgetName, disabledFlag) {
27017
27035
  let foundW = this.getWidgetRef(widgetName);
27018
27036
  if (!!foundW) {
27019
- foundW.setDisabled(disabledFlag);
27037
+ if (disabledFlag && typeof foundW.disableSubForm === "function") {
27038
+ foundW.disableSubForm();
27039
+ } else if (!disabledFlag && typeof foundW.enableSubForm === "function") {
27040
+ foundW.enableSubForm();
27041
+ } else if (typeof foundW.setDisabled === "function") {
27042
+ foundW.setDisabled(disabledFlag);
27043
+ }
27020
27044
  } else {
27021
27045
  this.findWidgetOfSubFormAndSetDisabled(widgetName, disabledFlag);
27022
27046
  }
@@ -27024,7 +27048,7 @@ const _sfc_main$2L = {
27024
27048
  findWidgetOfSubFormAndSetDisabled(widgetName, disabledFlag) {
27025
27049
  this.findWidgetNameInSubForm(widgetName).forEach((wn) => {
27026
27050
  let sw = this.getWidgetRef(wn);
27027
- if (!!sw) {
27051
+ if (!!sw && typeof sw.setDisabled === "function") {
27028
27052
  sw.setDisabled(disabledFlag);
27029
27053
  }
27030
27054
  });
@@ -27426,7 +27450,7 @@ function _sfc_render$2L(_ctx, _cache, $props, $setup, $data, $options) {
27426
27450
  _: 3
27427
27451
  }, 8, ["label-position", "size", "class", "label-width", "model"]);
27428
27452
  }
27429
- var VFormRender = /* @__PURE__ */ _export_sfc$1(_sfc_main$2L, [["render", _sfc_render$2L], ["__scopeId", "data-v-15a0247d"]]);
27453
+ var VFormRender = /* @__PURE__ */ _export_sfc$1(_sfc_main$2L, [["render", _sfc_render$2L], ["__scopeId", "data-v-581a58e9"]]);
27430
27454
  var ace$2 = { exports: {} };
27431
27455
  (function(module, exports) {
27432
27456
  (function() {
@@ -67884,13 +67908,13 @@ function registerIcon(app) {
67884
67908
  if (typeof window !== "undefined") {
67885
67909
  let loadSvg = function() {
67886
67910
  var body = document.body;
67887
- var svgDom = document.getElementById("__svg__icons__dom__1772609555271__");
67911
+ var svgDom = document.getElementById("__svg__icons__dom__1772611245574__");
67888
67912
  if (!svgDom) {
67889
67913
  svgDom = document.createElementNS("http://www.w3.org/2000/svg", "svg");
67890
67914
  svgDom.style.position = "absolute";
67891
67915
  svgDom.style.width = "0";
67892
67916
  svgDom.style.height = "0";
67893
- svgDom.id = "__svg__icons__dom__1772609555271__";
67917
+ svgDom.id = "__svg__icons__dom__1772611245574__";
67894
67918
  svgDom.setAttribute("xmlns", "http://www.w3.org/2000/svg");
67895
67919
  svgDom.setAttribute("xmlns:link", "http://www.w3.org/1999/xlink");
67896
67920
  }
@@ -75080,6 +75104,50 @@ const _sfc_main$8 = {
75080
75104
  deleteFromRowIdData(rowIndex) {
75081
75105
  this.rowIdData.splice(rowIndex, 1);
75082
75106
  },
75107
+ disableSubFormRow(rowIndex) {
75108
+ if (!this.widget.widgetList || !this.rowIdData[rowIndex])
75109
+ return;
75110
+ this.widget.widgetList.forEach((subWidget) => {
75111
+ const swRefName = subWidget.options.name + "@row" + this.rowIdData[rowIndex];
75112
+ const foundSW = this.getWidgetRef(swRefName);
75113
+ if (foundSW && typeof foundSW.setDisabled === "function") {
75114
+ foundSW.setDisabled(true);
75115
+ }
75116
+ });
75117
+ },
75118
+ enableSubFormRow(rowIndex) {
75119
+ if (!this.widget.widgetList || !this.rowIdData[rowIndex])
75120
+ return;
75121
+ this.widget.widgetList.forEach((subWidget) => {
75122
+ const swRefName = subWidget.options.name + "@row" + this.rowIdData[rowIndex];
75123
+ const foundSW = this.getWidgetRef(swRefName);
75124
+ if (foundSW && typeof foundSW.setDisabled === "function") {
75125
+ foundSW.setDisabled(false);
75126
+ }
75127
+ });
75128
+ },
75129
+ disableSubForm() {
75130
+ if (this.rowIdData.length > 0) {
75131
+ this.rowIdData.forEach((_, rIdx) => {
75132
+ this.disableSubFormRow(rIdx);
75133
+ });
75134
+ }
75135
+ this.actionDisabled = true;
75136
+ if (this.widget && this.widget.options) {
75137
+ this.widget.options.disabled = true;
75138
+ }
75139
+ },
75140
+ enableSubForm() {
75141
+ if (this.rowIdData.length > 0) {
75142
+ this.rowIdData.forEach((_, rIdx) => {
75143
+ this.enableSubFormRow(rIdx);
75144
+ });
75145
+ }
75146
+ this.actionDisabled = false;
75147
+ if (this.widget && this.widget.options) {
75148
+ this.widget.options.disabled = false;
75149
+ }
75150
+ },
75083
75151
  initFieldSchemaData() {
75084
75152
  if (!this.widget || this.widget.type !== "custom-sub-form") {
75085
75153
  return;
@@ -75369,8 +75437,9 @@ function _sfc_render$8(_ctx, _cache, $props, $setup, $data, $options) {
75369
75437
  "sub-form-row-index": sfrIdx,
75370
75438
  "sub-form-row-id": subFormRowId,
75371
75439
  "sub-form-col-index": swIdx,
75440
+ disabled: $props.widget.options.disabled,
75372
75441
  "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 }, [
75442
+ }, 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
75443
  $data.fieldSchemaData && $data.fieldSchemaData[sfrIdx] && $data.fieldSchemaData[sfrIdx][swIdx] ? (openBlock(), createBlock(resolveDynamicComponent($options.getComponentName(subWidget)), {
75375
75444
  key: 0,
75376
75445
  field: $data.fieldSchemaData[sfrIdx][swIdx],
@@ -75379,8 +75448,9 @@ function _sfc_render$8(_ctx, _cache, $props, $setup, $data, $options) {
75379
75448
  "parent-widget": $props.widget,
75380
75449
  "sub-form-row-id": subFormRowId,
75381
75450
  "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... "))
75451
+ "sub-form-col-index": swIdx,
75452
+ disabled: $props.widget.options.disabled
75453
+ }, 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
75454
  ], 64)) : createCommentVNode("", true)
75385
75455
  ], 64);
75386
75456
  }), 128)) : (openBlock(), createElementBlock("div", _hoisted_10, [
@@ -75411,7 +75481,7 @@ function _sfc_render$8(_ctx, _cache, $props, $setup, $data, $options) {
75411
75481
  _: 1
75412
75482
  }, 8, ["widget"]);
75413
75483
  }
75414
- var CustomSubFormItem = /* @__PURE__ */ _export_sfc$1(_sfc_main$8, [["render", _sfc_render$8], ["__scopeId", "data-v-4ce4d728"]]);
75484
+ var CustomSubFormItem = /* @__PURE__ */ _export_sfc$1(_sfc_main$8, [["render", _sfc_render$8], ["__scopeId", "data-v-5993b6a5"]]);
75415
75485
  const customTableCellSchema = {
75416
75486
  type: "custom-table-cell",
75417
75487
  category: "container",