form-custom-test 3.0.233 → 3.0.234

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.
@@ -69322,13 +69322,13 @@ function registerIcon(app) {
69322
69322
  if (typeof window !== "undefined") {
69323
69323
  let loadSvg = function() {
69324
69324
  var body = document.body;
69325
- var svgDom = document.getElementById("__svg__icons__dom__1783570264575__");
69325
+ var svgDom = document.getElementById("__svg__icons__dom__1784188316301__");
69326
69326
  if (!svgDom) {
69327
69327
  svgDom = document.createElementNS("http://www.w3.org/2000/svg", "svg");
69328
69328
  svgDom.style.position = "absolute";
69329
69329
  svgDom.style.width = "0";
69330
69330
  svgDom.style.height = "0";
69331
- svgDom.id = "__svg__icons__dom__1783570264575__";
69331
+ svgDom.id = "__svg__icons__dom__1784188316301__";
69332
69332
  svgDom.setAttribute("xmlns", "http://www.w3.org/2000/svg");
69333
69333
  svgDom.setAttribute("xmlns:link", "http://www.w3.org/1999/xlink");
69334
69334
  }
@@ -78049,7 +78049,16 @@ const _sfc_main$l = {
78049
78049
  SvgIcon
78050
78050
  },
78051
78051
  props: {
78052
- widget: Object
78052
+ widget: Object,
78053
+ parentWidget: Object,
78054
+ subFormRowIndex: {
78055
+ type: Number,
78056
+ default: -1
78057
+ },
78058
+ subFormRowId: {
78059
+ type: String,
78060
+ default: ""
78061
+ }
78053
78062
  },
78054
78063
  inject: ["refList", "sfRefList", "globalModel"],
78055
78064
  data() {
@@ -78133,6 +78142,24 @@ const _sfc_main$l = {
78133
78142
  }
78134
78143
  });
78135
78144
  },
78145
+ handleWidgetOnChange(value2, oldValue) {
78146
+ var _a2, _b2, _c2, _d, _e;
78147
+ const onChange = (_b2 = (_a2 = this.widget) == null ? void 0 : _a2.options) == null ? void 0 : _b2.onChange;
78148
+ if (!onChange || !onChange.trim()) {
78149
+ return;
78150
+ }
78151
+ try {
78152
+ let subFormData;
78153
+ let rowId;
78154
+ if (this.subFormRowIndex >= 0 && ((_c2 = this.parentWidget) == null ? void 0 : _c2.type) === "sub-form") {
78155
+ subFormData = (_e = (_d = this.globalModel) == null ? void 0 : _d.formModel) == null ? void 0 : _e[this.parentWidget.options.name];
78156
+ rowId = this.subFormRowId;
78157
+ }
78158
+ new Function("value", "oldValue", "subFormData", "rowId", onChange).call(this, value2, oldValue, subFormData, rowId);
78159
+ } catch (e) {
78160
+ console.error("\u6267\u884C\u5B50\u8868\u683C onChange \u4E8B\u4EF6\u5931\u8D25:", e);
78161
+ }
78162
+ },
78136
78163
  updateFormModel(data2) {
78137
78164
  if (this.globalModel && this.globalModel.formModel) {
78138
78165
  this.globalModel.formModel[this.widget.options.name] = deepClone(data2);
@@ -78180,8 +78207,10 @@ const _sfc_main$l = {
78180
78207
  cancelButtonText: "\u53D6\u6D88",
78181
78208
  type: "warning"
78182
78209
  }).then(() => {
78210
+ const oldTableData = deepClone(this.tableData);
78183
78211
  this.tableData.splice(index2, 1);
78184
78212
  this.updateFormModel(this.tableData);
78213
+ this.handleWidgetOnChange(deepClone(this.tableData), oldTableData);
78185
78214
  this.$message.success("\u5220\u9664\u6210\u529F");
78186
78215
  if (this.widget.options.onRowDelete) {
78187
78216
  try {
@@ -78284,6 +78313,7 @@ const _sfc_main$l = {
78284
78313
  this.$refs.dialogFormRef.validate((valid) => {
78285
78314
  if (valid) {
78286
78315
  const rowData = deepClone(this.dialogFormData);
78316
+ const oldTableData = deepClone(this.tableData);
78287
78317
  if (rowData._columnOptions)
78288
78318
  ;
78289
78319
  if (this.editingIndex === -1) {
@@ -78308,6 +78338,7 @@ const _sfc_main$l = {
78308
78338
  }
78309
78339
  }
78310
78340
  this.updateFormModel(this.tableData);
78341
+ this.handleWidgetOnChange(deepClone(this.tableData), oldTableData);
78311
78342
  this.dialogVisible = false;
78312
78343
  } else {
78313
78344
  this.$message.warning("\u8BF7\u586B\u5199\u5B8C\u6574\u4FE1\u606F");
@@ -78720,7 +78751,7 @@ function _sfc_render$l(_ctx, _cache, $props, $setup, $data, $options) {
78720
78751
  _: 1
78721
78752
  }, 8, ["widget"]);
78722
78753
  }
78723
- var SubTableItem = /* @__PURE__ */ _export_sfc$1(_sfc_main$l, [["render", _sfc_render$l], ["__scopeId", "data-v-7ee123a5"]]);
78754
+ var SubTableItem = /* @__PURE__ */ _export_sfc$1(_sfc_main$l, [["render", _sfc_render$l], ["__scopeId", "data-v-758078c3"]]);
78724
78755
  var subTableColumnsEditor_vue_vue_type_style_index_0_scoped_true_lang = "";
78725
78756
  const _sfc_main$k = {
78726
78757
  name: "sub-table-columns-editor",