form-custom-test 3.0.246 → 3.0.247

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
@@ -9084,16 +9084,30 @@ var fieldMixin = {
9084
9084
  if (!w)
9085
9085
  return;
9086
9086
  if (w.formItemFlag && w.options && w.options.name) {
9087
- w.options.hidden = hiddenVal;
9088
- const fieldRef = this.getWidgetRef(w.options.name, false);
9089
- if (fieldRef && typeof fieldRef.setHidden === "function") {
9090
- fieldRef.setHidden(hiddenVal);
9091
- } else if (fieldRef) {
9092
- if (hiddenVal && typeof fieldRef.clearFieldRules === "function") {
9087
+ const opts = w.options;
9088
+ const fieldRef = this.getWidgetRef(opts.name, false);
9089
+ if (hiddenVal) {
9090
+ if (!opts.hidden) {
9091
+ opts._hiddenByCol = true;
9092
+ opts.hidden = true;
9093
+ if (fieldRef && typeof fieldRef.setHidden === "function") {
9094
+ fieldRef.setHidden(true);
9095
+ } else if (fieldRef && typeof fieldRef.clearFieldRules === "function") {
9096
+ fieldRef.clearFieldRules();
9097
+ }
9098
+ } else if (fieldRef && typeof fieldRef.clearFieldRules === "function") {
9093
9099
  fieldRef.clearFieldRules();
9094
- } else if (!hiddenVal && typeof fieldRef.buildFieldRules === "function") {
9100
+ }
9101
+ } else if (opts._hiddenByCol) {
9102
+ opts._hiddenByCol = false;
9103
+ opts.hidden = false;
9104
+ if (fieldRef && typeof fieldRef.setHidden === "function") {
9105
+ fieldRef.setHidden(false);
9106
+ } else if (fieldRef && typeof fieldRef.buildFieldRules === "function") {
9095
9107
  fieldRef.buildFieldRules();
9096
9108
  }
9109
+ } else if (!opts.hidden && fieldRef && typeof fieldRef.buildFieldRules === "function") {
9110
+ fieldRef.buildFieldRules();
9097
9111
  }
9098
9112
  }
9099
9113
  if (Array.isArray(w.widgetList))
@@ -24783,18 +24797,34 @@ const _sfc_main$P = {
24783
24797
  if (!fieldWidget.formItemFlag || !fieldWidget.options || !fieldWidget.options.name) {
24784
24798
  return;
24785
24799
  }
24786
- fieldWidget.options.hidden = hiddenFlag;
24787
- const fieldRef = this.getWidgetRef(fieldWidget.options.name);
24788
- if (!fieldRef)
24789
- return;
24790
- if (typeof fieldRef.setHidden === "function") {
24791
- fieldRef.setHidden(hiddenFlag);
24792
- } else if (hiddenFlag) {
24793
- if (typeof fieldRef.clearFieldRules === "function") {
24800
+ const opts = fieldWidget.options;
24801
+ const fieldRef = this.getWidgetRef(opts.name);
24802
+ if (hiddenFlag) {
24803
+ if (!opts.hidden) {
24804
+ opts._hiddenByCol = true;
24805
+ opts.hidden = true;
24806
+ }
24807
+ if (fieldRef && typeof fieldRef.setHidden === "function") {
24808
+ if (opts._hiddenByCol) {
24809
+ fieldRef.setHidden(true);
24810
+ } else if (typeof fieldRef.clearFieldRules === "function") {
24811
+ fieldRef.clearFieldRules();
24812
+ }
24813
+ } else if (fieldRef && typeof fieldRef.clearFieldRules === "function") {
24794
24814
  fieldRef.clearFieldRules();
24795
24815
  }
24796
- } else if (typeof fieldRef.buildFieldRules === "function") {
24797
- fieldRef.buildFieldRules();
24816
+ } else {
24817
+ if (opts._hiddenByCol) {
24818
+ opts._hiddenByCol = false;
24819
+ opts.hidden = false;
24820
+ if (fieldRef && typeof fieldRef.setHidden === "function") {
24821
+ fieldRef.setHidden(false);
24822
+ } else if (fieldRef && typeof fieldRef.buildFieldRules === "function") {
24823
+ fieldRef.buildFieldRules();
24824
+ }
24825
+ } else if (!opts.hidden && fieldRef && typeof fieldRef.buildFieldRules === "function") {
24826
+ fieldRef.buildFieldRules();
24827
+ }
24798
24828
  }
24799
24829
  });
24800
24830
  },
@@ -24903,7 +24933,7 @@ function _sfc_render$P(_ctx, _cache, $props, $setup, $data, $options) {
24903
24933
  [vShow, $options.colVisible]
24904
24934
  ]) : createCommentVNode("", true);
24905
24935
  }
24906
- var GridColItem = /* @__PURE__ */ _export_sfc$1(_sfc_main$P, [["render", _sfc_render$P], ["__scopeId", "data-v-315cc820"]]);
24936
+ var GridColItem = /* @__PURE__ */ _export_sfc$1(_sfc_main$P, [["render", _sfc_render$P], ["__scopeId", "data-v-67883cb4"]]);
24907
24937
  var __glob_0_1$1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
24908
24938
  __proto__: null,
24909
24939
  "default": GridColItem
@@ -26709,7 +26739,27 @@ const _sfc_main$J = {
26709
26739
  if (!fieldWidget.formItemFlag || !fieldWidget.options || !fieldWidget.options.name) {
26710
26740
  return;
26711
26741
  }
26712
- this.findWidgetAndSetHidden(fieldWidget.options.name, hiddenFlag);
26742
+ const opts = fieldWidget.options;
26743
+ const fieldName = opts.name;
26744
+ if (hiddenFlag) {
26745
+ if (!opts.hidden) {
26746
+ opts._hiddenByCol = true;
26747
+ this.findWidgetAndSetHidden(fieldName, true);
26748
+ } else {
26749
+ const fieldRef = this.getWidgetRef(fieldName);
26750
+ if (fieldRef && typeof fieldRef.clearFieldRules === "function") {
26751
+ fieldRef.clearFieldRules();
26752
+ }
26753
+ }
26754
+ } else if (opts._hiddenByCol) {
26755
+ opts._hiddenByCol = false;
26756
+ this.findWidgetAndSetHidden(fieldName, false);
26757
+ } else if (!opts.hidden) {
26758
+ const fieldRef = this.getWidgetRef(fieldName);
26759
+ if (fieldRef && typeof fieldRef.buildFieldRules === "function") {
26760
+ fieldRef.buildFieldRules();
26761
+ }
26762
+ }
26713
26763
  });
26714
26764
  },
26715
26765
  setColHidden(colName, hidden) {
@@ -26789,7 +26839,7 @@ function _sfc_render$J(_ctx, _cache, $props, $setup, $data, $options) {
26789
26839
  _: 3
26790
26840
  }, 8, ["label-position", "size", "class", "label-width", "model"]);
26791
26841
  }
26792
- var VFormRender = /* @__PURE__ */ _export_sfc$1(_sfc_main$J, [["render", _sfc_render$J], ["__scopeId", "data-v-cd88fba4"]]);
26842
+ var VFormRender = /* @__PURE__ */ _export_sfc$1(_sfc_main$J, [["render", _sfc_render$J], ["__scopeId", "data-v-379b4a24"]]);
26793
26843
  function registerIcon(app) {
26794
26844
  app.component("el-icon-edit", edit);
26795
26845
  app.component("el-icon-minus", minus);
@@ -26804,13 +26854,13 @@ function registerIcon(app) {
26804
26854
  if (typeof window !== "undefined") {
26805
26855
  let loadSvg = function() {
26806
26856
  var body = document.body;
26807
- var svgDom = document.getElementById("__svg__icons__dom__1789607311752__");
26857
+ var svgDom = document.getElementById("__svg__icons__dom__1789608008327__");
26808
26858
  if (!svgDom) {
26809
26859
  svgDom = document.createElementNS("http://www.w3.org/2000/svg", "svg");
26810
26860
  svgDom.style.position = "absolute";
26811
26861
  svgDom.style.width = "0";
26812
26862
  svgDom.style.height = "0";
26813
- svgDom.id = "__svg__icons__dom__1789607311752__";
26863
+ svgDom.id = "__svg__icons__dom__1789608008327__";
26814
26864
  svgDom.setAttribute("xmlns", "http://www.w3.org/2000/svg");
26815
26865
  svgDom.setAttribute("xmlns:link", "http://www.w3.org/1999/xlink");
26816
26866
  }