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.
@@ -68340,13 +68340,13 @@ function registerIcon(app) {
68340
68340
  if (typeof window !== "undefined") {
68341
68341
  let loadSvg = function() {
68342
68342
  var body = document.body;
68343
- var svgDom = document.getElementById("__svg__icons__dom__1777270909015__");
68343
+ var svgDom = document.getElementById("__svg__icons__dom__1777272735982__");
68344
68344
  if (!svgDom) {
68345
68345
  svgDom = document.createElementNS("http://www.w3.org/2000/svg", "svg");
68346
68346
  svgDom.style.position = "absolute";
68347
68347
  svgDom.style.width = "0";
68348
68348
  svgDom.style.height = "0";
68349
- svgDom.id = "__svg__icons__dom__1777270909015__";
68349
+ svgDom.id = "__svg__icons__dom__1777272735982__";
68350
68350
  svgDom.setAttribute("xmlns", "http://www.w3.org/2000/svg");
68351
68351
  svgDom.setAttribute("xmlns:link", "http://www.w3.org/1999/xlink");
68352
68352
  }
@@ -78982,6 +78982,10 @@ const _sfc_main$1 = {
78982
78982
  typeJson: {
78983
78983
  type: [String, Object],
78984
78984
  default: () => ({})
78985
+ },
78986
+ disabled: {
78987
+ type: Boolean,
78988
+ default: false
78985
78989
  }
78986
78990
  },
78987
78991
  data() {
@@ -79042,6 +79046,14 @@ const _sfc_main$1 = {
79042
79046
  this.formData = {};
79043
79047
  }
79044
79048
  }
79049
+ },
79050
+ disabled: {
79051
+ immediate: true,
79052
+ handler() {
79053
+ this.$nextTick(() => {
79054
+ this.syncFormDisabledStatus();
79055
+ });
79056
+ }
79045
79057
  }
79046
79058
  },
79047
79059
  methods: {
@@ -79062,13 +79074,29 @@ const _sfc_main$1 = {
79062
79074
  }
79063
79075
  return {};
79064
79076
  },
79077
+ syncFormDisabledStatus() {
79078
+ const ref2 = this.$refs.detailFormRender;
79079
+ if (!ref2) {
79080
+ return;
79081
+ }
79082
+ if (this.disabled) {
79083
+ if (typeof ref2.disableForm === "function") {
79084
+ ref2.disableForm();
79085
+ }
79086
+ } else if (typeof ref2.enableForm === "function") {
79087
+ ref2.enableForm();
79088
+ }
79089
+ },
79065
79090
  applyFormJsonToRender(parsed) {
79066
79091
  this.formJson = parsed && parsed.widgetList && parsed.formConfig ? parsed : lodash.exports.cloneDeep(this.defaultFormJson);
79067
79092
  this.$nextTick(() => {
79068
79093
  const ref2 = this.$refs.detailFormRender;
79069
79094
  if (ref2 && typeof ref2.setFormJson === "function") {
79070
79095
  ref2.setFormJson(lodash.exports.cloneDeep(this.formJson));
79071
- this.flushPendingColHiddenOps();
79096
+ this.$nextTick(() => {
79097
+ this.syncFormDisabledStatus();
79098
+ this.flushPendingColHiddenOps();
79099
+ });
79072
79100
  }
79073
79101
  });
79074
79102
  },
@@ -79197,7 +79225,8 @@ function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
79197
79225
  ])]),
79198
79226
  _: 1
79199
79227
  }, 8, ["onClick"]),
79200
- createVNode(_component_el_button, {
79228
+ !$props.disabled ? (openBlock(), createBlock(_component_el_button, {
79229
+ key: 0,
79201
79230
  type: "primary",
79202
79231
  onClick: $options.handleConfirm
79203
79232
  }, {
@@ -79205,7 +79234,7 @@ function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
79205
79234
  createTextVNode("\u786E\u5B9A", -1)
79206
79235
  ])]),
79207
79236
  _: 1
79208
- }, 8, ["onClick"])
79237
+ }, 8, ["onClick"])) : createCommentVNode("", true)
79209
79238
  ])
79210
79239
  ]),
79211
79240
  default: withCtx(() => [
@@ -79222,7 +79251,7 @@ function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
79222
79251
  _: 1
79223
79252
  }, 8, ["modelValue", "onClose"]);
79224
79253
  }
79225
- var DetailDialog = /* @__PURE__ */ _export_sfc$1(_sfc_main$1, [["render", _sfc_render$1], ["__scopeId", "data-v-772c9f48"]]);
79254
+ var DetailDialog = /* @__PURE__ */ _export_sfc$1(_sfc_main$1, [["render", _sfc_render$1], ["__scopeId", "data-v-0f9f38bd"]]);
79226
79255
  var index_vue_vue_type_style_index_0_lang = "";
79227
79256
  const _sfc_main = {
79228
79257
  name: "asset-table-widget",
@@ -79469,8 +79498,9 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
79469
79498
  typeJson: $props.field.options.typeJson,
79470
79499
  data: $data.detailDialogData,
79471
79500
  onClose: $options.handleCloseDetailDialog,
79472
- onConfirm: $options.handleConfirm
79473
- }, null, 8, ["visible", "typeJson", "data", "onClose", "onConfirm"])
79501
+ onConfirm: $options.handleConfirm,
79502
+ disabled: $props.field.options.disabled
79503
+ }, null, 8, ["visible", "typeJson", "data", "onClose", "onConfirm", "disabled"])
79474
79504
  ]),
79475
79505
  _: 1
79476
79506
  }, 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"]);