form-custom-test 3.0.37 → 3.0.38

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
@@ -8927,10 +8927,10 @@ var fieldMixin = {
8927
8927
  }
8928
8928
  },
8929
8929
  clearSelectedOptions() {
8930
- if (this.field.type !== "checkbox" && this.field.type !== "radio" && this.field.type !== "select") {
8930
+ if (this.field.type !== "checkbox" && this.field.type !== "radio" && this.field.type !== "select" && this.field.type !== "select-tree") {
8931
8931
  return;
8932
8932
  }
8933
- if (this.field.type === "checkbox" || this.field.type === "select" && this.field.options.multiple) {
8933
+ if (this.field.type === "checkbox" || this.field.type === "select" && this.field.options.multiple || this.field.type === "select-tree" && this.field.options.multiple) {
8934
8934
  this.fieldModel = [];
8935
8935
  } else {
8936
8936
  this.fieldModel = "";
@@ -23101,6 +23101,28 @@ const _sfc_main$D = {
23101
23101
  return void 0;
23102
23102
  }
23103
23103
  }
23104
+ },
23105
+ methods: {
23106
+ handleTreeSelectChange(val) {
23107
+ const isEvent = val && typeof val === "object" && "isTrusted" in val;
23108
+ this.handleChangeEvent(isEvent ? this.fieldModel : val);
23109
+ }
23110
+ },
23111
+ beforeCreate() {
23112
+ },
23113
+ created() {
23114
+ this.initOptionItems();
23115
+ this.initFieldModel();
23116
+ this.registerToRefList();
23117
+ this.initEventHandler();
23118
+ this.buildFieldRules();
23119
+ this.handleOnCreated();
23120
+ },
23121
+ mounted() {
23122
+ this.handleOnMounted();
23123
+ },
23124
+ beforeUnmount() {
23125
+ this.unregisterFromRefList();
23104
23126
  }
23105
23127
  };
23106
23128
  function _sfc_render$D(_ctx, _cache, $props, $setup, $data, $options) {
@@ -23143,7 +23165,7 @@ function _sfc_render$D(_ctx, _cache, $props, $setup, $data, $options) {
23143
23165
  "remote-method": $options.remoteMethod,
23144
23166
  onFocus: _ctx.handleFocusCustomEvent,
23145
23167
  onBlur: _ctx.handleBlurCustomEvent,
23146
- onChange: _ctx.handleChangeEvent
23168
+ onChange: $options.handleTreeSelectChange
23147
23169
  }, null, 8, ["modelValue", "data", "show-checkbox", "disabled", "size", "clearable", "filterable", "allow-create", "default-first-option", "automatic-dropdown", "multiple", "multiple-limit", "placeholder", "remote", "remote-method", "onFocus", "onBlur", "onChange"])
23148
23170
  ]),
23149
23171
  _: 1
@@ -25640,13 +25662,13 @@ function registerIcon(app) {
25640
25662
  if (typeof window !== "undefined") {
25641
25663
  let loadSvg = function() {
25642
25664
  var body = document.body;
25643
- var svgDom = document.getElementById("__svg__icons__dom__1771999294605__");
25665
+ var svgDom = document.getElementById("__svg__icons__dom__1772086128022__");
25644
25666
  if (!svgDom) {
25645
25667
  svgDom = document.createElementNS("http://www.w3.org/2000/svg", "svg");
25646
25668
  svgDom.style.position = "absolute";
25647
25669
  svgDom.style.width = "0";
25648
25670
  svgDom.style.height = "0";
25649
- svgDom.id = "__svg__icons__dom__1771999294605__";
25671
+ svgDom.id = "__svg__icons__dom__1772086128022__";
25650
25672
  svgDom.setAttribute("xmlns", "http://www.w3.org/2000/svg");
25651
25673
  svgDom.setAttribute("xmlns:link", "http://www.w3.org/1999/xlink");
25652
25674
  }