form-custom-test 3.0.54 → 3.0.56
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 +99 -21
- package/dist/designer.style.css +1 -1
- package/dist/designer.umd.js +6 -6
- package/dist/render.es.js +35 -8
- package/dist/render.style.css +1 -1
- package/dist/render.umd.js +4 -4
- package/package.json +1 -1
package/dist/render.es.js
CHANGED
|
@@ -3002,7 +3002,9 @@ function getDefaultFormConfig() {
|
|
|
3002
3002
|
jsonVersion: 3,
|
|
3003
3003
|
onFormCreated: "",
|
|
3004
3004
|
onFormMounted: "",
|
|
3005
|
-
onFormDataChange: ""
|
|
3005
|
+
onFormDataChange: "",
|
|
3006
|
+
onFormValidate: "",
|
|
3007
|
+
onFormValidateSuccess: ""
|
|
3006
3008
|
};
|
|
3007
3009
|
}
|
|
3008
3010
|
function buildDefaultFormJson() {
|
|
@@ -25578,6 +25580,7 @@ const _sfc_main$o = {
|
|
|
25578
25580
|
});
|
|
25579
25581
|
this.$refs["renderForm"].validate((valid) => {
|
|
25580
25582
|
if (valid) {
|
|
25583
|
+
this.emitFormValidateSuccess(this.formDataModel);
|
|
25581
25584
|
callback2(this.formDataModel);
|
|
25582
25585
|
} else {
|
|
25583
25586
|
callback2(this.formDataModel, this.i18nt("render.hint.validationFailed"));
|
|
@@ -25629,6 +25632,7 @@ const _sfc_main$o = {
|
|
|
25629
25632
|
return foundSFRef.getSubFormValues(needValidation);
|
|
25630
25633
|
},
|
|
25631
25634
|
disableForm() {
|
|
25635
|
+
console.log("disableForm", this.widgetRefList);
|
|
25632
25636
|
let wNameList = Object.keys(this.widgetRefList);
|
|
25633
25637
|
wNameList.forEach((wName) => {
|
|
25634
25638
|
let foundW = this.getWidgetRef(wName);
|
|
@@ -25683,9 +25687,22 @@ const _sfc_main$o = {
|
|
|
25683
25687
|
},
|
|
25684
25688
|
validateForm(callback2) {
|
|
25685
25689
|
this.$refs["renderForm"].validate((valid) => {
|
|
25690
|
+
if (valid && !!this.formConfig && !!this.formConfig.onFormValidateSuccess) {
|
|
25691
|
+
this.emitFormValidateSuccess(this.formDataModel);
|
|
25692
|
+
}
|
|
25686
25693
|
callback2(valid);
|
|
25687
25694
|
});
|
|
25688
25695
|
},
|
|
25696
|
+
emitFormValidateSuccess(formData) {
|
|
25697
|
+
if (!this.formConfig || !this.formConfig.onFormValidateSuccess)
|
|
25698
|
+
return;
|
|
25699
|
+
try {
|
|
25700
|
+
let customFunc = new Function("formData", this.formConfig.onFormValidateSuccess);
|
|
25701
|
+
customFunc.call(this, formData);
|
|
25702
|
+
} catch (e) {
|
|
25703
|
+
console.error("onFormValidateSuccess", e);
|
|
25704
|
+
}
|
|
25705
|
+
},
|
|
25689
25706
|
validateFields() {
|
|
25690
25707
|
},
|
|
25691
25708
|
disableWidgets(widgetNames) {
|
|
@@ -25852,7 +25869,7 @@ function _sfc_render$o(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
25852
25869
|
_: 3
|
|
25853
25870
|
}, 8, ["label-position", "size", "class", "label-width", "model"]);
|
|
25854
25871
|
}
|
|
25855
|
-
var VFormRender = /* @__PURE__ */ _export_sfc$1(_sfc_main$o, [["render", _sfc_render$o], ["__scopeId", "data-v-
|
|
25872
|
+
var VFormRender = /* @__PURE__ */ _export_sfc$1(_sfc_main$o, [["render", _sfc_render$o], ["__scopeId", "data-v-1a5c4f64"]]);
|
|
25856
25873
|
function registerIcon(app) {
|
|
25857
25874
|
app.component("el-icon-edit", edit);
|
|
25858
25875
|
app.component("el-icon-minus", minus);
|
|
@@ -25867,13 +25884,13 @@ function registerIcon(app) {
|
|
|
25867
25884
|
if (typeof window !== "undefined") {
|
|
25868
25885
|
let loadSvg = function() {
|
|
25869
25886
|
var body = document.body;
|
|
25870
|
-
var svgDom = document.getElementById("
|
|
25887
|
+
var svgDom = document.getElementById("__svg__icons__dom__1773376422465__");
|
|
25871
25888
|
if (!svgDom) {
|
|
25872
25889
|
svgDom = document.createElementNS("http://www.w3.org/2000/svg", "svg");
|
|
25873
25890
|
svgDom.style.position = "absolute";
|
|
25874
25891
|
svgDom.style.width = "0";
|
|
25875
25892
|
svgDom.style.height = "0";
|
|
25876
|
-
svgDom.id = "
|
|
25893
|
+
svgDom.id = "__svg__icons__dom__1773376422465__";
|
|
25877
25894
|
svgDom.setAttribute("xmlns", "http://www.w3.org/2000/svg");
|
|
25878
25895
|
svgDom.setAttribute("xmlns:link", "http://www.w3.org/1999/xlink");
|
|
25879
25896
|
}
|
|
@@ -35267,6 +35284,11 @@ const _sfc_main$4 = {
|
|
|
35267
35284
|
},
|
|
35268
35285
|
customClass() {
|
|
35269
35286
|
return this.widget.options.customClass || "";
|
|
35287
|
+
},
|
|
35288
|
+
tableMaxHeight() {
|
|
35289
|
+
var _a, _b;
|
|
35290
|
+
const v = (_b = (_a = this.widget) == null ? void 0 : _a.options) == null ? void 0 : _b.maxHeight;
|
|
35291
|
+
return v !== void 0 && v !== null && v !== "" ? v : void 0;
|
|
35270
35292
|
}
|
|
35271
35293
|
},
|
|
35272
35294
|
created() {
|
|
@@ -35374,7 +35396,7 @@ function _sfc_render$4(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
35374
35396
|
border: $props.widget.options.border,
|
|
35375
35397
|
stripe: $props.widget.options.stripe,
|
|
35376
35398
|
size: $props.widget.options.size,
|
|
35377
|
-
"max-height": $
|
|
35399
|
+
"max-height": $options.tableMaxHeight,
|
|
35378
35400
|
style: { "width": "100%" }
|
|
35379
35401
|
}, {
|
|
35380
35402
|
empty: withCtx(() => [
|
|
@@ -35460,7 +35482,7 @@ function _sfc_render$4(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
35460
35482
|
_: 1
|
|
35461
35483
|
}, 8, ["designer", "widget", "parent-widget", "parent-list", "index-of-parent-list"]);
|
|
35462
35484
|
}
|
|
35463
|
-
var SubTableWidget = /* @__PURE__ */ _export_sfc$1(_sfc_main$4, [["render", _sfc_render$4], ["__scopeId", "data-v-
|
|
35485
|
+
var SubTableWidget = /* @__PURE__ */ _export_sfc$1(_sfc_main$4, [["render", _sfc_render$4], ["__scopeId", "data-v-03a3b831"]]);
|
|
35464
35486
|
var subTableItem_vue_vue_type_style_index_0_scoped_true_lang = "";
|
|
35465
35487
|
const _sfc_main$3 = {
|
|
35466
35488
|
name: "sub-table-item",
|
|
@@ -35500,6 +35522,11 @@ const _sfc_main$3 = {
|
|
|
35500
35522
|
"label-center-align": this.widget.options.labelAlign === "center",
|
|
35501
35523
|
"label-right-align": this.widget.options.labelAlign === "right"
|
|
35502
35524
|
};
|
|
35525
|
+
},
|
|
35526
|
+
tableMaxHeight() {
|
|
35527
|
+
var _a, _b;
|
|
35528
|
+
const v = (_b = (_a = this.widget) == null ? void 0 : _a.options) == null ? void 0 : _b.maxHeight;
|
|
35529
|
+
return v !== void 0 && v !== null && v !== "" ? v : void 0;
|
|
35503
35530
|
}
|
|
35504
35531
|
},
|
|
35505
35532
|
watch: {
|
|
@@ -35880,7 +35907,7 @@ function _sfc_render$3(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
35880
35907
|
border: $props.widget.options.border,
|
|
35881
35908
|
stripe: $props.widget.options.stripe,
|
|
35882
35909
|
size: $props.widget.options.size,
|
|
35883
|
-
"max-height": $
|
|
35910
|
+
"max-height": $options.tableMaxHeight,
|
|
35884
35911
|
style: { "width": "100%" },
|
|
35885
35912
|
disabled: $props.widget.options.disabled
|
|
35886
35913
|
}, {
|
|
@@ -36089,7 +36116,7 @@ function _sfc_render$3(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
36089
36116
|
_: 1
|
|
36090
36117
|
}, 8, ["widget"]);
|
|
36091
36118
|
}
|
|
36092
|
-
var SubTableItem = /* @__PURE__ */ _export_sfc$1(_sfc_main$3, [["render", _sfc_render$3], ["__scopeId", "data-v-
|
|
36119
|
+
var SubTableItem = /* @__PURE__ */ _export_sfc$1(_sfc_main$3, [["render", _sfc_render$3], ["__scopeId", "data-v-47eddd0f"]]);
|
|
36093
36120
|
var ace$2 = { exports: {} };
|
|
36094
36121
|
(function(module, exports) {
|
|
36095
36122
|
(function() {
|