form-custom-test 3.0.84 → 3.0.85

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__1775622342022__");
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__1775622342022__";
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,7 +32471,6 @@ const _sfc_main$i = {
32471
32471
  return {
32472
32472
  fieldModel: null,
32473
32473
  oldFieldValue: null,
32474
- radioValue: null,
32475
32474
  rules: [],
32476
32475
  inputValue: ""
32477
32476
  };
@@ -32491,6 +32490,21 @@ const _sfc_main$i = {
32491
32490
  ];
32492
32491
  }
32493
32492
  },
32493
+ watch: {
32494
+ fieldModel: {
32495
+ handler(newVal) {
32496
+ if (typeof newVal === "string" && newVal.includes("_RADIO_OTHER_")) {
32497
+ this.radioValue = "_RADIO_OTHER_";
32498
+ this.inputValue = newVal.split("_RADIO_OTHER_")[1];
32499
+ } else {
32500
+ this.radioValue = newVal;
32501
+ this.inputValue = "";
32502
+ }
32503
+ }
32504
+ },
32505
+ immediate: true,
32506
+ deep: true
32507
+ },
32494
32508
  created() {
32495
32509
  this.initOptionItems();
32496
32510
  this.initFieldModel();
@@ -32527,8 +32541,8 @@ const _sfc_main$i = {
32527
32541
  this.dispatch("VFormRender", "fieldValidation", [this.getPropName()]);
32528
32542
  },
32529
32543
  handleOtherValueChange() {
32530
- if (this.fieldModel === "_RADIO_OTHER_") {
32531
- const newValue = this.inputValue ? `${this.fieldModel}&${this.inputValue}` : this.fieldModel;
32544
+ if (this.radioValue === "_RADIO_OTHER_") {
32545
+ const newValue = this.inputValue ? `${this.radioValue}&${this.inputValue}` : this.radioValue;
32532
32546
  console.log(newValue, "newValue");
32533
32547
  this.oldFieldValue = this.fieldModel;
32534
32548
  this.syncUpdateFormModel(newValue);
@@ -32557,8 +32571,8 @@ function _sfc_render$i(_ctx, _cache, $props, $setup, $data, $options) {
32557
32571
  }, {
32558
32572
  default: withCtx(() => [
32559
32573
  createVNode(_component_el_radio_group, {
32560
- modelValue: $data.fieldModel,
32561
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $data.fieldModel = $event),
32574
+ modelValue: _ctx.radioValue,
32575
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => _ctx.radioValue = $event),
32562
32576
  class: normalizeClass({ "radio-group-block": $props.field.options.displayStyle === "block" }),
32563
32577
  disabled: $props.field.options.disabled,
32564
32578
  size: $options.widgetSize,
@@ -32582,7 +32596,7 @@ function _sfc_render$i(_ctx, _cache, $props, $setup, $data, $options) {
32582
32596
  ]),
32583
32597
  _: 1
32584
32598
  }, 8, ["modelValue", "class", "disabled", "size", "onChange"]),
32585
- $data.radioValue === "_RADIO_OTHER_" ? (openBlock(), createBlock(_component_el_input, {
32599
+ _ctx.radioValue === "_RADIO_OTHER_" ? (openBlock(), createBlock(_component_el_input, {
32586
32600
  key: 0,
32587
32601
  class: "w-[200px] ml-10px",
32588
32602
  modelValue: $data.inputValue,
@@ -61533,17 +61547,7 @@ const _sfc_main = {
61533
61547
  method: "get",
61534
61548
  url: "unified-system/employee/loginInfo?accessType=0"
61535
61549
  });
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);
61550
+ this.fieldModel = data2;
61547
61551
  this.syncUpdateFormModel(this.fieldModel);
61548
61552
  this.emitFieldDataChange(this.fieldModel, this.oldFieldValue);
61549
61553
  }