form-custom-test 3.0.165 → 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.
@@ -68896,13 +68896,13 @@ function registerIcon(app) {
68896
68896
  if (typeof window !== "undefined") {
68897
68897
  let loadSvg = function() {
68898
68898
  var body = document.body;
68899
- var svgDom = document.getElementById("__svg__icons__dom__1779671607460__");
68899
+ var svgDom = document.getElementById("__svg__icons__dom__1779690455146__");
68900
68900
  if (!svgDom) {
68901
68901
  svgDom = document.createElementNS("http://www.w3.org/2000/svg", "svg");
68902
68902
  svgDom.style.position = "absolute";
68903
68903
  svgDom.style.width = "0";
68904
68904
  svgDom.style.height = "0";
68905
- svgDom.id = "__svg__icons__dom__1779671607460__";
68905
+ svgDom.id = "__svg__icons__dom__1779690455146__";
68906
68906
  svgDom.setAttribute("xmlns", "http://www.w3.org/2000/svg");
68907
68907
  svgDom.setAttribute("xmlns:link", "http://www.w3.org/1999/xlink");
68908
68908
  }
@@ -77757,14 +77757,36 @@ const _sfc_main$9 = {
77757
77757
  const rules = {};
77758
77758
  if (this.widget.options.columns && this.widget.options.columns.length > 0) {
77759
77759
  this.widget.options.columns.forEach((col) => {
77760
+ if (!col.prop)
77761
+ return;
77762
+ const colRules = [];
77760
77763
  if (col.required) {
77761
- rules[col.prop] = [
77762
- {
77763
- required: true,
77764
- message: `\u8BF7\u8F93\u5165${col.label}`,
77765
- trigger: "blur"
77766
- }
77767
- ];
77764
+ colRules.push({
77765
+ required: true,
77766
+ message: col.requiredHint || `\u8BF7\u8F93\u5165${col.label}`,
77767
+ trigger: "blur"
77768
+ });
77769
+ }
77770
+ if (col.validation) {
77771
+ if (FormValidators[col.validation]) {
77772
+ colRules.push({
77773
+ validator: FormValidators[col.validation],
77774
+ trigger: ["blur", "change"],
77775
+ label: col.label,
77776
+ errorMsg: col.validationHint
77777
+ });
77778
+ } else {
77779
+ colRules.push({
77780
+ validator: FormValidators.regExp,
77781
+ trigger: ["blur", "change"],
77782
+ regExp: col.validation,
77783
+ label: col.label,
77784
+ errorMsg: col.validationHint
77785
+ });
77786
+ }
77787
+ }
77788
+ if (colRules.length > 0) {
77789
+ rules[col.prop] = colRules;
77768
77790
  }
77769
77791
  });
77770
77792
  }
@@ -78220,7 +78242,7 @@ function _sfc_render$9(_ctx, _cache, $props, $setup, $data, $options) {
78220
78242
  _: 1
78221
78243
  }, 8, ["widget"]);
78222
78244
  }
78223
- var SubTableItem = /* @__PURE__ */ _export_sfc$1(_sfc_main$9, [["render", _sfc_render$9], ["__scopeId", "data-v-758a2ba6"]]);
78245
+ var SubTableItem = /* @__PURE__ */ _export_sfc$1(_sfc_main$9, [["render", _sfc_render$9], ["__scopeId", "data-v-607d749e"]]);
78224
78246
  var subTableColumnsEditor_vue_vue_type_style_index_0_scoped_true_lang = "";
78225
78247
  const _sfc_main$8 = {
78226
78248
  name: "sub-table-columns-editor",
@@ -78239,7 +78261,26 @@ const _sfc_main$8 = {
78239
78261
  currentEventName: "",
78240
78262
  currentColumn: null,
78241
78263
  columnEventHandlerCode: "",
78242
- eventHeader: ""
78264
+ eventHeader: "",
78265
+ fieldValidators: [
78266
+ { value: "number", label: this.i18nt("designer.hint.numberValidator") },
78267
+ { value: "letter", label: this.i18nt("designer.hint.letterValidator") },
78268
+ { value: "letterAndNumber", label: this.i18nt("designer.hint.letterAndNumberValidator") },
78269
+ { value: "mobilePhone", label: this.i18nt("designer.hint.mobilePhoneValidator") },
78270
+ { value: "email", label: this.i18nt("designer.hint.emailValidator") },
78271
+ { value: "url", label: this.i18nt("designer.hint.urlValidator") },
78272
+ { value: "noChinese", label: this.i18nt("designer.hint.noChineseValidator") },
78273
+ { value: "chinese", label: this.i18nt("designer.hint.chineseValidator") },
78274
+ { value: "maxLen12Decimals6", label: this.i18nt("designer.hint.maxLen12Decimals6Validator") },
78275
+ { value: "isPositiveIntegerLength", label: this.i18nt("designer.hint.isPositiveIntegerLengthValidator") },
78276
+ { value: "isPositiveIntegerZero", label: this.i18nt("designer.hint.isPositiveIntegerZeroValidator") },
78277
+ { value: "maxLen10Decimals2", label: this.i18nt("designer.hint.maxLen10Decimals2Validator") },
78278
+ { value: "maxLen12Decimals2", label: this.i18nt("designer.hint.maxLen12Decimals2Validator") },
78279
+ { value: "latitude", label: this.i18nt("designer.hint.latitude") },
78280
+ { value: "longitude", label: this.i18nt("designer.hint.longitude") },
78281
+ { value: "sixFigures", label: this.i18nt("designer.hint.sixFigures") },
78282
+ { value: "percentage", label: this.i18nt("designer.hint.percentage") }
78283
+ ]
78243
78284
  };
78244
78285
  },
78245
78286
  created() {
@@ -78260,6 +78301,8 @@ const _sfc_main$8 = {
78260
78301
  minWidth: "",
78261
78302
  placeholder: "",
78262
78303
  required: false,
78304
+ validation: "",
78305
+ validationHint: "",
78263
78306
  defaultValue: ""
78264
78307
  };
78265
78308
  this.optionModel.columns.push(newColumn);
@@ -78272,6 +78315,12 @@ const _sfc_main$8 = {
78272
78315
  handleColumnChange() {
78273
78316
  this.designer.saveCurrentHistoryStep();
78274
78317
  },
78318
+ handleValidationChange(col) {
78319
+ if (!col.validation) {
78320
+ col.validationHint = "";
78321
+ }
78322
+ this.handleColumnChange();
78323
+ },
78275
78324
  handleSelectOptionsChange(col, optionsText) {
78276
78325
  try {
78277
78326
  if (optionsText && optionsText.trim()) {
@@ -78590,8 +78639,47 @@ function _sfc_render$8(_ctx, _cache, $props, $setup, $data, $options) {
78590
78639
  ]),
78591
78640
  _: 2
78592
78641
  }, 1024),
78593
- col.type === "select" ? (openBlock(), createBlock(_component_el_form_item, {
78642
+ createVNode(_component_el_form_item, { label: "\u6821\u9A8C\u89C4\u5219" }, {
78643
+ default: withCtx(() => [
78644
+ createVNode(_component_el_select, {
78645
+ modelValue: col.validation,
78646
+ "onUpdate:modelValue": ($event) => col.validation = $event,
78647
+ placeholder: "\u8BF7\u9009\u62E9\u6821\u9A8C\u89C4\u5219",
78648
+ filterable: "",
78649
+ clearable: "",
78650
+ style: { "width": "100%" },
78651
+ onChange: ($event) => $options.handleValidationChange(col)
78652
+ }, {
78653
+ default: withCtx(() => [
78654
+ (openBlock(true), createElementBlock(Fragment, null, renderList($data.fieldValidators, (fv, fvIdx) => {
78655
+ return openBlock(), createBlock(_component_el_option, {
78656
+ key: fvIdx,
78657
+ label: fv.label,
78658
+ value: fv.value
78659
+ }, null, 8, ["label", "value"]);
78660
+ }), 128))
78661
+ ]),
78662
+ _: 1
78663
+ }, 8, ["modelValue", "onUpdate:modelValue", "onChange"])
78664
+ ]),
78665
+ _: 2
78666
+ }, 1024),
78667
+ col.validation ? (openBlock(), createBlock(_component_el_form_item, {
78594
78668
  key: 1,
78669
+ label: "\u6821\u9A8C\u5931\u8D25\u63D0\u793A"
78670
+ }, {
78671
+ default: withCtx(() => [
78672
+ createVNode(_component_el_input, {
78673
+ modelValue: col.validationHint,
78674
+ "onUpdate:modelValue": ($event) => col.validationHint = $event,
78675
+ placeholder: "\u53EF\u9009\uFF0C\u4E0D\u586B\u5219\u4F7F\u7528\u9ED8\u8BA4\u63D0\u793A",
78676
+ onInput: $options.handleColumnChange
78677
+ }, null, 8, ["modelValue", "onUpdate:modelValue", "onInput"])
78678
+ ]),
78679
+ _: 2
78680
+ }, 1024)) : createCommentVNode("", true),
78681
+ col.type === "select" ? (openBlock(), createBlock(_component_el_form_item, {
78682
+ key: 2,
78595
78683
  label: "\u9009\u9879\u6570\u636E"
78596
78684
  }, {
78597
78685
  default: withCtx(() => [
@@ -78608,7 +78696,7 @@ function _sfc_render$8(_ctx, _cache, $props, $setup, $data, $options) {
78608
78696
  _: 2
78609
78697
  }, 1024)) : createCommentVNode("", true),
78610
78698
  col.type === "select" ? (openBlock(), createBlock(_component_el_form_item, {
78611
- key: 2,
78699
+ key: 3,
78612
78700
  label: "onMounted\u4E8B\u4EF6"
78613
78701
  }, {
78614
78702
  default: withCtx(() => [
@@ -78636,7 +78724,7 @@ function _sfc_render$8(_ctx, _cache, $props, $setup, $data, $options) {
78636
78724
  _: 2
78637
78725
  }, 1024)) : createCommentVNode("", true),
78638
78726
  col.type === "select" ? (openBlock(), createBlock(_component_el_form_item, {
78639
- key: 3,
78727
+ key: 4,
78640
78728
  label: "\u4F9D\u8D56\u5217\uFF08\u8054\u52A8\uFF09"
78641
78729
  }, {
78642
78730
  default: withCtx(() => [
@@ -78669,7 +78757,7 @@ function _sfc_render$8(_ctx, _cache, $props, $setup, $data, $options) {
78669
78757
  _: 2
78670
78758
  }, 1024)) : createCommentVNode("", true),
78671
78759
  col.type === "select" && col.dependOn ? (openBlock(), createBlock(_component_el_form_item, {
78672
- key: 4,
78760
+ key: 5,
78673
78761
  label: "\u8054\u52A8\u5904\u7406\u51FD\u6570"
78674
78762
  }, {
78675
78763
  default: withCtx(() => [
@@ -78753,7 +78841,7 @@ function _sfc_render$8(_ctx, _cache, $props, $setup, $data, $options) {
78753
78841
  _: 2
78754
78842
  }, 1024),
78755
78843
  col.type === "textarea" ? (openBlock(), createBlock(_component_el_form_item, {
78756
- key: 5,
78844
+ key: 6,
78757
78845
  label: "\u884C\u6570"
78758
78846
  }, {
78759
78847
  default: withCtx(() => [
@@ -78834,7 +78922,7 @@ function _sfc_render$8(_ctx, _cache, $props, $setup, $data, $options) {
78834
78922
  }, 8, ["modelValue", "title"])
78835
78923
  ], 64);
78836
78924
  }
78837
- var SubTableColumnsEditor = /* @__PURE__ */ _export_sfc$1(_sfc_main$8, [["render", _sfc_render$8], ["__scopeId", "data-v-514d67ae"]]);
78925
+ var SubTableColumnsEditor = /* @__PURE__ */ _export_sfc$1(_sfc_main$8, [["render", _sfc_render$8], ["__scopeId", "data-v-66b4c9ce"]]);
78838
78926
  const _sfc_main$7 = {
78839
78927
  name: "current-user-widget",
78840
78928
  componentName: "FieldWidget",
@@ -80253,7 +80341,7 @@ function _sfc_render$3(_ctx, _cache, $props, $setup, $data, $options) {
80253
80341
  }),
80254
80342
  createVNode(_component_el_table_column, {
80255
80343
  prop: "originalValue",
80256
- label: "\u539F\u503C"
80344
+ label: "\u539F\u503C\uFF08\u4E07\u5143\uFF09"
80257
80345
  }, {
80258
80346
  default: withCtx(({ row }) => [
80259
80347
  createTextVNode(toDisplayString(row.originalValue), 1)
@@ -80262,7 +80350,7 @@ function _sfc_render$3(_ctx, _cache, $props, $setup, $data, $options) {
80262
80350
  }),
80263
80351
  createVNode(_component_el_table_column, {
80264
80352
  prop: "netValue",
80265
- label: "\u51C0\u503C"
80353
+ label: "\u51C0\u503C\uFF08\u4E07\u5143\uFF09"
80266
80354
  }, {
80267
80355
  default: withCtx(({ row }) => [
80268
80356
  createTextVNode(toDisplayString(row.netValue), 1)