form-custom-test 3.0.54 → 3.0.55
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 +84 -17
- package/dist/designer.style.css +1 -1
- package/dist/designer.umd.js +5 -5
- package/dist/render.es.js +20 -4
- package/dist/render.style.css +1 -1
- package/dist/render.umd.js +3 -3
- 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"));
|
|
@@ -25683,9 +25686,22 @@ const _sfc_main$o = {
|
|
|
25683
25686
|
},
|
|
25684
25687
|
validateForm(callback2) {
|
|
25685
25688
|
this.$refs["renderForm"].validate((valid) => {
|
|
25689
|
+
if (valid && !!this.formConfig && !!this.formConfig.onFormValidateSuccess) {
|
|
25690
|
+
this.emitFormValidateSuccess(this.formDataModel);
|
|
25691
|
+
}
|
|
25686
25692
|
callback2(valid);
|
|
25687
25693
|
});
|
|
25688
25694
|
},
|
|
25695
|
+
emitFormValidateSuccess(formData) {
|
|
25696
|
+
if (!this.formConfig || !this.formConfig.onFormValidateSuccess)
|
|
25697
|
+
return;
|
|
25698
|
+
try {
|
|
25699
|
+
let customFunc = new Function("formData", this.formConfig.onFormValidateSuccess);
|
|
25700
|
+
customFunc.call(this, formData);
|
|
25701
|
+
} catch (e) {
|
|
25702
|
+
console.error("onFormValidateSuccess", e);
|
|
25703
|
+
}
|
|
25704
|
+
},
|
|
25689
25705
|
validateFields() {
|
|
25690
25706
|
},
|
|
25691
25707
|
disableWidgets(widgetNames) {
|
|
@@ -25852,7 +25868,7 @@ function _sfc_render$o(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
25852
25868
|
_: 3
|
|
25853
25869
|
}, 8, ["label-position", "size", "class", "label-width", "model"]);
|
|
25854
25870
|
}
|
|
25855
|
-
var VFormRender = /* @__PURE__ */ _export_sfc$1(_sfc_main$o, [["render", _sfc_render$o], ["__scopeId", "data-v-
|
|
25871
|
+
var VFormRender = /* @__PURE__ */ _export_sfc$1(_sfc_main$o, [["render", _sfc_render$o], ["__scopeId", "data-v-7dcf7602"]]);
|
|
25856
25872
|
function registerIcon(app) {
|
|
25857
25873
|
app.component("el-icon-edit", edit);
|
|
25858
25874
|
app.component("el-icon-minus", minus);
|
|
@@ -25867,13 +25883,13 @@ function registerIcon(app) {
|
|
|
25867
25883
|
if (typeof window !== "undefined") {
|
|
25868
25884
|
let loadSvg = function() {
|
|
25869
25885
|
var body = document.body;
|
|
25870
|
-
var svgDom = document.getElementById("
|
|
25886
|
+
var svgDom = document.getElementById("__svg__icons__dom__1772680959469__");
|
|
25871
25887
|
if (!svgDom) {
|
|
25872
25888
|
svgDom = document.createElementNS("http://www.w3.org/2000/svg", "svg");
|
|
25873
25889
|
svgDom.style.position = "absolute";
|
|
25874
25890
|
svgDom.style.width = "0";
|
|
25875
25891
|
svgDom.style.height = "0";
|
|
25876
|
-
svgDom.id = "
|
|
25892
|
+
svgDom.id = "__svg__icons__dom__1772680959469__";
|
|
25877
25893
|
svgDom.setAttribute("xmlns", "http://www.w3.org/2000/svg");
|
|
25878
25894
|
svgDom.setAttribute("xmlns:link", "http://www.w3.org/1999/xlink");
|
|
25879
25895
|
}
|