yqform-h5 0.1.29 → 0.1.30

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.
@@ -14739,25 +14739,27 @@ const fS = {
14739
14739
  setAnswer(e) {
14740
14740
  console.log("setAnswer", this.answer);
14741
14741
  const t = e.groups, n = Object.keys(this.answer);
14742
- for (let o = 0; o < t.length; o++) {
14743
- let a = t[o].gid, s = t[o].items;
14744
- for (let u = 0; u < s.length; u++) {
14745
- let d = n.find((f) => f === s[u].key);
14746
- if (d) {
14747
- let f = this.answer[`${d}`];
14748
- if (s[u].type === "radio")
14749
- this.setDependValue({ gid: a, key: d, value: f[0].id });
14750
- else if (s[u].type === "picker" || s[u].type === "customPicker")
14751
- this.setDependValue({ gid: a, key: d, value: f[0] });
14752
- else if (s[u].type === "checkbox") {
14753
- let c = [];
14754
- f.forEach((m) => c.push(m.id)), this.setDependValue({ gid: a, key: d, value: c });
14755
- } else
14756
- s[u].type === "area" ? this.setDependValue({ gid: a, key: d, value: { code: f[0].id, value: f[0].content } }) : s[u].type === "rate" ? this.setDependValue({ gid: a, key: d, value: f[0].id * 1 }) : s[u].type === "pay" || s[u].type === "idPicture" ? this.setDependValue({ gid: a, key: d, value: f[0] }) : this.setDependValue({ gid: a, key: d, value: f[0].content });
14742
+ if (t) {
14743
+ for (let o = 0; o < t.length; o++) {
14744
+ let a = t[o].gid, s = t[o].items;
14745
+ for (let u = 0; u < s.length; u++) {
14746
+ let d = n.find((f) => f === s[u].key);
14747
+ if (d) {
14748
+ let f = this.answer[`${d}`];
14749
+ if (s[u].type === "radio")
14750
+ this.setDependValue({ gid: a, key: d, value: f[0].id });
14751
+ else if (s[u].type === "picker" || s[u].type === "customPicker")
14752
+ this.setDependValue({ gid: a, key: d, value: f[0] });
14753
+ else if (s[u].type === "checkbox") {
14754
+ let c = [];
14755
+ f.forEach((m) => c.push(m.id)), this.setDependValue({ gid: a, key: d, value: c });
14756
+ } else
14757
+ s[u].type === "area" ? this.setDependValue({ gid: a, key: d, value: { code: f[0].id, value: f[0].content } }) : s[u].type === "rate" ? this.setDependValue({ gid: a, key: d, value: f[0].id * 1 }) : s[u].type === "pay" || s[u].type === "idPicture" ? this.setDependValue({ gid: a, key: d, value: f[0] }) : this.setDependValue({ gid: a, key: d, value: f[0].content });
14758
+ }
14757
14759
  }
14758
14760
  }
14761
+ this.init = !this.init;
14759
14762
  }
14760
- this.init = !this.init;
14761
14763
  },
14762
14764
  // 上传图片回调
14763
14765
  pushFile(e, t) {
@@ -14776,7 +14778,7 @@ const fS = {
14776
14778
  },
14777
14779
  mounted() {
14778
14780
  }
14779
- }, hS = (e) => (sd("data-v-61c32754"), e = e(), ld(), e), mS = { class: "main" }, gS = { class: "content-topimg" }, vS = {
14781
+ }, hS = (e) => (sd("data-v-628703f1"), e = e(), ld(), e), mS = { class: "main" }, gS = { class: "content-topimg" }, vS = {
14780
14782
  key: 0,
14781
14783
  class: "header-img"
14782
14784
  }, pS = {
@@ -14896,7 +14898,7 @@ function AS(e, t, n, o, a, s) {
14896
14898
  ])) : _e("", !0)
14897
14899
  ]);
14898
14900
  }
14899
- const IS = /* @__PURE__ */ po(fS, [["render", AS], ["__scopeId", "data-v-61c32754"]]);
14901
+ const IS = /* @__PURE__ */ po(fS, [["render", AS], ["__scopeId", "data-v-628703f1"]]);
14900
14902
  const TS = {
14901
14903
  name: "Content",
14902
14904
  emits: ["onSelect", "addFile", "submit", "edit"],
@@ -15038,7 +15040,7 @@ const TS = {
15038
15040
  }
15039
15041
  },
15040
15042
  mounted() {
15041
- this.answer && setTimeout(() => this.$refs.list.setAnswer(this.form));
15043
+ this.answer && setTimeout(() => this.$refs.list.setAnswer(this.form)), console.log("[ state ] >", this.state);
15042
15044
  }
15043
15045
  }, kS = { key: 0 }, OS = { key: 1 };
15044
15046
  function DS(e, t, n, o, a, s) {
@@ -15073,7 +15075,7 @@ function DS(e, t, n, o, a, s) {
15073
15075
  ])) : _e("", !0)
15074
15076
  ]);
15075
15077
  }
15076
- const xm = /* @__PURE__ */ po(TS, [["render", DS], ["__scopeId", "data-v-9b3dd604"]]);
15078
+ const xm = /* @__PURE__ */ po(TS, [["render", DS], ["__scopeId", "data-v-64efa354"]]);
15077
15079
  const tt = (e) => e != null, go = (e) => typeof e == "function", er = (e) => e !== null && typeof e == "object", Vd = (e) => er(e) && go(e.then) && go(e.catch), oo = (e) => Object.prototype.toString.call(e) === "[object Date]" && !Number.isNaN(e.getTime());
15078
15080
  function PS(e) {
15079
15081
  return e = e.replace(/[^-|\d]/g, ""), /^((\+86)|(86))?(1)\d{10}$/.test(e) || /^0[0-9-]{10,13}$/.test(e);