form-custom-test 3.0.60 → 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.
- package/dist/designer.es.js +32 -8
- package/dist/designer.style.css +1 -1
- package/dist/designer.umd.js +3 -3
- package/dist/render.es.js +32 -8
- package/dist/render.style.css +1 -1
- package/dist/render.umd.js +73 -73
- package/package.json +18 -18
package/dist/designer.es.js
CHANGED
|
@@ -25236,7 +25236,8 @@ const _sfc_main$2W = {
|
|
|
25236
25236
|
};
|
|
25237
25237
|
},
|
|
25238
25238
|
displayText() {
|
|
25239
|
-
|
|
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() {
|
|
@@ -25245,6 +25246,7 @@ const _sfc_main$2W = {
|
|
|
25245
25246
|
this.initFieldModel();
|
|
25246
25247
|
this.registerToRefList();
|
|
25247
25248
|
this.initEventHandler();
|
|
25249
|
+
this.buildFieldRules();
|
|
25248
25250
|
this.handleOnCreated();
|
|
25249
25251
|
},
|
|
25250
25252
|
mounted() {
|
|
@@ -25253,7 +25255,20 @@ const _sfc_main$2W = {
|
|
|
25253
25255
|
beforeUnmount() {
|
|
25254
25256
|
this.unregisterFromRefList();
|
|
25255
25257
|
},
|
|
25256
|
-
methods: {}
|
|
25258
|
+
methods: {},
|
|
25259
|
+
watch: {
|
|
25260
|
+
"field.options.textContent": {
|
|
25261
|
+
handler(newVal) {
|
|
25262
|
+
if (newVal === void 0)
|
|
25263
|
+
return;
|
|
25264
|
+
this.fieldModel = newVal;
|
|
25265
|
+
if (!this.designState) {
|
|
25266
|
+
this.syncUpdateFormModel(newVal);
|
|
25267
|
+
}
|
|
25268
|
+
},
|
|
25269
|
+
immediate: true
|
|
25270
|
+
}
|
|
25271
|
+
}
|
|
25257
25272
|
};
|
|
25258
25273
|
function _sfc_render$2W(_ctx, _cache, $props, $setup, $data, $options) {
|
|
25259
25274
|
const _component_form_item_wrapper = resolveComponent("form-item-wrapper");
|
|
@@ -25276,13 +25291,13 @@ function _sfc_render$2W(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
25276
25291
|
}, [
|
|
25277
25292
|
createElementVNode("div", {
|
|
25278
25293
|
style: normalizeStyle($options.innerStyle)
|
|
25279
|
-
}, toDisplayString($
|
|
25294
|
+
}, toDisplayString($data.fieldModel), 5)
|
|
25280
25295
|
], 4)
|
|
25281
25296
|
]),
|
|
25282
25297
|
_: 1
|
|
25283
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"]);
|
|
25284
25299
|
}
|
|
25285
|
-
var staticTextWidget = /* @__PURE__ */ _export_sfc$1(_sfc_main$2W, [["render", _sfc_render$2W], ["__scopeId", "data-v-
|
|
25300
|
+
var staticTextWidget = /* @__PURE__ */ _export_sfc$1(_sfc_main$2W, [["render", _sfc_render$2W], ["__scopeId", "data-v-760822b6"]]);
|
|
25286
25301
|
var __glob_0_21$1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
25287
25302
|
__proto__: null,
|
|
25288
25303
|
"default": staticTextWidget
|
|
@@ -26971,6 +26986,7 @@ const _sfc_main$2L = {
|
|
|
26971
26986
|
}
|
|
26972
26987
|
},
|
|
26973
26988
|
buildDataFromWidget(wItem) {
|
|
26989
|
+
var _a2;
|
|
26974
26990
|
if (wItem.category === "container") {
|
|
26975
26991
|
if (wItem.type === "grid") {
|
|
26976
26992
|
if (!!wItem.cols && wItem.cols.length > 0) {
|
|
@@ -27031,11 +27047,19 @@ const _sfc_main$2L = {
|
|
|
27031
27047
|
}
|
|
27032
27048
|
} else if (!!wItem.formItemFlag) {
|
|
27033
27049
|
if (!this.formData.hasOwnProperty(wItem.options.name)) {
|
|
27034
|
-
|
|
27050
|
+
const initVal = wItem.type === "static-text" ? (_a2 = wItem.options.textContent) != null ? _a2 : "" : wItem.options.defaultValue;
|
|
27051
|
+
this.formDataModel[wItem.options.name] = initVal;
|
|
27035
27052
|
} else {
|
|
27036
27053
|
let initialValue = this.formData[wItem.options.name];
|
|
27037
27054
|
this.formDataModel[wItem.options.name] = deepClone(initialValue);
|
|
27038
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
|
+
}
|
|
27039
27063
|
}
|
|
27040
27064
|
},
|
|
27041
27065
|
addFieldChangeEventHandler() {
|
|
@@ -27506,7 +27530,7 @@ function _sfc_render$2L(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
27506
27530
|
_: 3
|
|
27507
27531
|
}, 8, ["label-position", "size", "class", "label-width", "model"]);
|
|
27508
27532
|
}
|
|
27509
|
-
var VFormRender = /* @__PURE__ */ _export_sfc$1(_sfc_main$2L, [["render", _sfc_render$2L], ["__scopeId", "data-v-
|
|
27533
|
+
var VFormRender = /* @__PURE__ */ _export_sfc$1(_sfc_main$2L, [["render", _sfc_render$2L], ["__scopeId", "data-v-6b16d674"]]);
|
|
27510
27534
|
var ace$2 = { exports: {} };
|
|
27511
27535
|
(function(module, exports) {
|
|
27512
27536
|
(function() {
|
|
@@ -68032,13 +68056,13 @@ function registerIcon(app) {
|
|
|
68032
68056
|
if (typeof window !== "undefined") {
|
|
68033
68057
|
let loadSvg = function() {
|
|
68034
68058
|
var body = document.body;
|
|
68035
|
-
var svgDom = document.getElementById("
|
|
68059
|
+
var svgDom = document.getElementById("__svg__icons__dom__1773815225570__");
|
|
68036
68060
|
if (!svgDom) {
|
|
68037
68061
|
svgDom = document.createElementNS("http://www.w3.org/2000/svg", "svg");
|
|
68038
68062
|
svgDom.style.position = "absolute";
|
|
68039
68063
|
svgDom.style.width = "0";
|
|
68040
68064
|
svgDom.style.height = "0";
|
|
68041
|
-
svgDom.id = "
|
|
68065
|
+
svgDom.id = "__svg__icons__dom__1773815225570__";
|
|
68042
68066
|
svgDom.setAttribute("xmlns", "http://www.w3.org/2000/svg");
|
|
68043
68067
|
svgDom.setAttribute("xmlns:link", "http://www.w3.org/1999/xlink");
|
|
68044
68068
|
}
|