form-custom-test 3.0.195 → 3.0.197
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 +82 -15
- package/dist/designer.style.css +1 -1
- package/dist/designer.umd.js +2 -2
- package/dist/render.es.js +82 -15
- package/dist/render.style.css +1 -1
- package/dist/render.umd.js +53 -53
- package/package.json +1 -1
package/dist/render.es.js
CHANGED
|
@@ -26517,13 +26517,13 @@ function registerIcon(app) {
|
|
|
26517
26517
|
if (typeof window !== "undefined") {
|
|
26518
26518
|
let loadSvg = function() {
|
|
26519
26519
|
var body = document.body;
|
|
26520
|
-
var svgDom = document.getElementById("
|
|
26520
|
+
var svgDom = document.getElementById("__svg__icons__dom__1780637050551__");
|
|
26521
26521
|
if (!svgDom) {
|
|
26522
26522
|
svgDom = document.createElementNS("http://www.w3.org/2000/svg", "svg");
|
|
26523
26523
|
svgDom.style.position = "absolute";
|
|
26524
26524
|
svgDom.style.width = "0";
|
|
26525
26525
|
svgDom.style.height = "0";
|
|
26526
|
-
svgDom.id = "
|
|
26526
|
+
svgDom.id = "__svg__icons__dom__1780637050551__";
|
|
26527
26527
|
svgDom.setAttribute("xmlns", "http://www.w3.org/2000/svg");
|
|
26528
26528
|
svgDom.setAttribute("xmlns:link", "http://www.w3.org/1999/xlink");
|
|
26529
26529
|
}
|
|
@@ -36410,6 +36410,13 @@ const _sfc_main$d = {
|
|
|
36410
36410
|
});
|
|
36411
36411
|
}
|
|
36412
36412
|
}
|
|
36413
|
+
if (this.isTextColumn(col) && col.maxLength) {
|
|
36414
|
+
colRules.push({
|
|
36415
|
+
max: col.maxLength,
|
|
36416
|
+
message: `${col.label}\u957F\u5EA6\u4E0D\u80FD\u8D85\u8FC7${col.maxLength}\u4E2A\u5B57\u7B26`,
|
|
36417
|
+
trigger: ["blur", "change"]
|
|
36418
|
+
});
|
|
36419
|
+
}
|
|
36413
36420
|
if (colRules.length > 0) {
|
|
36414
36421
|
rules[col.prop] = colRules;
|
|
36415
36422
|
}
|
|
@@ -36490,6 +36497,12 @@ const _sfc_main$d = {
|
|
|
36490
36497
|
this.dialogFormData._columnOptions = {};
|
|
36491
36498
|
}
|
|
36492
36499
|
},
|
|
36500
|
+
isTextColumn(col) {
|
|
36501
|
+
return !col.type || col.type === "input" || col.type === "textarea";
|
|
36502
|
+
},
|
|
36503
|
+
getColMaxLength(col) {
|
|
36504
|
+
return col.maxLength && col.maxLength > 0 ? col.maxLength : void 0;
|
|
36505
|
+
},
|
|
36493
36506
|
getValue() {
|
|
36494
36507
|
return this.tableData;
|
|
36495
36508
|
},
|
|
@@ -36782,15 +36795,19 @@ function _sfc_render$d(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
36782
36795
|
"onUpdate:modelValue": ($event) => $data.dialogFormData[col.prop] = $event,
|
|
36783
36796
|
placeholder: col.placeholder || `\u8BF7\u8F93\u5165${col.label}`,
|
|
36784
36797
|
disabled: $props.widget.options.disabled,
|
|
36785
|
-
|
|
36786
|
-
|
|
36798
|
+
maxlength: $options.getColMaxLength(col),
|
|
36799
|
+
"show-word-limit": !!col.showWordLimit && !!col.maxLength,
|
|
36800
|
+
onChange: ($event) => $options.handleInputChange(col),
|
|
36801
|
+
clearable: ""
|
|
36802
|
+
}, null, 8, ["modelValue", "onUpdate:modelValue", "placeholder", "disabled", "maxlength", "show-word-limit", "onChange"])) : col.type === "number" ? (openBlock(), createBlock(_component_el_input_number, {
|
|
36787
36803
|
key: 1,
|
|
36788
36804
|
modelValue: $data.dialogFormData[col.prop],
|
|
36789
36805
|
"onUpdate:modelValue": ($event) => $data.dialogFormData[col.prop] = $event,
|
|
36790
36806
|
placeholder: col.placeholder || `\u8BF7\u8F93\u5165${col.label}`,
|
|
36791
36807
|
disabled: $props.widget.options.disabled,
|
|
36792
36808
|
style: { "width": "100%" },
|
|
36793
|
-
onChange: ($event) => $options.handleInputChange(col)
|
|
36809
|
+
onChange: ($event) => $options.handleInputChange(col),
|
|
36810
|
+
clearable: ""
|
|
36794
36811
|
}, null, 8, ["modelValue", "onUpdate:modelValue", "placeholder", "disabled", "onChange"])) : col.type === "date" ? (openBlock(), createBlock(_component_el_date_picker, {
|
|
36795
36812
|
key: 2,
|
|
36796
36813
|
modelValue: $data.dialogFormData[col.prop],
|
|
@@ -36800,7 +36817,8 @@ function _sfc_render$d(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
36800
36817
|
disabled: $props.widget.options.disabled,
|
|
36801
36818
|
style: { "width": "100%" },
|
|
36802
36819
|
"value-format": "YYYY-MM-DD",
|
|
36803
|
-
onChange: ($event) => $options.handleInputChange(col)
|
|
36820
|
+
onChange: ($event) => $options.handleInputChange(col),
|
|
36821
|
+
clearable: ""
|
|
36804
36822
|
}, null, 8, ["modelValue", "onUpdate:modelValue", "placeholder", "disabled", "onChange"])) : col.type === "datetime" ? (openBlock(), createBlock(_component_el_date_picker, {
|
|
36805
36823
|
key: 3,
|
|
36806
36824
|
modelValue: $data.dialogFormData[col.prop],
|
|
@@ -36808,6 +36826,7 @@ function _sfc_render$d(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
36808
36826
|
type: "datetime",
|
|
36809
36827
|
placeholder: col.placeholder || `\u8BF7\u9009\u62E9${col.label}`,
|
|
36810
36828
|
disabled: $props.widget.options.disabled,
|
|
36829
|
+
clearable: "",
|
|
36811
36830
|
style: { "width": "100%" },
|
|
36812
36831
|
"value-format": "YYYY-MM-DD HH:mm:ss"
|
|
36813
36832
|
}, null, 8, ["modelValue", "onUpdate:modelValue", "placeholder", "disabled"])) : col.type === "month" ? (openBlock(), createBlock(_component_el_date_picker, {
|
|
@@ -36819,12 +36838,14 @@ function _sfc_render$d(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
36819
36838
|
disabled: $props.widget.options.disabled,
|
|
36820
36839
|
style: { "width": "100%" },
|
|
36821
36840
|
"value-format": "YYYY-MM",
|
|
36841
|
+
clearable: "",
|
|
36822
36842
|
onChange: ($event) => $options.handleInputChange(col)
|
|
36823
36843
|
}, null, 8, ["modelValue", "onUpdate:modelValue", "placeholder", "disabled", "onChange"])) : col.type === "select" ? (openBlock(), createBlock(_component_el_select, {
|
|
36824
36844
|
modelValue: $data.dialogFormData[col.prop],
|
|
36825
36845
|
"onUpdate:modelValue": ($event) => $data.dialogFormData[col.prop] = $event,
|
|
36826
36846
|
placeholder: col.placeholder || `\u8BF7\u9009\u62E9${col.label}`,
|
|
36827
36847
|
disabled: $props.widget.options.disabled,
|
|
36848
|
+
clearable: "",
|
|
36828
36849
|
style: { "width": "100%" },
|
|
36829
36850
|
ref_for: true,
|
|
36830
36851
|
ref: (el) => $options.handleSelectMounted(el, col),
|
|
@@ -36848,8 +36869,11 @@ function _sfc_render$d(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
36848
36869
|
placeholder: col.placeholder || `\u8BF7\u8F93\u5165${col.label}`,
|
|
36849
36870
|
disabled: $props.widget.options.disabled,
|
|
36850
36871
|
rows: col.rows || 3,
|
|
36872
|
+
maxlength: $options.getColMaxLength(col),
|
|
36873
|
+
"show-word-limit": !!col.showWordLimit && !!col.maxLength,
|
|
36874
|
+
clearable: "",
|
|
36851
36875
|
onChange: ($event) => $options.handleInputChange(col)
|
|
36852
|
-
}, null, 8, ["modelValue", "onUpdate:modelValue", "placeholder", "disabled", "rows", "onChange"])) : createCommentVNode("", true)
|
|
36876
|
+
}, null, 8, ["modelValue", "onUpdate:modelValue", "placeholder", "disabled", "rows", "maxlength", "show-word-limit", "onChange"])) : createCommentVNode("", true)
|
|
36853
36877
|
]),
|
|
36854
36878
|
_: 2
|
|
36855
36879
|
}, 1032, ["label", "prop", "required"]);
|
|
@@ -36867,7 +36891,7 @@ function _sfc_render$d(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
36867
36891
|
_: 1
|
|
36868
36892
|
}, 8, ["widget"]);
|
|
36869
36893
|
}
|
|
36870
|
-
var SubTableItem = /* @__PURE__ */ _export_sfc$1(_sfc_main$d, [["render", _sfc_render$d], ["__scopeId", "data-v-
|
|
36894
|
+
var SubTableItem = /* @__PURE__ */ _export_sfc$1(_sfc_main$d, [["render", _sfc_render$d], ["__scopeId", "data-v-0b6beffd"]]);
|
|
36871
36895
|
var ace$2 = { exports: {} };
|
|
36872
36896
|
(function(module, exports) {
|
|
36873
36897
|
(function() {
|
|
@@ -61461,6 +61485,17 @@ const _sfc_main$b = {
|
|
|
61461
61485
|
}
|
|
61462
61486
|
},
|
|
61463
61487
|
methods: {
|
|
61488
|
+
isTextColumn(col) {
|
|
61489
|
+
return !col.type || col.type === "input" || col.type === "textarea";
|
|
61490
|
+
},
|
|
61491
|
+
handleMaxLengthInput(col, val) {
|
|
61492
|
+
if (!val || isNaN(val)) {
|
|
61493
|
+
col.maxLength = null;
|
|
61494
|
+
col.showWordLimit = false;
|
|
61495
|
+
} else {
|
|
61496
|
+
col.maxLength = Number(val);
|
|
61497
|
+
}
|
|
61498
|
+
},
|
|
61464
61499
|
addNewColumn() {
|
|
61465
61500
|
if (!this.optionModel.columns) {
|
|
61466
61501
|
this.optionModel.columns = [];
|
|
@@ -61472,6 +61507,8 @@ const _sfc_main$b = {
|
|
|
61472
61507
|
width: "",
|
|
61473
61508
|
minWidth: "",
|
|
61474
61509
|
placeholder: "",
|
|
61510
|
+
maxLength: null,
|
|
61511
|
+
showWordLimit: false,
|
|
61475
61512
|
required: false,
|
|
61476
61513
|
validation: "",
|
|
61477
61514
|
validationHint: "",
|
|
@@ -61801,6 +61838,36 @@ function _sfc_render$b(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
61801
61838
|
]),
|
|
61802
61839
|
_: 2
|
|
61803
61840
|
}, 1024),
|
|
61841
|
+
$options.isTextColumn(col) ? (openBlock(), createBlock(_component_el_form_item, {
|
|
61842
|
+
key: 1,
|
|
61843
|
+
label: _ctx.i18nt("designer.setting.maxLength")
|
|
61844
|
+
}, {
|
|
61845
|
+
default: withCtx(() => [
|
|
61846
|
+
createVNode(_component_el_input, {
|
|
61847
|
+
type: "number",
|
|
61848
|
+
class: "hide-spin-button",
|
|
61849
|
+
min: "1",
|
|
61850
|
+
"model-value": col.maxLength,
|
|
61851
|
+
placeholder: "\u4E0D\u9650",
|
|
61852
|
+
onInput: (val) => $options.handleMaxLengthInput(col, val),
|
|
61853
|
+
onChange: $options.handleColumnChange
|
|
61854
|
+
}, null, 8, ["model-value", "onInput", "onChange"])
|
|
61855
|
+
]),
|
|
61856
|
+
_: 2
|
|
61857
|
+
}, 1032, ["label"])) : createCommentVNode("", true),
|
|
61858
|
+
$options.isTextColumn(col) && col.maxLength ? (openBlock(), createBlock(_component_el_form_item, {
|
|
61859
|
+
key: 2,
|
|
61860
|
+
label: _ctx.i18nt("designer.setting.showWordLimit")
|
|
61861
|
+
}, {
|
|
61862
|
+
default: withCtx(() => [
|
|
61863
|
+
createVNode(_component_el_switch, {
|
|
61864
|
+
modelValue: col.showWordLimit,
|
|
61865
|
+
"onUpdate:modelValue": ($event) => col.showWordLimit = $event,
|
|
61866
|
+
onChange: $options.handleColumnChange
|
|
61867
|
+
}, null, 8, ["modelValue", "onUpdate:modelValue", "onChange"])
|
|
61868
|
+
]),
|
|
61869
|
+
_: 2
|
|
61870
|
+
}, 1032, ["label"])) : createCommentVNode("", true),
|
|
61804
61871
|
createVNode(_component_el_form_item, { label: "\u662F\u5426\u5FC5\u586B" }, {
|
|
61805
61872
|
default: withCtx(() => [
|
|
61806
61873
|
createVNode(_component_el_switch, {
|
|
@@ -61837,7 +61904,7 @@ function _sfc_render$b(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
61837
61904
|
_: 2
|
|
61838
61905
|
}, 1024),
|
|
61839
61906
|
col.validation ? (openBlock(), createBlock(_component_el_form_item, {
|
|
61840
|
-
key:
|
|
61907
|
+
key: 3,
|
|
61841
61908
|
label: "\u6821\u9A8C\u5931\u8D25\u63D0\u793A"
|
|
61842
61909
|
}, {
|
|
61843
61910
|
default: withCtx(() => [
|
|
@@ -61851,7 +61918,7 @@ function _sfc_render$b(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
61851
61918
|
_: 2
|
|
61852
61919
|
}, 1024)) : createCommentVNode("", true),
|
|
61853
61920
|
col.type === "select" ? (openBlock(), createBlock(_component_el_form_item, {
|
|
61854
|
-
key:
|
|
61921
|
+
key: 4,
|
|
61855
61922
|
label: "\u9009\u9879\u6570\u636E"
|
|
61856
61923
|
}, {
|
|
61857
61924
|
default: withCtx(() => [
|
|
@@ -61868,7 +61935,7 @@ function _sfc_render$b(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
61868
61935
|
_: 2
|
|
61869
61936
|
}, 1024)) : createCommentVNode("", true),
|
|
61870
61937
|
col.type === "select" ? (openBlock(), createBlock(_component_el_form_item, {
|
|
61871
|
-
key:
|
|
61938
|
+
key: 5,
|
|
61872
61939
|
label: "onMounted\u4E8B\u4EF6"
|
|
61873
61940
|
}, {
|
|
61874
61941
|
default: withCtx(() => [
|
|
@@ -61896,7 +61963,7 @@ function _sfc_render$b(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
61896
61963
|
_: 2
|
|
61897
61964
|
}, 1024)) : createCommentVNode("", true),
|
|
61898
61965
|
col.type === "select" ? (openBlock(), createBlock(_component_el_form_item, {
|
|
61899
|
-
key:
|
|
61966
|
+
key: 6,
|
|
61900
61967
|
label: "\u4F9D\u8D56\u5217\uFF08\u8054\u52A8\uFF09"
|
|
61901
61968
|
}, {
|
|
61902
61969
|
default: withCtx(() => [
|
|
@@ -61929,7 +61996,7 @@ function _sfc_render$b(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
61929
61996
|
_: 2
|
|
61930
61997
|
}, 1024)) : createCommentVNode("", true),
|
|
61931
61998
|
col.type === "select" && col.dependOn ? (openBlock(), createBlock(_component_el_form_item, {
|
|
61932
|
-
key:
|
|
61999
|
+
key: 7,
|
|
61933
62000
|
label: "\u8054\u52A8\u5904\u7406\u51FD\u6570"
|
|
61934
62001
|
}, {
|
|
61935
62002
|
default: withCtx(() => [
|
|
@@ -62013,7 +62080,7 @@ function _sfc_render$b(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
62013
62080
|
_: 2
|
|
62014
62081
|
}, 1024),
|
|
62015
62082
|
col.type === "textarea" ? (openBlock(), createBlock(_component_el_form_item, {
|
|
62016
|
-
key:
|
|
62083
|
+
key: 8,
|
|
62017
62084
|
label: "\u884C\u6570"
|
|
62018
62085
|
}, {
|
|
62019
62086
|
default: withCtx(() => [
|
|
@@ -62094,7 +62161,7 @@ function _sfc_render$b(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
62094
62161
|
}, 8, ["modelValue", "title"])
|
|
62095
62162
|
], 64);
|
|
62096
62163
|
}
|
|
62097
|
-
var SubTableColumnsEditor = /* @__PURE__ */ _export_sfc$1(_sfc_main$b, [["render", _sfc_render$b], ["__scopeId", "data-v-
|
|
62164
|
+
var SubTableColumnsEditor = /* @__PURE__ */ _export_sfc$1(_sfc_main$b, [["render", _sfc_render$b], ["__scopeId", "data-v-2401420e"]]);
|
|
62098
62165
|
const _sfc_main$a = {
|
|
62099
62166
|
name: "current-user-widget",
|
|
62100
62167
|
componentName: "FieldWidget",
|