form-custom-test 3.0.215 → 3.0.217

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__1782264812732__");
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__1782264812732__";
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
  }
@@ -32537,6 +32549,7 @@ service$1.interceptors.request.use((config) => {
32537
32549
  const accessToken = getToken();
32538
32550
  const company = sessionStorage.getItem("companyId");
32539
32551
  const post = sessionStorage.getItem("postId");
32552
+ console.log(accessToken, "accessToken");
32540
32553
  if (accessToken) {
32541
32554
  config.headers["Authorization"] = getToken();
32542
32555
  }
@@ -34683,6 +34696,15 @@ const _sfc_main$m = {
34683
34696
  return this.widget.options.customClass || "";
34684
34697
  }
34685
34698
  },
34699
+ provide() {
34700
+ const vm = this;
34701
+ return {
34702
+ getCustomSubFormFieldLabelHidden() {
34703
+ var _a, _b;
34704
+ return !!((_b = (_a = vm.widget) == null ? void 0 : _a.options) == null ? void 0 : _b.labelHidden);
34705
+ }
34706
+ };
34707
+ },
34686
34708
  created() {
34687
34709
  this.initRefList();
34688
34710
  },
@@ -34703,7 +34725,10 @@ const _sfc_main$m = {
34703
34725
  }
34704
34726
  };
34705
34727
  const _hoisted_1$j = { class: "sub-form-header" };
34706
- const _hoisted_2$e = { class: "sub-form-label" };
34728
+ const _hoisted_2$e = {
34729
+ key: 0,
34730
+ class: "sub-form-label"
34731
+ };
34707
34732
  const _hoisted_3$b = { class: "group-header" };
34708
34733
  const _hoisted_4$9 = { class: "group-title" };
34709
34734
  const _hoisted_5$7 = {
@@ -34740,7 +34765,7 @@ function _sfc_render$m(_ctx, _cache, $props, $setup, $data, $options) {
34740
34765
  onClick: _cache[1] || (_cache[1] = withModifiers(($event) => _ctx.selectWidget($props.widget), ["stop"]))
34741
34766
  }, [
34742
34767
  createElementVNode("div", _hoisted_1$j, [
34743
- createElementVNode("span", _hoisted_2$e, toDisplayString($props.widget.options.label || "\u81EA\u5B9A\u4E49\u5B50\u8868\u5355"), 1)
34768
+ !$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
34769
  ]),
34745
34770
  (openBlock(true), createElementBlock(Fragment, null, renderList($data.previewRows, (row, rowIdx) => {
34746
34771
  return openBlock(), createElementBlock("div", {
@@ -34828,7 +34853,7 @@ function _sfc_render$m(_ctx, _cache, $props, $setup, $data, $options) {
34828
34853
  _: 1
34829
34854
  }, 8, ["designer", "widget", "parent-widget", "parent-list", "index-of-parent-list"]);
34830
34855
  }
34831
- var CustomSubFormWidget = /* @__PURE__ */ _export_sfc$1(_sfc_main$m, [["render", _sfc_render$m], ["__scopeId", "data-v-787fff1a"]]);
34856
+ var CustomSubFormWidget = /* @__PURE__ */ _export_sfc$1(_sfc_main$m, [["render", _sfc_render$m], ["__scopeId", "data-v-0d784fb7"]]);
34832
34857
  var customSubFormItem_vue_vue_type_style_index_0_scoped_true_lang = "";
34833
34858
  const _sfc_main$l = {
34834
34859
  name: "custom-sub-form-item",
@@ -34843,6 +34868,15 @@ const _sfc_main$l = {
34843
34868
  widget: Object
34844
34869
  },
34845
34870
  inject: ["refList", "sfRefList", "globalModel"],
34871
+ provide() {
34872
+ const vm = this;
34873
+ return {
34874
+ getCustomSubFormFieldLabelHidden() {
34875
+ var _a, _b;
34876
+ return !!((_b = (_a = vm.widget) == null ? void 0 : _a.options) == null ? void 0 : _b.labelHidden);
34877
+ }
34878
+ };
34879
+ },
34846
34880
  data() {
34847
34881
  return {
34848
34882
  rowIdData: [],
@@ -35197,7 +35231,10 @@ const _sfc_main$l = {
35197
35231
  }
35198
35232
  }
35199
35233
  };
35200
- const _hoisted_1$i = { class: "sub-form-header" };
35234
+ const _hoisted_1$i = {
35235
+ key: 0,
35236
+ class: "sub-form-header"
35237
+ };
35201
35238
  const _hoisted_2$d = { class: "sub-form-label" };
35202
35239
  const _hoisted_3$a = { class: "group-header" };
35203
35240
  const _hoisted_4$8 = { class: "group-title" };
@@ -35205,29 +35242,25 @@ const _hoisted_5$6 = {
35205
35242
  key: 0,
35206
35243
  class: "row-number-span"
35207
35244
  };
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 = {
35245
+ const _hoisted_6$6 = { class: "group-actions" };
35246
+ const _hoisted_7$5 = { class: "group-content" };
35247
+ const _hoisted_8$3 = {
35215
35248
  key: 1,
35216
35249
  class: "field-loading",
35217
35250
  style: { "color": "#909399", "font-size": "12px", "padding": "8px" }
35218
35251
  };
35219
- const _hoisted_10$1 = {
35252
+ const _hoisted_9$2 = {
35220
35253
  key: 1,
35221
35254
  class: "empty-hint"
35222
35255
  };
35223
- const _hoisted_11 = { key: 0 };
35224
- const _hoisted_12 = { key: 1 };
35225
- const _hoisted_13 = {
35226
- key: 0,
35256
+ const _hoisted_10$1 = { key: 0 };
35257
+ const _hoisted_11 = { key: 1 };
35258
+ const _hoisted_12 = {
35259
+ key: 1,
35227
35260
  class: "empty-hint"
35228
35261
  };
35229
- const _hoisted_14 = {
35230
- key: 1,
35262
+ const _hoisted_13 = {
35263
+ key: 2,
35231
35264
  class: "empty-hint"
35232
35265
  };
35233
35266
  function _sfc_render$l(_ctx, _cache, $props, $setup, $data, $options) {
@@ -35240,9 +35273,9 @@ function _sfc_render$l(_ctx, _cache, $props, $setup, $data, $options) {
35240
35273
  key: $props.widget.id,
35241
35274
  class: normalizeClass(["custom-sub-form-container", $options.customClass])
35242
35275
  }, [
35243
- createElementVNode("div", _hoisted_1$i, [
35276
+ !$props.widget.options.labelHidden ? (openBlock(), createElementBlock("div", _hoisted_1$i, [
35244
35277
  createElementVNode("span", _hoisted_2$d, toDisplayString($props.widget.options.label || "\u81EA\u5B9A\u4E49\u5B50\u8868\u5355"), 1)
35245
- ]),
35278
+ ])) : createCommentVNode("", true),
35246
35279
  (openBlock(true), createElementBlock(Fragment, null, renderList($data.rowIdData, (subFormRowId, sfrIdx) => {
35247
35280
  return openBlock(), createElementBlock("div", {
35248
35281
  class: "form-group-row",
@@ -35250,9 +35283,9 @@ function _sfc_render$l(_ctx, _cache, $props, $setup, $data, $options) {
35250
35283
  }, [
35251
35284
  createElementVNode("div", _hoisted_3$a, [
35252
35285
  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"))
35286
+ $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
35287
  ]),
35255
- createElementVNode("div", _hoisted_7$5, [
35288
+ createElementVNode("div", _hoisted_6$6, [
35256
35289
  sfrIdx > 0 && !$props.widget.options.disabled ? (openBlock(), createBlock(_component_el_button, {
35257
35290
  key: 0,
35258
35291
  size: "small",
@@ -35268,7 +35301,7 @@ function _sfc_render$l(_ctx, _cache, $props, $setup, $data, $options) {
35268
35301
  }, 8, ["onClick"])) : createCommentVNode("", true)
35269
35302
  ])
35270
35303
  ]),
35271
- createElementVNode("div", _hoisted_8$3, [
35304
+ createElementVNode("div", _hoisted_7$5, [
35272
35305
  $props.widget && $props.widget.widgetList && $props.widget.widgetList.length > 0 ? (openBlock(true), createElementBlock(Fragment, { key: 0 }, renderList($props.widget.widgetList, (subWidget, swIdx) => {
35273
35306
  return openBlock(), createElementBlock(Fragment, {
35274
35307
  key: subWidget ? subWidget.id + "gc" + subFormRowId + "-" + swIdx : "gc" + subFormRowId + "-" + swIdx
@@ -35295,18 +35328,18 @@ function _sfc_render$l(_ctx, _cache, $props, $setup, $data, $options) {
35295
35328
  "sub-form-row-index": sfrIdx,
35296
35329
  "sub-form-col-index": swIdx,
35297
35330
  "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... "))
35331
+ }, 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
35332
  ], 64)) : createCommentVNode("", true)
35300
35333
  ], 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)
35334
+ }), 128)) : (openBlock(), createElementBlock("div", _hoisted_9$2, [
35335
+ !$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
35336
  ]))
35304
35337
  ])
35305
35338
  ]);
35306
35339
  }), 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),
35340
+ !$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
35341
  !$props.widget.options.disabled ? (openBlock(), createBlock(_component_el_button, {
35309
- key: 2,
35342
+ key: 3,
35310
35343
  disabled: $data.actionDisabled,
35311
35344
  type: "primary",
35312
35345
  plain: "",
@@ -35326,7 +35359,7 @@ function _sfc_render$l(_ctx, _cache, $props, $setup, $data, $options) {
35326
35359
  _: 1
35327
35360
  }, 8, ["widget"]);
35328
35361
  }
35329
- var CustomSubFormItem = /* @__PURE__ */ _export_sfc$1(_sfc_main$l, [["render", _sfc_render$l], ["__scopeId", "data-v-6bd07e4e"]]);
35362
+ var CustomSubFormItem = /* @__PURE__ */ _export_sfc$1(_sfc_main$l, [["render", _sfc_render$l], ["__scopeId", "data-v-09af068c"]]);
35330
35363
  var customTableCellWidget_vue_vue_type_style_index_0_scoped_true_lang = "";
35331
35364
  const _sfc_main$k = {
35332
35365
  name: "custom-table-cell-widget",
@@ -65896,18 +65929,6 @@ const loadExtension = function(app) {
65896
65929
  registerCPEditor(app, "asset-type-assetTypeValue", "asset-type-assetTypeValue-editor", createInputTextEditor("assetTypeValue", "extension.setting.assetTypeAssetTypeValue"));
65897
65930
  app.component(CustomInputWidget.name, CustomInputWidget);
65898
65931
  };
65899
- function setupDict(app, service2, options = {}) {
65900
- const dictConfig = options.dict || {};
65901
- app.config.globalProperties.$dictManager = dictManager;
65902
- app.provide("dictManager", dictManager);
65903
- if (typeof window !== "undefined") {
65904
- window.dictManager = dictManager;
65905
- }
65906
- if (dictConfig.autoLoad !== false && service2) {
65907
- dictManager.fetchFromApi(service2, dictConfig);
65908
- }
65909
- return dictManager;
65910
- }
65911
65932
  function getElMessage(app) {
65912
65933
  var _a, _b, _c;
65913
65934
  try {
@@ -65928,7 +65949,6 @@ VFormRender.install = function(app, options = {}) {
65928
65949
  app.config.globalProperties.$service = service$1;
65929
65950
  app.provide("service", service$1);
65930
65951
  app.provide("ElMessage", getElMessage(app));
65931
- setupDict(app, service$1, options);
65932
65952
  };
65933
65953
  const components = [
65934
65954
  VFormRender
@@ -65946,7 +65966,6 @@ const install = (app, options = {}) => {
65946
65966
  if (typeof window !== "undefined") {
65947
65967
  window.service = service$1;
65948
65968
  }
65949
- setupDict(app, service$1, options);
65950
65969
  };
65951
65970
  var installRender = {
65952
65971
  install,