form-custom-test 3.0.61 → 3.0.63
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 +21 -8
- package/dist/designer.style.css +1 -1
- package/dist/designer.umd.js +4 -4
- package/dist/render.es.js +20 -7
- package/dist/render.style.css +1 -1
- package/dist/render.umd.js +73 -73
- package/package.json +18 -18
package/dist/render.es.js
CHANGED
|
@@ -23598,7 +23598,8 @@ const _sfc_main$z = {
|
|
|
23598
23598
|
};
|
|
23599
23599
|
},
|
|
23600
23600
|
displayText() {
|
|
23601
|
-
|
|
23601
|
+
var _a;
|
|
23602
|
+
return this.fieldModel != null && this.fieldModel !== "" ? this.fieldModel : (_a = this.field.options.textContent) != null ? _a : "";
|
|
23602
23603
|
}
|
|
23603
23604
|
},
|
|
23604
23605
|
beforeCreate() {
|
|
@@ -23623,6 +23624,9 @@ const _sfc_main$z = {
|
|
|
23623
23624
|
if (newVal === void 0)
|
|
23624
23625
|
return;
|
|
23625
23626
|
this.fieldModel = newVal;
|
|
23627
|
+
if (!this.designState) {
|
|
23628
|
+
this.syncUpdateFormModel(newVal);
|
|
23629
|
+
}
|
|
23626
23630
|
},
|
|
23627
23631
|
immediate: true
|
|
23628
23632
|
}
|
|
@@ -23649,13 +23653,13 @@ function _sfc_render$z(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
23649
23653
|
}, [
|
|
23650
23654
|
createElementVNode("div", {
|
|
23651
23655
|
style: normalizeStyle($options.innerStyle)
|
|
23652
|
-
}, toDisplayString($
|
|
23656
|
+
}, toDisplayString($data.fieldModel), 5)
|
|
23653
23657
|
], 4)
|
|
23654
23658
|
]),
|
|
23655
23659
|
_: 1
|
|
23656
23660
|
}, 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"]);
|
|
23657
23661
|
}
|
|
23658
|
-
var staticTextWidget = /* @__PURE__ */ _export_sfc$1(_sfc_main$z, [["render", _sfc_render$z], ["__scopeId", "data-v-
|
|
23662
|
+
var staticTextWidget = /* @__PURE__ */ _export_sfc$1(_sfc_main$z, [["render", _sfc_render$z], ["__scopeId", "data-v-760822b6"]]);
|
|
23659
23663
|
var __glob_0_21 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
23660
23664
|
__proto__: null,
|
|
23661
23665
|
"default": staticTextWidget
|
|
@@ -25344,6 +25348,7 @@ const _sfc_main$o = {
|
|
|
25344
25348
|
}
|
|
25345
25349
|
},
|
|
25346
25350
|
buildDataFromWidget(wItem) {
|
|
25351
|
+
var _a;
|
|
25347
25352
|
if (wItem.category === "container") {
|
|
25348
25353
|
if (wItem.type === "grid") {
|
|
25349
25354
|
if (!!wItem.cols && wItem.cols.length > 0) {
|
|
@@ -25404,11 +25409,19 @@ const _sfc_main$o = {
|
|
|
25404
25409
|
}
|
|
25405
25410
|
} else if (!!wItem.formItemFlag) {
|
|
25406
25411
|
if (!this.formData.hasOwnProperty(wItem.options.name)) {
|
|
25407
|
-
|
|
25412
|
+
const initVal = wItem.type === "static-text" ? (_a = wItem.options.textContent) != null ? _a : "" : wItem.options.defaultValue;
|
|
25413
|
+
this.formDataModel[wItem.options.name] = initVal;
|
|
25408
25414
|
} else {
|
|
25409
25415
|
let initialValue = this.formData[wItem.options.name];
|
|
25410
25416
|
this.formDataModel[wItem.options.name] = deepClone(initialValue);
|
|
25411
25417
|
}
|
|
25418
|
+
} else if (wItem.type === "static-text" && wItem.options && wItem.options.name) {
|
|
25419
|
+
const key = wItem.options.name;
|
|
25420
|
+
if (!this.formData.hasOwnProperty(key)) {
|
|
25421
|
+
this.formDataModel[key] = wItem.options.textContent;
|
|
25422
|
+
} else {
|
|
25423
|
+
this.formDataModel[key] = deepClone(this.formData[key]);
|
|
25424
|
+
}
|
|
25412
25425
|
}
|
|
25413
25426
|
},
|
|
25414
25427
|
addFieldChangeEventHandler() {
|
|
@@ -25879,7 +25892,7 @@ function _sfc_render$o(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
25879
25892
|
_: 3
|
|
25880
25893
|
}, 8, ["label-position", "size", "class", "label-width", "model"]);
|
|
25881
25894
|
}
|
|
25882
|
-
var VFormRender = /* @__PURE__ */ _export_sfc$1(_sfc_main$o, [["render", _sfc_render$o], ["__scopeId", "data-v-
|
|
25895
|
+
var VFormRender = /* @__PURE__ */ _export_sfc$1(_sfc_main$o, [["render", _sfc_render$o], ["__scopeId", "data-v-6b16d674"]]);
|
|
25883
25896
|
function registerIcon(app) {
|
|
25884
25897
|
app.component("el-icon-edit", edit);
|
|
25885
25898
|
app.component("el-icon-minus", minus);
|
|
@@ -25894,13 +25907,13 @@ function registerIcon(app) {
|
|
|
25894
25907
|
if (typeof window !== "undefined") {
|
|
25895
25908
|
let loadSvg = function() {
|
|
25896
25909
|
var body = document.body;
|
|
25897
|
-
var svgDom = document.getElementById("
|
|
25910
|
+
var svgDom = document.getElementById("__svg__icons__dom__1773822744345__");
|
|
25898
25911
|
if (!svgDom) {
|
|
25899
25912
|
svgDom = document.createElementNS("http://www.w3.org/2000/svg", "svg");
|
|
25900
25913
|
svgDom.style.position = "absolute";
|
|
25901
25914
|
svgDom.style.width = "0";
|
|
25902
25915
|
svgDom.style.height = "0";
|
|
25903
|
-
svgDom.id = "
|
|
25916
|
+
svgDom.id = "__svg__icons__dom__1773822744345__";
|
|
25904
25917
|
svgDom.setAttribute("xmlns", "http://www.w3.org/2000/svg");
|
|
25905
25918
|
svgDom.setAttribute("xmlns:link", "http://www.w3.org/1999/xlink");
|
|
25906
25919
|
}
|