form-custom-test 3.0.164 → 3.0.166
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 +742 -521
- package/dist/designer.style.css +2 -2
- package/dist/designer.umd.js +54 -54
- package/dist/render.es.js +132 -21
- package/dist/render.style.css +2 -2
- package/dist/render.umd.js +41 -41
- package/package.json +1 -1
package/dist/render.es.js
CHANGED
|
@@ -1432,6 +1432,12 @@ var enLocale = {
|
|
|
1432
1432
|
multipleLimit: "Multiple Limit",
|
|
1433
1433
|
checkStrictly: "Any Level Selectable",
|
|
1434
1434
|
showAllLevels: "Show All Levels",
|
|
1435
|
+
cascaderLabelKey: "Label Field",
|
|
1436
|
+
cascaderLabelKeyPlaceholder: "Default: label",
|
|
1437
|
+
cascaderValueKey: "Value Field",
|
|
1438
|
+
cascaderValueKeyPlaceholder: "Default: value",
|
|
1439
|
+
cascaderChildrenKey: "Children Field",
|
|
1440
|
+
cascaderChildrenKeyPlaceholder: "Default: children",
|
|
1435
1441
|
showCheckbox: "Show Checkbox",
|
|
1436
1442
|
contentPosition: "Content Position",
|
|
1437
1443
|
plain: "Plain",
|
|
@@ -1761,6 +1767,12 @@ var zhLocale = {
|
|
|
1761
1767
|
multipleLimit: "\u591A\u9009\u6570\u91CF\u9650\u5236",
|
|
1762
1768
|
checkStrictly: "\u4EFB\u610F\u7EA7\u8282\u70B9\u53EF\u9009",
|
|
1763
1769
|
showAllLevels: "\u663E\u793A\u5B8C\u6574\u8DEF\u5F84",
|
|
1770
|
+
cascaderLabelKey: "\u663E\u793A\u5B57\u6BB5\u540D",
|
|
1771
|
+
cascaderLabelKeyPlaceholder: "\u9ED8\u8BA4 label",
|
|
1772
|
+
cascaderValueKey: "\u503C\u5B57\u6BB5\u540D",
|
|
1773
|
+
cascaderValueKeyPlaceholder: "\u9ED8\u8BA4 value",
|
|
1774
|
+
cascaderChildrenKey: "\u5B50\u8282\u70B9\u5B57\u6BB5\u540D",
|
|
1775
|
+
cascaderChildrenKeyPlaceholder: "\u9ED8\u8BA4 children",
|
|
1764
1776
|
showCheckbox: "\u663E\u793A\u590D\u9009\u6846",
|
|
1765
1777
|
contentPosition: "\u6587\u5B57\u4F4D\u7F6E",
|
|
1766
1778
|
plain: "\u6734\u7D20\u6309\u94AE",
|
|
@@ -9613,6 +9625,17 @@ const _sfc_main$18 = {
|
|
|
9613
9625
|
computed: {
|
|
9614
9626
|
showFullPath() {
|
|
9615
9627
|
return this.field.options.showAllLevels === void 0 || !!this.field.options.showAllLevels;
|
|
9628
|
+
},
|
|
9629
|
+
cascaderProps() {
|
|
9630
|
+
const opts = this.field.options || {};
|
|
9631
|
+
return {
|
|
9632
|
+
checkStrictly: !!opts.checkStrictly,
|
|
9633
|
+
multiple: !!opts.multiple,
|
|
9634
|
+
expandTrigger: "click",
|
|
9635
|
+
label: opts.labelKey || "label",
|
|
9636
|
+
value: opts.valueKey || "value",
|
|
9637
|
+
children: opts.childrenKey || "children"
|
|
9638
|
+
};
|
|
9616
9639
|
}
|
|
9617
9640
|
},
|
|
9618
9641
|
beforeCreate() {
|
|
@@ -9662,7 +9685,7 @@ function _sfc_render$18(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
9662
9685
|
filterable: $props.field.options.filterable,
|
|
9663
9686
|
placeholder: $props.field.options.placeholder || _ctx.i18nt("render.hint.selectPlaceholder"),
|
|
9664
9687
|
"show-all-levels": $options.showFullPath,
|
|
9665
|
-
props:
|
|
9688
|
+
props: $options.cascaderProps,
|
|
9666
9689
|
onFocus: _ctx.handleFocusCustomEvent,
|
|
9667
9690
|
onBlur: _ctx.handleBlurCustomEvent,
|
|
9668
9691
|
onChange: _ctx.handleChangeEvent
|
|
@@ -9672,7 +9695,7 @@ function _sfc_render$18(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
9672
9695
|
_: 1
|
|
9673
9696
|
}, 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"]);
|
|
9674
9697
|
}
|
|
9675
|
-
var cascaderWidget = /* @__PURE__ */ _export_sfc$1(_sfc_main$18, [["render", _sfc_render$18], ["__scopeId", "data-v-
|
|
9698
|
+
var cascaderWidget = /* @__PURE__ */ _export_sfc$1(_sfc_main$18, [["render", _sfc_render$18], ["__scopeId", "data-v-a81e00a2"]]);
|
|
9676
9699
|
var __glob_0_1$2 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
9677
9700
|
__proto__: null,
|
|
9678
9701
|
"default": cascaderWidget
|
|
@@ -26441,13 +26464,13 @@ function registerIcon(app) {
|
|
|
26441
26464
|
if (typeof window !== "undefined") {
|
|
26442
26465
|
let loadSvg = function() {
|
|
26443
26466
|
var body = document.body;
|
|
26444
|
-
var svgDom = document.getElementById("
|
|
26467
|
+
var svgDom = document.getElementById("__svg__icons__dom__1779690464308__");
|
|
26445
26468
|
if (!svgDom) {
|
|
26446
26469
|
svgDom = document.createElementNS("http://www.w3.org/2000/svg", "svg");
|
|
26447
26470
|
svgDom.style.position = "absolute";
|
|
26448
26471
|
svgDom.style.width = "0";
|
|
26449
26472
|
svgDom.style.height = "0";
|
|
26450
|
-
svgDom.id = "
|
|
26473
|
+
svgDom.id = "__svg__icons__dom__1779690464308__";
|
|
26451
26474
|
svgDom.setAttribute("xmlns", "http://www.w3.org/2000/svg");
|
|
26452
26475
|
svgDom.setAttribute("xmlns:link", "http://www.w3.org/1999/xlink");
|
|
26453
26476
|
}
|
|
@@ -36302,14 +36325,36 @@ const _sfc_main$a = {
|
|
|
36302
36325
|
const rules = {};
|
|
36303
36326
|
if (this.widget.options.columns && this.widget.options.columns.length > 0) {
|
|
36304
36327
|
this.widget.options.columns.forEach((col) => {
|
|
36328
|
+
if (!col.prop)
|
|
36329
|
+
return;
|
|
36330
|
+
const colRules = [];
|
|
36305
36331
|
if (col.required) {
|
|
36306
|
-
|
|
36307
|
-
|
|
36308
|
-
|
|
36309
|
-
|
|
36310
|
-
|
|
36311
|
-
|
|
36312
|
-
|
|
36332
|
+
colRules.push({
|
|
36333
|
+
required: true,
|
|
36334
|
+
message: col.requiredHint || `\u8BF7\u8F93\u5165${col.label}`,
|
|
36335
|
+
trigger: "blur"
|
|
36336
|
+
});
|
|
36337
|
+
}
|
|
36338
|
+
if (col.validation) {
|
|
36339
|
+
if (FormValidators[col.validation]) {
|
|
36340
|
+
colRules.push({
|
|
36341
|
+
validator: FormValidators[col.validation],
|
|
36342
|
+
trigger: ["blur", "change"],
|
|
36343
|
+
label: col.label,
|
|
36344
|
+
errorMsg: col.validationHint
|
|
36345
|
+
});
|
|
36346
|
+
} else {
|
|
36347
|
+
colRules.push({
|
|
36348
|
+
validator: FormValidators.regExp,
|
|
36349
|
+
trigger: ["blur", "change"],
|
|
36350
|
+
regExp: col.validation,
|
|
36351
|
+
label: col.label,
|
|
36352
|
+
errorMsg: col.validationHint
|
|
36353
|
+
});
|
|
36354
|
+
}
|
|
36355
|
+
}
|
|
36356
|
+
if (colRules.length > 0) {
|
|
36357
|
+
rules[col.prop] = colRules;
|
|
36313
36358
|
}
|
|
36314
36359
|
});
|
|
36315
36360
|
}
|
|
@@ -36765,7 +36810,7 @@ function _sfc_render$a(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
36765
36810
|
_: 1
|
|
36766
36811
|
}, 8, ["widget"]);
|
|
36767
36812
|
}
|
|
36768
|
-
var SubTableItem = /* @__PURE__ */ _export_sfc$1(_sfc_main$a, [["render", _sfc_render$a], ["__scopeId", "data-v-
|
|
36813
|
+
var SubTableItem = /* @__PURE__ */ _export_sfc$1(_sfc_main$a, [["render", _sfc_render$a], ["__scopeId", "data-v-607d749e"]]);
|
|
36769
36814
|
var ace$2 = { exports: {} };
|
|
36770
36815
|
(function(module, exports) {
|
|
36771
36816
|
(function() {
|
|
@@ -61331,7 +61376,26 @@ const _sfc_main$8 = {
|
|
|
61331
61376
|
currentEventName: "",
|
|
61332
61377
|
currentColumn: null,
|
|
61333
61378
|
columnEventHandlerCode: "",
|
|
61334
|
-
eventHeader: ""
|
|
61379
|
+
eventHeader: "",
|
|
61380
|
+
fieldValidators: [
|
|
61381
|
+
{ value: "number", label: this.i18nt("designer.hint.numberValidator") },
|
|
61382
|
+
{ value: "letter", label: this.i18nt("designer.hint.letterValidator") },
|
|
61383
|
+
{ value: "letterAndNumber", label: this.i18nt("designer.hint.letterAndNumberValidator") },
|
|
61384
|
+
{ value: "mobilePhone", label: this.i18nt("designer.hint.mobilePhoneValidator") },
|
|
61385
|
+
{ value: "email", label: this.i18nt("designer.hint.emailValidator") },
|
|
61386
|
+
{ value: "url", label: this.i18nt("designer.hint.urlValidator") },
|
|
61387
|
+
{ value: "noChinese", label: this.i18nt("designer.hint.noChineseValidator") },
|
|
61388
|
+
{ value: "chinese", label: this.i18nt("designer.hint.chineseValidator") },
|
|
61389
|
+
{ value: "maxLen12Decimals6", label: this.i18nt("designer.hint.maxLen12Decimals6Validator") },
|
|
61390
|
+
{ value: "isPositiveIntegerLength", label: this.i18nt("designer.hint.isPositiveIntegerLengthValidator") },
|
|
61391
|
+
{ value: "isPositiveIntegerZero", label: this.i18nt("designer.hint.isPositiveIntegerZeroValidator") },
|
|
61392
|
+
{ value: "maxLen10Decimals2", label: this.i18nt("designer.hint.maxLen10Decimals2Validator") },
|
|
61393
|
+
{ value: "maxLen12Decimals2", label: this.i18nt("designer.hint.maxLen12Decimals2Validator") },
|
|
61394
|
+
{ value: "latitude", label: this.i18nt("designer.hint.latitude") },
|
|
61395
|
+
{ value: "longitude", label: this.i18nt("designer.hint.longitude") },
|
|
61396
|
+
{ value: "sixFigures", label: this.i18nt("designer.hint.sixFigures") },
|
|
61397
|
+
{ value: "percentage", label: this.i18nt("designer.hint.percentage") }
|
|
61398
|
+
]
|
|
61335
61399
|
};
|
|
61336
61400
|
},
|
|
61337
61401
|
created() {
|
|
@@ -61352,6 +61416,8 @@ const _sfc_main$8 = {
|
|
|
61352
61416
|
minWidth: "",
|
|
61353
61417
|
placeholder: "",
|
|
61354
61418
|
required: false,
|
|
61419
|
+
validation: "",
|
|
61420
|
+
validationHint: "",
|
|
61355
61421
|
defaultValue: ""
|
|
61356
61422
|
};
|
|
61357
61423
|
this.optionModel.columns.push(newColumn);
|
|
@@ -61364,6 +61430,12 @@ const _sfc_main$8 = {
|
|
|
61364
61430
|
handleColumnChange() {
|
|
61365
61431
|
this.designer.saveCurrentHistoryStep();
|
|
61366
61432
|
},
|
|
61433
|
+
handleValidationChange(col) {
|
|
61434
|
+
if (!col.validation) {
|
|
61435
|
+
col.validationHint = "";
|
|
61436
|
+
}
|
|
61437
|
+
this.handleColumnChange();
|
|
61438
|
+
},
|
|
61367
61439
|
handleSelectOptionsChange(col, optionsText) {
|
|
61368
61440
|
try {
|
|
61369
61441
|
if (optionsText && optionsText.trim()) {
|
|
@@ -61682,8 +61754,47 @@ function _sfc_render$8(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
61682
61754
|
]),
|
|
61683
61755
|
_: 2
|
|
61684
61756
|
}, 1024),
|
|
61685
|
-
|
|
61757
|
+
createVNode(_component_el_form_item, { label: "\u6821\u9A8C\u89C4\u5219" }, {
|
|
61758
|
+
default: withCtx(() => [
|
|
61759
|
+
createVNode(_component_el_select, {
|
|
61760
|
+
modelValue: col.validation,
|
|
61761
|
+
"onUpdate:modelValue": ($event) => col.validation = $event,
|
|
61762
|
+
placeholder: "\u8BF7\u9009\u62E9\u6821\u9A8C\u89C4\u5219",
|
|
61763
|
+
filterable: "",
|
|
61764
|
+
clearable: "",
|
|
61765
|
+
style: { "width": "100%" },
|
|
61766
|
+
onChange: ($event) => $options.handleValidationChange(col)
|
|
61767
|
+
}, {
|
|
61768
|
+
default: withCtx(() => [
|
|
61769
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList($data.fieldValidators, (fv, fvIdx) => {
|
|
61770
|
+
return openBlock(), createBlock(_component_el_option, {
|
|
61771
|
+
key: fvIdx,
|
|
61772
|
+
label: fv.label,
|
|
61773
|
+
value: fv.value
|
|
61774
|
+
}, null, 8, ["label", "value"]);
|
|
61775
|
+
}), 128))
|
|
61776
|
+
]),
|
|
61777
|
+
_: 1
|
|
61778
|
+
}, 8, ["modelValue", "onUpdate:modelValue", "onChange"])
|
|
61779
|
+
]),
|
|
61780
|
+
_: 2
|
|
61781
|
+
}, 1024),
|
|
61782
|
+
col.validation ? (openBlock(), createBlock(_component_el_form_item, {
|
|
61686
61783
|
key: 1,
|
|
61784
|
+
label: "\u6821\u9A8C\u5931\u8D25\u63D0\u793A"
|
|
61785
|
+
}, {
|
|
61786
|
+
default: withCtx(() => [
|
|
61787
|
+
createVNode(_component_el_input, {
|
|
61788
|
+
modelValue: col.validationHint,
|
|
61789
|
+
"onUpdate:modelValue": ($event) => col.validationHint = $event,
|
|
61790
|
+
placeholder: "\u53EF\u9009\uFF0C\u4E0D\u586B\u5219\u4F7F\u7528\u9ED8\u8BA4\u63D0\u793A",
|
|
61791
|
+
onInput: $options.handleColumnChange
|
|
61792
|
+
}, null, 8, ["modelValue", "onUpdate:modelValue", "onInput"])
|
|
61793
|
+
]),
|
|
61794
|
+
_: 2
|
|
61795
|
+
}, 1024)) : createCommentVNode("", true),
|
|
61796
|
+
col.type === "select" ? (openBlock(), createBlock(_component_el_form_item, {
|
|
61797
|
+
key: 2,
|
|
61687
61798
|
label: "\u9009\u9879\u6570\u636E"
|
|
61688
61799
|
}, {
|
|
61689
61800
|
default: withCtx(() => [
|
|
@@ -61700,7 +61811,7 @@ function _sfc_render$8(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
61700
61811
|
_: 2
|
|
61701
61812
|
}, 1024)) : createCommentVNode("", true),
|
|
61702
61813
|
col.type === "select" ? (openBlock(), createBlock(_component_el_form_item, {
|
|
61703
|
-
key:
|
|
61814
|
+
key: 3,
|
|
61704
61815
|
label: "onMounted\u4E8B\u4EF6"
|
|
61705
61816
|
}, {
|
|
61706
61817
|
default: withCtx(() => [
|
|
@@ -61728,7 +61839,7 @@ function _sfc_render$8(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
61728
61839
|
_: 2
|
|
61729
61840
|
}, 1024)) : createCommentVNode("", true),
|
|
61730
61841
|
col.type === "select" ? (openBlock(), createBlock(_component_el_form_item, {
|
|
61731
|
-
key:
|
|
61842
|
+
key: 4,
|
|
61732
61843
|
label: "\u4F9D\u8D56\u5217\uFF08\u8054\u52A8\uFF09"
|
|
61733
61844
|
}, {
|
|
61734
61845
|
default: withCtx(() => [
|
|
@@ -61761,7 +61872,7 @@ function _sfc_render$8(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
61761
61872
|
_: 2
|
|
61762
61873
|
}, 1024)) : createCommentVNode("", true),
|
|
61763
61874
|
col.type === "select" && col.dependOn ? (openBlock(), createBlock(_component_el_form_item, {
|
|
61764
|
-
key:
|
|
61875
|
+
key: 5,
|
|
61765
61876
|
label: "\u8054\u52A8\u5904\u7406\u51FD\u6570"
|
|
61766
61877
|
}, {
|
|
61767
61878
|
default: withCtx(() => [
|
|
@@ -61845,7 +61956,7 @@ function _sfc_render$8(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
61845
61956
|
_: 2
|
|
61846
61957
|
}, 1024),
|
|
61847
61958
|
col.type === "textarea" ? (openBlock(), createBlock(_component_el_form_item, {
|
|
61848
|
-
key:
|
|
61959
|
+
key: 6,
|
|
61849
61960
|
label: "\u884C\u6570"
|
|
61850
61961
|
}, {
|
|
61851
61962
|
default: withCtx(() => [
|
|
@@ -61926,7 +62037,7 @@ function _sfc_render$8(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
61926
62037
|
}, 8, ["modelValue", "title"])
|
|
61927
62038
|
], 64);
|
|
61928
62039
|
}
|
|
61929
|
-
var SubTableColumnsEditor = /* @__PURE__ */ _export_sfc$1(_sfc_main$8, [["render", _sfc_render$8], ["__scopeId", "data-v-
|
|
62040
|
+
var SubTableColumnsEditor = /* @__PURE__ */ _export_sfc$1(_sfc_main$8, [["render", _sfc_render$8], ["__scopeId", "data-v-66b4c9ce"]]);
|
|
61930
62041
|
const _sfc_main$7 = {
|
|
61931
62042
|
name: "current-user-widget",
|
|
61932
62043
|
componentName: "FieldWidget",
|
|
@@ -63345,7 +63456,7 @@ function _sfc_render$3(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
63345
63456
|
}),
|
|
63346
63457
|
createVNode(_component_el_table_column, {
|
|
63347
63458
|
prop: "originalValue",
|
|
63348
|
-
label: "\u539F\u503C"
|
|
63459
|
+
label: "\u539F\u503C\uFF08\u4E07\u5143\uFF09"
|
|
63349
63460
|
}, {
|
|
63350
63461
|
default: withCtx(({ row }) => [
|
|
63351
63462
|
createTextVNode(toDisplayString(row.originalValue), 1)
|
|
@@ -63354,7 +63465,7 @@ function _sfc_render$3(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
63354
63465
|
}),
|
|
63355
63466
|
createVNode(_component_el_table_column, {
|
|
63356
63467
|
prop: "netValue",
|
|
63357
|
-
label: "\u51C0\u503C"
|
|
63468
|
+
label: "\u51C0\u503C\uFF08\u4E07\u5143\uFF09"
|
|
63358
63469
|
}, {
|
|
63359
63470
|
default: withCtx(({ row }) => [
|
|
63360
63471
|
createTextVNode(toDisplayString(row.netValue), 1)
|