form-custom-test 3.0.84 → 3.0.86

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.
@@ -68175,13 +68175,13 @@ function registerIcon(app) {
68175
68175
  if (typeof window !== "undefined") {
68176
68176
  let loadSvg = function() {
68177
68177
  var body = document.body;
68178
- var svgDom = document.getElementById("__svg__icons__dom__1775620854345__");
68178
+ var svgDom = document.getElementById("__svg__icons__dom__1775622613641__");
68179
68179
  if (!svgDom) {
68180
68180
  svgDom = document.createElementNS("http://www.w3.org/2000/svg", "svg");
68181
68181
  svgDom.style.position = "absolute";
68182
68182
  svgDom.style.width = "0";
68183
68183
  svgDom.style.height = "0";
68184
- svgDom.id = "__svg__icons__dom__1775620854345__";
68184
+ svgDom.id = "__svg__icons__dom__1775622613641__";
68185
68185
  svgDom.setAttribute("xmlns", "http://www.w3.org/2000/svg");
68186
68186
  svgDom.setAttribute("xmlns:link", "http://www.w3.org/1999/xlink");
68187
68187
  }
@@ -74535,9 +74535,9 @@ const _sfc_main$c = {
74535
74535
  return {
74536
74536
  fieldModel: null,
74537
74537
  oldFieldValue: null,
74538
- radioValue: null,
74539
74538
  rules: [],
74540
- inputValue: ""
74539
+ inputValue: "",
74540
+ radioValue: null
74541
74541
  };
74542
74542
  },
74543
74543
  computed: {
@@ -74555,6 +74555,21 @@ const _sfc_main$c = {
74555
74555
  ];
74556
74556
  }
74557
74557
  },
74558
+ watch: {
74559
+ fieldModel: {
74560
+ handler(newVal) {
74561
+ if (typeof newVal === "string" && newVal.includes("_RADIO_OTHER_")) {
74562
+ this.radioValue = "_RADIO_OTHER_";
74563
+ this.inputValue = newVal.split("_RADIO_OTHER_")[1];
74564
+ } else {
74565
+ this.radioValue = newVal;
74566
+ this.inputValue = "";
74567
+ }
74568
+ }
74569
+ },
74570
+ immediate: true,
74571
+ deep: true
74572
+ },
74558
74573
  created() {
74559
74574
  this.initOptionItems();
74560
74575
  this.initFieldModel();
@@ -74591,8 +74606,8 @@ const _sfc_main$c = {
74591
74606
  this.dispatch("VFormRender", "fieldValidation", [this.getPropName()]);
74592
74607
  },
74593
74608
  handleOtherValueChange() {
74594
- if (this.fieldModel === "_RADIO_OTHER_") {
74595
- const newValue = this.inputValue ? `${this.fieldModel}&${this.inputValue}` : this.fieldModel;
74609
+ if (this.radioValue === "_RADIO_OTHER_") {
74610
+ const newValue = this.inputValue ? `${this.radioValue}&${this.inputValue}` : this.radioValue;
74596
74611
  console.log(newValue, "newValue");
74597
74612
  this.oldFieldValue = this.fieldModel;
74598
74613
  this.syncUpdateFormModel(newValue);
@@ -74621,8 +74636,8 @@ function _sfc_render$c(_ctx, _cache, $props, $setup, $data, $options) {
74621
74636
  }, {
74622
74637
  default: withCtx(() => [
74623
74638
  createVNode(_component_el_radio_group, {
74624
- modelValue: $data.fieldModel,
74625
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $data.fieldModel = $event),
74639
+ modelValue: $data.radioValue,
74640
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $data.radioValue = $event),
74626
74641
  class: normalizeClass({ "radio-group-block": $props.field.options.displayStyle === "block" }),
74627
74642
  disabled: $props.field.options.disabled,
74628
74643
  size: $options.widgetSize,
@@ -78136,17 +78151,7 @@ const _sfc_main = {
78136
78151
  method: "get",
78137
78152
  url: "unified-system/employee/loginInfo?accessType=0"
78138
78153
  });
78139
- if (!data2.id)
78140
- return;
78141
- const { data: personList } = await service$1({
78142
- method: "get",
78143
- url: "/unified-system/employee/queryList",
78144
- params: {
78145
- userId: data2.id
78146
- }
78147
- });
78148
- const userInfo = personList ? personList[0] : {};
78149
- this.fieldModel = __spreadValues(__spreadValues({}, data2), userInfo);
78154
+ this.fieldModel = data2;
78150
78155
  this.syncUpdateFormModel(this.fieldModel);
78151
78156
  this.emitFieldDataChange(this.fieldModel, this.oldFieldValue);
78152
78157
  }