form-custom-test 3.0.215 → 3.0.216

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/render.es.js CHANGED
@@ -9050,6 +9050,9 @@ var fieldMixin = {
9050
9050
  if (!foundRef && (!this.subFormItemFlag || this.designState)) {
9051
9051
  foundRef = this.refList[widgetName];
9052
9052
  }
9053
+ if (!foundRef) {
9054
+ foundRef = this.refList[widgetName];
9055
+ }
9053
9056
  if (!foundRef && !!showError) {
9054
9057
  this.$message.error(this.i18nt("render.hint.refNotFound") + widgetName);
9055
9058
  }
@@ -9372,7 +9375,10 @@ const _sfc_main$1e = {
9372
9375
  },
9373
9376
  rules: Array
9374
9377
  },
9375
- inject: ["getFormConfig"],
9378
+ inject: {
9379
+ getFormConfig: { from: "getFormConfig" },
9380
+ getCustomSubFormFieldLabelHidden: { default: null }
9381
+ },
9376
9382
  computed: {
9377
9383
  formConfig() {
9378
9384
  return this.getFormConfig();
@@ -9381,13 +9387,13 @@ const _sfc_main$1e = {
9381
9387
  return !!this.designer && this.field.id === this.designer.selectedId;
9382
9388
  },
9383
9389
  label() {
9384
- if (!!this.field.options.labelHidden) {
9390
+ if (!!this.field.options.labelHidden || this.isParentSubFormLabelHidden) {
9385
9391
  return "";
9386
9392
  }
9387
9393
  return this.field.options.label;
9388
9394
  },
9389
9395
  labelWidth() {
9390
- if (!!this.field.options.labelHidden) {
9396
+ if (!!this.field.options.labelHidden || this.isParentSubFormLabelHidden) {
9391
9397
  return 0;
9392
9398
  }
9393
9399
  if (!!this.field.options.labelWidth) {
@@ -9417,6 +9423,12 @@ const _sfc_main$1e = {
9417
9423
  },
9418
9424
  subFormItemFlag() {
9419
9425
  return !!this.parentWidget ? this.parentWidget.type === "sub-form" || this.parentWidget.type === "custom-sub-form" : false;
9426
+ },
9427
+ isParentSubFormLabelHidden() {
9428
+ if (typeof this.getCustomSubFormFieldLabelHidden === "function") {
9429
+ return !!this.getCustomSubFormFieldLabelHidden();
9430
+ }
9431
+ return false;
9420
9432
  }
9421
9433
  },
9422
9434
  created() {
@@ -9608,7 +9620,7 @@ function _sfc_render$1e(_ctx, _cache, $props, $setup, $data, $options) {
9608
9620
  ], 64)) : createCommentVNode("", true)
9609
9621
  ], 2);
9610
9622
  }
9611
- var FormItemWrapper = /* @__PURE__ */ _export_sfc$1(_sfc_main$1e, [["render", _sfc_render$1e], ["__scopeId", "data-v-a42827ee"]]);
9623
+ var FormItemWrapper = /* @__PURE__ */ _export_sfc$1(_sfc_main$1e, [["render", _sfc_render$1e], ["__scopeId", "data-v-3cbbbdb2"]]);
9612
9624
  var __glob_0_8 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
9613
9625
  __proto__: null,
9614
9626
  "default": FormItemWrapper
@@ -26591,13 +26603,13 @@ function registerIcon(app) {
26591
26603
  if (typeof window !== "undefined") {
26592
26604
  let loadSvg = function() {
26593
26605
  var body = document.body;
26594
- var svgDom = document.getElementById("__svg__icons__dom__1782180953383__");
26606
+ var svgDom = document.getElementById("__svg__icons__dom__1782204519073__");
26595
26607
  if (!svgDom) {
26596
26608
  svgDom = document.createElementNS("http://www.w3.org/2000/svg", "svg");
26597
26609
  svgDom.style.position = "absolute";
26598
26610
  svgDom.style.width = "0";
26599
26611
  svgDom.style.height = "0";
26600
- svgDom.id = "__svg__icons__dom__1782180953383__";
26612
+ svgDom.id = "__svg__icons__dom__1782204519073__";
26601
26613
  svgDom.setAttribute("xmlns", "http://www.w3.org/2000/svg");
26602
26614
  svgDom.setAttribute("xmlns:link", "http://www.w3.org/1999/xlink");
26603
26615
  }
@@ -34683,6 +34695,15 @@ const _sfc_main$m = {
34683
34695
  return this.widget.options.customClass || "";
34684
34696
  }
34685
34697
  },
34698
+ provide() {
34699
+ const vm = this;
34700
+ return {
34701
+ getCustomSubFormFieldLabelHidden() {
34702
+ var _a, _b;
34703
+ return !!((_b = (_a = vm.widget) == null ? void 0 : _a.options) == null ? void 0 : _b.labelHidden);
34704
+ }
34705
+ };
34706
+ },
34686
34707
  created() {
34687
34708
  this.initRefList();
34688
34709
  },
@@ -34703,7 +34724,10 @@ const _sfc_main$m = {
34703
34724
  }
34704
34725
  };
34705
34726
  const _hoisted_1$j = { class: "sub-form-header" };
34706
- const _hoisted_2$e = { class: "sub-form-label" };
34727
+ const _hoisted_2$e = {
34728
+ key: 0,
34729
+ class: "sub-form-label"
34730
+ };
34707
34731
  const _hoisted_3$b = { class: "group-header" };
34708
34732
  const _hoisted_4$9 = { class: "group-title" };
34709
34733
  const _hoisted_5$7 = {
@@ -34740,7 +34764,7 @@ function _sfc_render$m(_ctx, _cache, $props, $setup, $data, $options) {
34740
34764
  onClick: _cache[1] || (_cache[1] = withModifiers(($event) => _ctx.selectWidget($props.widget), ["stop"]))
34741
34765
  }, [
34742
34766
  createElementVNode("div", _hoisted_1$j, [
34743
- createElementVNode("span", _hoisted_2$e, toDisplayString($props.widget.options.label || "\u81EA\u5B9A\u4E49\u5B50\u8868\u5355"), 1)
34767
+ !$props.widget.options.labelHidden ? (openBlock(), createElementBlock("span", _hoisted_2$e, toDisplayString($props.widget.options.label || "\u81EA\u5B9A\u4E49\u5B50\u8868\u5355"), 1)) : createCommentVNode("", true)
34744
34768
  ]),
34745
34769
  (openBlock(true), createElementBlock(Fragment, null, renderList($data.previewRows, (row, rowIdx) => {
34746
34770
  return openBlock(), createElementBlock("div", {
@@ -34828,7 +34852,7 @@ function _sfc_render$m(_ctx, _cache, $props, $setup, $data, $options) {
34828
34852
  _: 1
34829
34853
  }, 8, ["designer", "widget", "parent-widget", "parent-list", "index-of-parent-list"]);
34830
34854
  }
34831
- var CustomSubFormWidget = /* @__PURE__ */ _export_sfc$1(_sfc_main$m, [["render", _sfc_render$m], ["__scopeId", "data-v-787fff1a"]]);
34855
+ var CustomSubFormWidget = /* @__PURE__ */ _export_sfc$1(_sfc_main$m, [["render", _sfc_render$m], ["__scopeId", "data-v-0d784fb7"]]);
34832
34856
  var customSubFormItem_vue_vue_type_style_index_0_scoped_true_lang = "";
34833
34857
  const _sfc_main$l = {
34834
34858
  name: "custom-sub-form-item",
@@ -34843,6 +34867,15 @@ const _sfc_main$l = {
34843
34867
  widget: Object
34844
34868
  },
34845
34869
  inject: ["refList", "sfRefList", "globalModel"],
34870
+ provide() {
34871
+ const vm = this;
34872
+ return {
34873
+ getCustomSubFormFieldLabelHidden() {
34874
+ var _a, _b;
34875
+ return !!((_b = (_a = vm.widget) == null ? void 0 : _a.options) == null ? void 0 : _b.labelHidden);
34876
+ }
34877
+ };
34878
+ },
34846
34879
  data() {
34847
34880
  return {
34848
34881
  rowIdData: [],
@@ -35197,7 +35230,10 @@ const _sfc_main$l = {
35197
35230
  }
35198
35231
  }
35199
35232
  };
35200
- const _hoisted_1$i = { class: "sub-form-header" };
35233
+ const _hoisted_1$i = {
35234
+ key: 0,
35235
+ class: "sub-form-header"
35236
+ };
35201
35237
  const _hoisted_2$d = { class: "sub-form-label" };
35202
35238
  const _hoisted_3$a = { class: "group-header" };
35203
35239
  const _hoisted_4$8 = { class: "group-title" };
@@ -35205,29 +35241,25 @@ const _hoisted_5$6 = {
35205
35241
  key: 0,
35206
35242
  class: "row-number-span"
35207
35243
  };
35208
- const _hoisted_6$6 = {
35209
- key: 1,
35210
- class: "row-number-span"
35211
- };
35212
- const _hoisted_7$5 = { class: "group-actions" };
35213
- const _hoisted_8$3 = { class: "group-content" };
35214
- const _hoisted_9$2 = {
35244
+ const _hoisted_6$6 = { class: "group-actions" };
35245
+ const _hoisted_7$5 = { class: "group-content" };
35246
+ const _hoisted_8$3 = {
35215
35247
  key: 1,
35216
35248
  class: "field-loading",
35217
35249
  style: { "color": "#909399", "font-size": "12px", "padding": "8px" }
35218
35250
  };
35219
- const _hoisted_10$1 = {
35251
+ const _hoisted_9$2 = {
35220
35252
  key: 1,
35221
35253
  class: "empty-hint"
35222
35254
  };
35223
- const _hoisted_11 = { key: 0 };
35224
- const _hoisted_12 = { key: 1 };
35225
- const _hoisted_13 = {
35226
- key: 0,
35255
+ const _hoisted_10$1 = { key: 0 };
35256
+ const _hoisted_11 = { key: 1 };
35257
+ const _hoisted_12 = {
35258
+ key: 1,
35227
35259
  class: "empty-hint"
35228
35260
  };
35229
- const _hoisted_14 = {
35230
- key: 1,
35261
+ const _hoisted_13 = {
35262
+ key: 2,
35231
35263
  class: "empty-hint"
35232
35264
  };
35233
35265
  function _sfc_render$l(_ctx, _cache, $props, $setup, $data, $options) {
@@ -35240,9 +35272,9 @@ function _sfc_render$l(_ctx, _cache, $props, $setup, $data, $options) {
35240
35272
  key: $props.widget.id,
35241
35273
  class: normalizeClass(["custom-sub-form-container", $options.customClass])
35242
35274
  }, [
35243
- createElementVNode("div", _hoisted_1$i, [
35275
+ !$props.widget.options.labelHidden ? (openBlock(), createElementBlock("div", _hoisted_1$i, [
35244
35276
  createElementVNode("span", _hoisted_2$d, toDisplayString($props.widget.options.label || "\u81EA\u5B9A\u4E49\u5B50\u8868\u5355"), 1)
35245
- ]),
35277
+ ])) : createCommentVNode("", true),
35246
35278
  (openBlock(true), createElementBlock(Fragment, null, renderList($data.rowIdData, (subFormRowId, sfrIdx) => {
35247
35279
  return openBlock(), createElementBlock("div", {
35248
35280
  class: "form-group-row",
@@ -35250,9 +35282,9 @@ function _sfc_render$l(_ctx, _cache, $props, $setup, $data, $options) {
35250
35282
  }, [
35251
35283
  createElementVNode("div", _hoisted_3$a, [
35252
35284
  createElementVNode("div", _hoisted_4$8, [
35253
- $props.widget.options.showRowNumber ? (openBlock(), createElementBlock("span", _hoisted_5$6, toDisplayString($props.widget.options.label || "\u81EA\u5B9A\u4E49\u5B50\u8868\u5355") + " " + toDisplayString(sfrIdx + 1), 1)) : (openBlock(), createElementBlock("span", _hoisted_6$6, "\u8868\u5355\u7EC4"))
35285
+ $props.widget.options.showRowNumber && !$props.widget.options.labelHidden ? (openBlock(), createElementBlock("span", _hoisted_5$6, toDisplayString($props.widget.options.label || "\u81EA\u5B9A\u4E49\u5B50\u8868\u5355") + " " + toDisplayString(sfrIdx + 1), 1)) : createCommentVNode("", true)
35254
35286
  ]),
35255
- createElementVNode("div", _hoisted_7$5, [
35287
+ createElementVNode("div", _hoisted_6$6, [
35256
35288
  sfrIdx > 0 && !$props.widget.options.disabled ? (openBlock(), createBlock(_component_el_button, {
35257
35289
  key: 0,
35258
35290
  size: "small",
@@ -35268,7 +35300,7 @@ function _sfc_render$l(_ctx, _cache, $props, $setup, $data, $options) {
35268
35300
  }, 8, ["onClick"])) : createCommentVNode("", true)
35269
35301
  ])
35270
35302
  ]),
35271
- createElementVNode("div", _hoisted_8$3, [
35303
+ createElementVNode("div", _hoisted_7$5, [
35272
35304
  $props.widget && $props.widget.widgetList && $props.widget.widgetList.length > 0 ? (openBlock(true), createElementBlock(Fragment, { key: 0 }, renderList($props.widget.widgetList, (subWidget, swIdx) => {
35273
35305
  return openBlock(), createElementBlock(Fragment, {
35274
35306
  key: subWidget ? subWidget.id + "gc" + subFormRowId + "-" + swIdx : "gc" + subFormRowId + "-" + swIdx
@@ -35295,18 +35327,18 @@ function _sfc_render$l(_ctx, _cache, $props, $setup, $data, $options) {
35295
35327
  "sub-form-row-index": sfrIdx,
35296
35328
  "sub-form-col-index": swIdx,
35297
35329
  "sub-form-disabled": $props.widget.options.disabled
35298
- }, null, 8, ["field", "parent-list", "index-of-parent-list", "parent-widget", "sub-form-row-id", "sub-form-row-index", "sub-form-col-index", "sub-form-disabled"])) : (openBlock(), createElementBlock("div", _hoisted_9$2, " \u5B57\u6BB5\u52A0\u8F7D\u4E2D... "))
35330
+ }, null, 8, ["field", "parent-list", "index-of-parent-list", "parent-widget", "sub-form-row-id", "sub-form-row-index", "sub-form-col-index", "sub-form-disabled"])) : (openBlock(), createElementBlock("div", _hoisted_8$3, " \u5B57\u6BB5\u52A0\u8F7D\u4E2D... "))
35299
35331
  ], 64)) : createCommentVNode("", true)
35300
35332
  ], 64);
35301
- }), 128)) : (openBlock(), createElementBlock("div", _hoisted_10$1, [
35302
- !$props.widget ? (openBlock(), createElementBlock("div", _hoisted_11, "\u7EC4\u4EF6\u672A\u521D\u59CB\u5316")) : !$props.widget.widgetList || $props.widget.widgetList.length === 0 ? (openBlock(), createElementBlock("div", _hoisted_12, " \u8BF7\u5148\u5728\u8BBE\u8BA1\u5668\u4E2D\u62D6\u62FD\u7EC4\u4EF6\u5230\u5B50\u8868\u5355\u4E2D ")) : createCommentVNode("", true)
35333
+ }), 128)) : (openBlock(), createElementBlock("div", _hoisted_9$2, [
35334
+ !$props.widget ? (openBlock(), createElementBlock("div", _hoisted_10$1, "\u7EC4\u4EF6\u672A\u521D\u59CB\u5316")) : !$props.widget.widgetList || $props.widget.widgetList.length === 0 ? (openBlock(), createElementBlock("div", _hoisted_11, " \u8BF7\u5148\u5728\u8BBE\u8BA1\u5668\u4E2D\u62D6\u62FD\u7EC4\u4EF6\u5230\u5B50\u8868\u5355\u4E2D ")) : createCommentVNode("", true)
35303
35335
  ]))
35304
35336
  ])
35305
35337
  ]);
35306
35338
  }), 128)),
35307
- !$props.widget.widgetList || $props.widget.widgetList.length === 0 ? (openBlock(), createElementBlock("div", _hoisted_13, " \u8BF7\u5148\u5728\u8BBE\u8BA1\u5668\u4E2D\u62D6\u62FD\u7EC4\u4EF6\u5230\u5B50\u8868\u5355\u4E2D ")) : $data.rowIdData.length === 0 ? (openBlock(), createElementBlock("div", _hoisted_14, ' \u70B9\u51FB"\u6DFB\u52A0"\u6309\u94AE\u6DFB\u52A0\u6570\u636E\u884C ')) : createCommentVNode("", true),
35339
+ !$props.widget.widgetList || $props.widget.widgetList.length === 0 ? (openBlock(), createElementBlock("div", _hoisted_12, " \u8BF7\u5148\u5728\u8BBE\u8BA1\u5668\u4E2D\u62D6\u62FD\u7EC4\u4EF6\u5230\u5B50\u8868\u5355\u4E2D ")) : $data.rowIdData.length === 0 ? (openBlock(), createElementBlock("div", _hoisted_13, ' \u70B9\u51FB"\u6DFB\u52A0"\u6309\u94AE\u6DFB\u52A0\u6570\u636E\u884C ')) : createCommentVNode("", true),
35308
35340
  !$props.widget.options.disabled ? (openBlock(), createBlock(_component_el_button, {
35309
- key: 2,
35341
+ key: 3,
35310
35342
  disabled: $data.actionDisabled,
35311
35343
  type: "primary",
35312
35344
  plain: "",
@@ -35326,7 +35358,7 @@ function _sfc_render$l(_ctx, _cache, $props, $setup, $data, $options) {
35326
35358
  _: 1
35327
35359
  }, 8, ["widget"]);
35328
35360
  }
35329
- var CustomSubFormItem = /* @__PURE__ */ _export_sfc$1(_sfc_main$l, [["render", _sfc_render$l], ["__scopeId", "data-v-6bd07e4e"]]);
35361
+ var CustomSubFormItem = /* @__PURE__ */ _export_sfc$1(_sfc_main$l, [["render", _sfc_render$l], ["__scopeId", "data-v-09af068c"]]);
35330
35362
  var customTableCellWidget_vue_vue_type_style_index_0_scoped_true_lang = "";
35331
35363
  const _sfc_main$k = {
35332
35364
  name: "custom-table-cell-widget",