form-custom-test 3.0.61 → 3.0.62

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.
@@ -25236,7 +25236,8 @@ const _sfc_main$2W = {
25236
25236
  };
25237
25237
  },
25238
25238
  displayText() {
25239
- return this.fieldModel || this.field.options.textContent;
25239
+ var _a2;
25240
+ return this.fieldModel != null && this.fieldModel !== "" ? this.fieldModel : (_a2 = this.field.options.textContent) != null ? _a2 : "";
25240
25241
  }
25241
25242
  },
25242
25243
  beforeCreate() {
@@ -25261,6 +25262,9 @@ const _sfc_main$2W = {
25261
25262
  if (newVal === void 0)
25262
25263
  return;
25263
25264
  this.fieldModel = newVal;
25265
+ if (!this.designState) {
25266
+ this.syncUpdateFormModel(newVal);
25267
+ }
25264
25268
  },
25265
25269
  immediate: true
25266
25270
  }
@@ -25287,13 +25291,13 @@ function _sfc_render$2W(_ctx, _cache, $props, $setup, $data, $options) {
25287
25291
  }, [
25288
25292
  createElementVNode("div", {
25289
25293
  style: normalizeStyle($options.innerStyle)
25290
- }, toDisplayString($options.displayText), 5)
25294
+ }, toDisplayString($data.fieldModel), 5)
25291
25295
  ], 4)
25292
25296
  ]),
25293
25297
  _: 1
25294
25298
  }, 8, ["designer", "field", "rules", "design-state", "parent-widget", "parent-list", "index-of-parent-list", "sub-form-row-index", "sub-form-col-index", "sub-form-row-id"]);
25295
25299
  }
25296
- var staticTextWidget = /* @__PURE__ */ _export_sfc$1(_sfc_main$2W, [["render", _sfc_render$2W], ["__scopeId", "data-v-5ec8f7a0"]]);
25300
+ var staticTextWidget = /* @__PURE__ */ _export_sfc$1(_sfc_main$2W, [["render", _sfc_render$2W], ["__scopeId", "data-v-760822b6"]]);
25297
25301
  var __glob_0_21$1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
25298
25302
  __proto__: null,
25299
25303
  "default": staticTextWidget
@@ -26982,6 +26986,7 @@ const _sfc_main$2L = {
26982
26986
  }
26983
26987
  },
26984
26988
  buildDataFromWidget(wItem) {
26989
+ var _a2;
26985
26990
  if (wItem.category === "container") {
26986
26991
  if (wItem.type === "grid") {
26987
26992
  if (!!wItem.cols && wItem.cols.length > 0) {
@@ -27042,11 +27047,19 @@ const _sfc_main$2L = {
27042
27047
  }
27043
27048
  } else if (!!wItem.formItemFlag) {
27044
27049
  if (!this.formData.hasOwnProperty(wItem.options.name)) {
27045
- this.formDataModel[wItem.options.name] = wItem.options.defaultValue;
27050
+ const initVal = wItem.type === "static-text" ? (_a2 = wItem.options.textContent) != null ? _a2 : "" : wItem.options.defaultValue;
27051
+ this.formDataModel[wItem.options.name] = initVal;
27046
27052
  } else {
27047
27053
  let initialValue = this.formData[wItem.options.name];
27048
27054
  this.formDataModel[wItem.options.name] = deepClone(initialValue);
27049
27055
  }
27056
+ } else if (wItem.type === "static-text" && wItem.options && wItem.options.name) {
27057
+ const key = wItem.options.name;
27058
+ if (!this.formData.hasOwnProperty(key)) {
27059
+ this.formDataModel[key] = wItem.options.textContent;
27060
+ } else {
27061
+ this.formDataModel[key] = deepClone(this.formData[key]);
27062
+ }
27050
27063
  }
27051
27064
  },
27052
27065
  addFieldChangeEventHandler() {
@@ -27517,7 +27530,7 @@ function _sfc_render$2L(_ctx, _cache, $props, $setup, $data, $options) {
27517
27530
  _: 3
27518
27531
  }, 8, ["label-position", "size", "class", "label-width", "model"]);
27519
27532
  }
27520
- var VFormRender = /* @__PURE__ */ _export_sfc$1(_sfc_main$2L, [["render", _sfc_render$2L], ["__scopeId", "data-v-1a5c4f64"]]);
27533
+ var VFormRender = /* @__PURE__ */ _export_sfc$1(_sfc_main$2L, [["render", _sfc_render$2L], ["__scopeId", "data-v-6b16d674"]]);
27521
27534
  var ace$2 = { exports: {} };
27522
27535
  (function(module, exports) {
27523
27536
  (function() {
@@ -68043,13 +68056,13 @@ function registerIcon(app) {
68043
68056
  if (typeof window !== "undefined") {
68044
68057
  let loadSvg = function() {
68045
68058
  var body = document.body;
68046
- var svgDom = document.getElementById("__svg__icons__dom__1773813906338__");
68059
+ var svgDom = document.getElementById("__svg__icons__dom__1773815225570__");
68047
68060
  if (!svgDom) {
68048
68061
  svgDom = document.createElementNS("http://www.w3.org/2000/svg", "svg");
68049
68062
  svgDom.style.position = "absolute";
68050
68063
  svgDom.style.width = "0";
68051
68064
  svgDom.style.height = "0";
68052
- svgDom.id = "__svg__icons__dom__1773813906338__";
68065
+ svgDom.id = "__svg__icons__dom__1773815225570__";
68053
68066
  svgDom.setAttribute("xmlns", "http://www.w3.org/2000/svg");
68054
68067
  svgDom.setAttribute("xmlns:link", "http://www.w3.org/1999/xlink");
68055
68068
  }