form-custom-test 3.0.161 → 3.0.162
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 +52 -9
- package/dist/designer.style.css +1 -1
- package/dist/designer.umd.js +45 -45
- package/dist/render.es.js +52 -9
- package/dist/render.style.css +1 -1
- package/dist/render.umd.js +4 -4
- package/package.json +1 -1
package/dist/designer.es.js
CHANGED
|
@@ -10561,11 +10561,29 @@ var fieldMixin = {
|
|
|
10561
10561
|
this.fieldModel = this.field.options.defaultValue;
|
|
10562
10562
|
}
|
|
10563
10563
|
},
|
|
10564
|
+
clearFieldValidate() {
|
|
10565
|
+
var _a2;
|
|
10566
|
+
if (this.designState || !((_a2 = this.field) == null ? void 0 : _a2.formItemFlag)) {
|
|
10567
|
+
return;
|
|
10568
|
+
}
|
|
10569
|
+
const formRef = this.getFormRef();
|
|
10570
|
+
if (!formRef || typeof formRef.clearValidate !== "function") {
|
|
10571
|
+
return;
|
|
10572
|
+
}
|
|
10573
|
+
const prop = this.getPropName();
|
|
10574
|
+
if (!prop) {
|
|
10575
|
+
return;
|
|
10576
|
+
}
|
|
10577
|
+
this.$nextTick(() => {
|
|
10578
|
+
formRef.clearValidate(prop);
|
|
10579
|
+
});
|
|
10580
|
+
},
|
|
10564
10581
|
clearFieldRules() {
|
|
10565
10582
|
if (!this.field.formItemFlag) {
|
|
10566
10583
|
return;
|
|
10567
10584
|
}
|
|
10568
10585
|
this.rules.splice(0, this.rules.length);
|
|
10586
|
+
this.clearFieldValidate();
|
|
10569
10587
|
},
|
|
10570
10588
|
buildFieldRules() {
|
|
10571
10589
|
if (!this.field.formItemFlag) {
|
|
@@ -10573,6 +10591,7 @@ var fieldMixin = {
|
|
|
10573
10591
|
}
|
|
10574
10592
|
this.rules.splice(0, this.rules.length);
|
|
10575
10593
|
if (!!this.field.options.hidden && !this.designState) {
|
|
10594
|
+
this.clearFieldValidate();
|
|
10576
10595
|
return;
|
|
10577
10596
|
}
|
|
10578
10597
|
if (!!this.field.options.required) {
|
|
@@ -10612,6 +10631,7 @@ var fieldMixin = {
|
|
|
10612
10631
|
label: this.field.options.label
|
|
10613
10632
|
});
|
|
10614
10633
|
}
|
|
10634
|
+
this.clearFieldValidate();
|
|
10615
10635
|
},
|
|
10616
10636
|
disableChangeValidate() {
|
|
10617
10637
|
if (!this.rules) {
|
|
@@ -26270,6 +26290,8 @@ const _sfc_main$2Y = {
|
|
|
26270
26290
|
if (!this.widget)
|
|
26271
26291
|
return;
|
|
26272
26292
|
const hiddenFlag = !!hidden;
|
|
26293
|
+
const propsToClear = [];
|
|
26294
|
+
const formRef = this.getFormRef();
|
|
26273
26295
|
traverseFieldWidgetsOfContainer(this.widget, (fieldWidget2) => {
|
|
26274
26296
|
if (!fieldWidget2.formItemFlag || !fieldWidget2.options || !fieldWidget2.options.name) {
|
|
26275
26297
|
return;
|
|
@@ -26284,7 +26306,15 @@ const _sfc_main$2Y = {
|
|
|
26284
26306
|
} else if (typeof fieldRef.buildFieldRules === "function") {
|
|
26285
26307
|
fieldRef.buildFieldRules();
|
|
26286
26308
|
}
|
|
26309
|
+
if (typeof fieldRef.getPropName === "function") {
|
|
26310
|
+
propsToClear.push(fieldRef.getPropName());
|
|
26311
|
+
}
|
|
26287
26312
|
});
|
|
26313
|
+
if (propsToClear.length > 0 && formRef && typeof formRef.clearValidate === "function") {
|
|
26314
|
+
this.$nextTick(() => {
|
|
26315
|
+
formRef.clearValidate(propsToClear);
|
|
26316
|
+
});
|
|
26317
|
+
}
|
|
26288
26318
|
},
|
|
26289
26319
|
setHidden(flag) {
|
|
26290
26320
|
if (this.widget && this.widget.options) {
|
|
@@ -26391,7 +26421,7 @@ function _sfc_render$2Y(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
26391
26421
|
[vShow, $options.colVisible]
|
|
26392
26422
|
]) : createCommentVNode("", true);
|
|
26393
26423
|
}
|
|
26394
|
-
var GridColItem = /* @__PURE__ */ _export_sfc$1(_sfc_main$2Y, [["render", _sfc_render$2Y], ["__scopeId", "data-v-
|
|
26424
|
+
var GridColItem = /* @__PURE__ */ _export_sfc$1(_sfc_main$2Y, [["render", _sfc_render$2Y], ["__scopeId", "data-v-54aa37b2"]]);
|
|
26395
26425
|
var __glob_0_1$2 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
26396
26426
|
__proto__: null,
|
|
26397
26427
|
"default": GridColItem
|
|
@@ -27684,9 +27714,6 @@ const _sfc_main$2S = {
|
|
|
27684
27714
|
const fieldRef = this.getWidgetRef(fieldName);
|
|
27685
27715
|
if (fieldRef && typeof fieldRef.setRequired === "function") {
|
|
27686
27716
|
fieldRef.setRequired(flag);
|
|
27687
|
-
if (typeof fieldRef.buildFieldRules === "function") {
|
|
27688
|
-
fieldRef.buildFieldRules();
|
|
27689
|
-
}
|
|
27690
27717
|
return true;
|
|
27691
27718
|
}
|
|
27692
27719
|
const fieldSchema = this.findFieldByName(fieldName);
|
|
@@ -27695,6 +27722,8 @@ const _sfc_main$2S = {
|
|
|
27695
27722
|
const refAfter = this.getWidgetRef(fieldName);
|
|
27696
27723
|
if (refAfter && typeof refAfter.buildFieldRules === "function") {
|
|
27697
27724
|
refAfter.buildFieldRules();
|
|
27725
|
+
} else {
|
|
27726
|
+
this.$nextTick(() => this.clearValidate(fieldName));
|
|
27698
27727
|
}
|
|
27699
27728
|
return true;
|
|
27700
27729
|
}
|
|
@@ -27981,7 +28010,11 @@ const _sfc_main$2S = {
|
|
|
27981
28010
|
});
|
|
27982
28011
|
},
|
|
27983
28012
|
clearValidate(props) {
|
|
27984
|
-
this.$refs.renderForm
|
|
28013
|
+
const form = this.$refs.renderForm;
|
|
28014
|
+
if (!form || typeof form.clearValidate !== "function") {
|
|
28015
|
+
return;
|
|
28016
|
+
}
|
|
28017
|
+
form.clearValidate(props);
|
|
27985
28018
|
},
|
|
27986
28019
|
validateForm(callback2) {
|
|
27987
28020
|
this.$refs["renderForm"].validate((valid) => {
|
|
@@ -28106,6 +28139,7 @@ const _sfc_main$2S = {
|
|
|
28106
28139
|
if (!col)
|
|
28107
28140
|
return;
|
|
28108
28141
|
const hiddenFlag = !!hidden;
|
|
28142
|
+
const propsToClear = [];
|
|
28109
28143
|
traverseFieldWidgetsOfContainer(col, (fieldWidget2) => {
|
|
28110
28144
|
if (!fieldWidget2.formItemFlag || !fieldWidget2.options || !fieldWidget2.options.name) {
|
|
28111
28145
|
return;
|
|
@@ -28120,7 +28154,15 @@ const _sfc_main$2S = {
|
|
|
28120
28154
|
} else if (typeof fieldRef.buildFieldRules === "function") {
|
|
28121
28155
|
fieldRef.buildFieldRules();
|
|
28122
28156
|
}
|
|
28157
|
+
if (typeof fieldRef.getPropName === "function") {
|
|
28158
|
+
propsToClear.push(fieldRef.getPropName());
|
|
28159
|
+
}
|
|
28123
28160
|
});
|
|
28161
|
+
if (propsToClear.length > 0) {
|
|
28162
|
+
this.$nextTick(() => {
|
|
28163
|
+
this.clearValidate(propsToClear);
|
|
28164
|
+
});
|
|
28165
|
+
}
|
|
28124
28166
|
},
|
|
28125
28167
|
setColHidden(colName, hidden) {
|
|
28126
28168
|
if (Array.isArray(colName)) {
|
|
@@ -28197,7 +28239,7 @@ function _sfc_render$2S(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
28197
28239
|
_: 3
|
|
28198
28240
|
}, 8, ["label-position", "size", "class", "label-width", "model"]);
|
|
28199
28241
|
}
|
|
28200
|
-
var VFormRender = /* @__PURE__ */ _export_sfc$1(_sfc_main$2S, [["render", _sfc_render$2S], ["__scopeId", "data-v-
|
|
28242
|
+
var VFormRender = /* @__PURE__ */ _export_sfc$1(_sfc_main$2S, [["render", _sfc_render$2S], ["__scopeId", "data-v-6ba86904"]]);
|
|
28201
28243
|
var ace$2 = { exports: {} };
|
|
28202
28244
|
(function(module, exports) {
|
|
28203
28245
|
(function() {
|
|
@@ -68763,13 +68805,13 @@ function registerIcon(app) {
|
|
|
68763
68805
|
if (typeof window !== "undefined") {
|
|
68764
68806
|
let loadSvg = function() {
|
|
68765
68807
|
var body = document.body;
|
|
68766
|
-
var svgDom = document.getElementById("
|
|
68808
|
+
var svgDom = document.getElementById("__svg__icons__dom__1779273892216__");
|
|
68767
68809
|
if (!svgDom) {
|
|
68768
68810
|
svgDom = document.createElementNS("http://www.w3.org/2000/svg", "svg");
|
|
68769
68811
|
svgDom.style.position = "absolute";
|
|
68770
68812
|
svgDom.style.width = "0";
|
|
68771
68813
|
svgDom.style.height = "0";
|
|
68772
|
-
svgDom.id = "
|
|
68814
|
+
svgDom.id = "__svg__icons__dom__1779273892216__";
|
|
68773
68815
|
svgDom.setAttribute("xmlns", "http://www.w3.org/2000/svg");
|
|
68774
68816
|
svgDom.setAttribute("xmlns:link", "http://www.w3.org/1999/xlink");
|
|
68775
68817
|
}
|
|
@@ -78983,6 +79025,7 @@ const _sfc_main$6 = {
|
|
|
78983
79025
|
const tableRef = this.$refs.tableRef;
|
|
78984
79026
|
const selection = tableRef && typeof tableRef.getSelectionRows === "function" ? tableRef.getSelectionRows() : [];
|
|
78985
79027
|
if (!selection || selection.length === 0) {
|
|
79028
|
+
this.$message.error(`\u8BF7\u81F3\u5C11\u9009\u62E9\u4E00\u4E2A\u8D44\u4EA7`);
|
|
78986
79029
|
return;
|
|
78987
79030
|
}
|
|
78988
79031
|
const arr = [...this.selectedRows, ...selection].reduce((acc, item) => {
|
|
@@ -79367,7 +79410,7 @@ function _sfc_render$6(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
79367
79410
|
_: 1
|
|
79368
79411
|
}, 8, ["modelValue", "onClose"]);
|
|
79369
79412
|
}
|
|
79370
|
-
var AssetDialog = /* @__PURE__ */ _export_sfc$1(_sfc_main$6, [["render", _sfc_render$6], ["__scopeId", "data-v-
|
|
79413
|
+
var AssetDialog = /* @__PURE__ */ _export_sfc$1(_sfc_main$6, [["render", _sfc_render$6], ["__scopeId", "data-v-4c34c6a0"]]);
|
|
79371
79414
|
var index_vue_vue_type_style_index_0_lang$1 = "";
|
|
79372
79415
|
const _sfc_main$5 = {
|
|
79373
79416
|
name: "asset-select-widget",
|