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.
package/dist/render.es.js CHANGED
@@ -26025,13 +26025,13 @@ function registerIcon(app) {
26025
26025
  if (typeof window !== "undefined") {
26026
26026
  let loadSvg = function() {
26027
26027
  var body = document.body;
26028
- var svgDom = document.getElementById("__svg__icons__dom__1775620862287__");
26028
+ var svgDom = document.getElementById("__svg__icons__dom__1775622622689__");
26029
26029
  if (!svgDom) {
26030
26030
  svgDom = document.createElementNS("http://www.w3.org/2000/svg", "svg");
26031
26031
  svgDom.style.position = "absolute";
26032
26032
  svgDom.style.width = "0";
26033
26033
  svgDom.style.height = "0";
26034
- svgDom.id = "__svg__icons__dom__1775620862287__";
26034
+ svgDom.id = "__svg__icons__dom__1775622622689__";
26035
26035
  svgDom.setAttribute("xmlns", "http://www.w3.org/2000/svg");
26036
26036
  svgDom.setAttribute("xmlns:link", "http://www.w3.org/1999/xlink");
26037
26037
  }
@@ -32471,9 +32471,9 @@ const _sfc_main$i = {
32471
32471
  return {
32472
32472
  fieldModel: null,
32473
32473
  oldFieldValue: null,
32474
- radioValue: null,
32475
32474
  rules: [],
32476
- inputValue: ""
32475
+ inputValue: "",
32476
+ radioValue: null
32477
32477
  };
32478
32478
  },
32479
32479
  computed: {
@@ -32491,6 +32491,21 @@ const _sfc_main$i = {
32491
32491
  ];
32492
32492
  }
32493
32493
  },
32494
+ watch: {
32495
+ fieldModel: {
32496
+ handler(newVal) {
32497
+ if (typeof newVal === "string" && newVal.includes("_RADIO_OTHER_")) {
32498
+ this.radioValue = "_RADIO_OTHER_";
32499
+ this.inputValue = newVal.split("_RADIO_OTHER_")[1];
32500
+ } else {
32501
+ this.radioValue = newVal;
32502
+ this.inputValue = "";
32503
+ }
32504
+ }
32505
+ },
32506
+ immediate: true,
32507
+ deep: true
32508
+ },
32494
32509
  created() {
32495
32510
  this.initOptionItems();
32496
32511
  this.initFieldModel();
@@ -32527,8 +32542,8 @@ const _sfc_main$i = {
32527
32542
  this.dispatch("VFormRender", "fieldValidation", [this.getPropName()]);
32528
32543
  },
32529
32544
  handleOtherValueChange() {
32530
- if (this.fieldModel === "_RADIO_OTHER_") {
32531
- const newValue = this.inputValue ? `${this.fieldModel}&${this.inputValue}` : this.fieldModel;
32545
+ if (this.radioValue === "_RADIO_OTHER_") {
32546
+ const newValue = this.inputValue ? `${this.radioValue}&${this.inputValue}` : this.radioValue;
32532
32547
  console.log(newValue, "newValue");
32533
32548
  this.oldFieldValue = this.fieldModel;
32534
32549
  this.syncUpdateFormModel(newValue);
@@ -32557,8 +32572,8 @@ function _sfc_render$i(_ctx, _cache, $props, $setup, $data, $options) {
32557
32572
  }, {
32558
32573
  default: withCtx(() => [
32559
32574
  createVNode(_component_el_radio_group, {
32560
- modelValue: $data.fieldModel,
32561
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $data.fieldModel = $event),
32575
+ modelValue: $data.radioValue,
32576
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $data.radioValue = $event),
32562
32577
  class: normalizeClass({ "radio-group-block": $props.field.options.displayStyle === "block" }),
32563
32578
  disabled: $props.field.options.disabled,
32564
32579
  size: $options.widgetSize,
@@ -61533,17 +61548,7 @@ const _sfc_main = {
61533
61548
  method: "get",
61534
61549
  url: "unified-system/employee/loginInfo?accessType=0"
61535
61550
  });
61536
- if (!data2.id)
61537
- return;
61538
- const { data: personList } = await service$1({
61539
- method: "get",
61540
- url: "/unified-system/employee/queryList",
61541
- params: {
61542
- userId: data2.id
61543
- }
61544
- });
61545
- const userInfo = personList ? personList[0] : {};
61546
- this.fieldModel = __spreadValues(__spreadValues({}, data2), userInfo);
61551
+ this.fieldModel = data2;
61547
61552
  this.syncUpdateFormModel(this.fieldModel);
61548
61553
  this.emitFieldDataChange(this.fieldModel, this.oldFieldValue);
61549
61554
  }