form-custom-test 3.0.101 → 3.0.102

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
@@ -26102,13 +26102,13 @@ function registerIcon(app) {
26102
26102
  if (typeof window !== "undefined") {
26103
26103
  let loadSvg = function() {
26104
26104
  var body = document.body;
26105
- var svgDom = document.getElementById("__svg__icons__dom__1777270921870__");
26105
+ var svgDom = document.getElementById("__svg__icons__dom__1777272744315__");
26106
26106
  if (!svgDom) {
26107
26107
  svgDom = document.createElementNS("http://www.w3.org/2000/svg", "svg");
26108
26108
  svgDom.style.position = "absolute";
26109
26109
  svgDom.style.width = "0";
26110
26110
  svgDom.style.height = "0";
26111
- svgDom.id = "__svg__icons__dom__1777270921870__";
26111
+ svgDom.id = "__svg__icons__dom__1777272744315__";
26112
26112
  svgDom.setAttribute("xmlns", "http://www.w3.org/2000/svg");
26113
26113
  svgDom.setAttribute("xmlns:link", "http://www.w3.org/1999/xlink");
26114
26114
  }
@@ -62291,6 +62291,10 @@ const _sfc_main$1 = {
62291
62291
  typeJson: {
62292
62292
  type: [String, Object],
62293
62293
  default: () => ({})
62294
+ },
62295
+ disabled: {
62296
+ type: Boolean,
62297
+ default: false
62294
62298
  }
62295
62299
  },
62296
62300
  data() {
@@ -62351,6 +62355,14 @@ const _sfc_main$1 = {
62351
62355
  this.formData = {};
62352
62356
  }
62353
62357
  }
62358
+ },
62359
+ disabled: {
62360
+ immediate: true,
62361
+ handler() {
62362
+ this.$nextTick(() => {
62363
+ this.syncFormDisabledStatus();
62364
+ });
62365
+ }
62354
62366
  }
62355
62367
  },
62356
62368
  methods: {
@@ -62371,13 +62383,29 @@ const _sfc_main$1 = {
62371
62383
  }
62372
62384
  return {};
62373
62385
  },
62386
+ syncFormDisabledStatus() {
62387
+ const ref2 = this.$refs.detailFormRender;
62388
+ if (!ref2) {
62389
+ return;
62390
+ }
62391
+ if (this.disabled) {
62392
+ if (typeof ref2.disableForm === "function") {
62393
+ ref2.disableForm();
62394
+ }
62395
+ } else if (typeof ref2.enableForm === "function") {
62396
+ ref2.enableForm();
62397
+ }
62398
+ },
62374
62399
  applyFormJsonToRender(parsed) {
62375
62400
  this.formJson = parsed && parsed.widgetList && parsed.formConfig ? parsed : lodash.exports.cloneDeep(this.defaultFormJson);
62376
62401
  this.$nextTick(() => {
62377
62402
  const ref2 = this.$refs.detailFormRender;
62378
62403
  if (ref2 && typeof ref2.setFormJson === "function") {
62379
62404
  ref2.setFormJson(lodash.exports.cloneDeep(this.formJson));
62380
- this.flushPendingColHiddenOps();
62405
+ this.$nextTick(() => {
62406
+ this.syncFormDisabledStatus();
62407
+ this.flushPendingColHiddenOps();
62408
+ });
62381
62409
  }
62382
62410
  });
62383
62411
  },
@@ -62506,7 +62534,8 @@ function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
62506
62534
  ])]),
62507
62535
  _: 1
62508
62536
  }, 8, ["onClick"]),
62509
- createVNode(_component_el_button, {
62537
+ !$props.disabled ? (openBlock(), createBlock(_component_el_button, {
62538
+ key: 0,
62510
62539
  type: "primary",
62511
62540
  onClick: $options.handleConfirm
62512
62541
  }, {
@@ -62514,7 +62543,7 @@ function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
62514
62543
  createTextVNode("\u786E\u5B9A", -1)
62515
62544
  ])]),
62516
62545
  _: 1
62517
- }, 8, ["onClick"])
62546
+ }, 8, ["onClick"])) : createCommentVNode("", true)
62518
62547
  ])
62519
62548
  ]),
62520
62549
  default: withCtx(() => [
@@ -62531,7 +62560,7 @@ function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
62531
62560
  _: 1
62532
62561
  }, 8, ["modelValue", "onClose"]);
62533
62562
  }
62534
- var DetailDialog = /* @__PURE__ */ _export_sfc$1(_sfc_main$1, [["render", _sfc_render$1], ["__scopeId", "data-v-772c9f48"]]);
62563
+ var DetailDialog = /* @__PURE__ */ _export_sfc$1(_sfc_main$1, [["render", _sfc_render$1], ["__scopeId", "data-v-0f9f38bd"]]);
62535
62564
  var index_vue_vue_type_style_index_0_lang = "";
62536
62565
  const _sfc_main = {
62537
62566
  name: "asset-table-widget",
@@ -62778,8 +62807,9 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
62778
62807
  typeJson: $props.field.options.typeJson,
62779
62808
  data: $data.detailDialogData,
62780
62809
  onClose: $options.handleCloseDetailDialog,
62781
- onConfirm: $options.handleConfirm
62782
- }, null, 8, ["visible", "typeJson", "data", "onClose", "onConfirm"])
62810
+ onConfirm: $options.handleConfirm,
62811
+ disabled: $props.field.options.disabled
62812
+ }, null, 8, ["visible", "typeJson", "data", "onClose", "onConfirm", "disabled"])
62783
62813
  ]),
62784
62814
  _: 1
62785
62815
  }, 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"]);