yqform-h5 0.1.54 → 0.1.56

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.
@@ -12368,6 +12368,10 @@ const BE = {
12368
12368
  },
12369
12369
  disableItem() {
12370
12370
  return this.enableForbid && this.item.noModify;
12371
+ },
12372
+ textRules() {
12373
+ const e = [{ required: this.item.required, message: this.item.emsg || "当前项不能为空" }];
12374
+ return this.item.type === "phone" && e.push({ pattern: /^1[3-9]\d{9}$/, message: "手机号格式不正确" }), e;
12371
12375
  }
12372
12376
  },
12373
12377
  methods: {
@@ -12632,7 +12636,7 @@ const BE = {
12632
12636
  created() {
12633
12637
  this.item.type === "rate" && (this.rateValue = 1), this.initDependValue(), this.item.type === "phone" && this.item.autoFill && this.item.autoFill.auto && this.item.autoFill.config && (this.textValue = this.item.autoFill.config()), this.item.type === "identity" && !this.item.emsg && (this.item.emsg = "身份证格式不正确");
12634
12638
  }
12635
- }, ba = (e) => (ld("data-v-0baa1e84"), e = e(), ud(), e), RE = {
12639
+ }, ba = (e) => (ld("data-v-f099d566"), e = e(), ud(), e), RE = {
12636
12640
  key: 0,
12637
12641
  class: "form-item-container"
12638
12642
  }, FE = {
@@ -12783,7 +12787,7 @@ function kx(e, t, n, o, a, s) {
12783
12787
  modelValue: a.textValue,
12784
12788
  "onUpdate:modelValue": t[2] || (t[2] = (O) => a.textValue = O),
12785
12789
  placeholder: n.item.placeholder,
12786
- rules: [{ required: n.item.required, message: n.item.emsg || "当前项不能为空" }],
12790
+ rules: s.textRules,
12787
12791
  [s.maxlength || ""]: n.item.limit,
12788
12792
  readonly: s.readonly,
12789
12793
  disabled: s.disableItem,
@@ -13245,7 +13249,7 @@ function kx(e, t, n, o, a, s) {
13245
13249
  }, 8, ["show"])
13246
13250
  ])) : Ce("", !0);
13247
13251
  }
13248
- const cm = /* @__PURE__ */ vo(BE, [["render", kx], ["__scopeId", "data-v-0baa1e84"]]);
13252
+ const cm = /* @__PURE__ */ vo(BE, [["render", kx], ["__scopeId", "data-v-f099d566"]]);
13249
13253
  /*!
13250
13254
  * vue-draggable-next v2.2.0
13251
13255
  * (c) 2023 Anish George
@@ -14973,11 +14977,11 @@ const gS = {
14973
14977
  this.noAnswerKey = a;
14974
14978
  });
14975
14979
  };
14976
- if (e.type === "idPicture")
14977
- return console.log("[ newText ] >", t), t && t.front && t.back ? !0 : (s(), !1);
14978
14980
  let u, d;
14979
- if (e.type !== "phone" && e.type !== "identity" && (u = (f = e.range) == null ? void 0 : f.min, d = (c = e.range) == null ? void 0 : c.max), console.log("[ value ] >", t), t.length === 0)
14981
+ if (e.type !== "phone" && e.type !== "identity" && (u = (f = e.range) == null ? void 0 : f.min, d = (c = e.range) == null ? void 0 : c.max), t.length === 0)
14980
14982
  return e.required ? (s(), !1) : !0;
14983
+ if (e.type === "idPicture")
14984
+ return t && t.front && t.back ? !0 : (s(), !1);
14981
14985
  if (e.type === "text" || e.type === "password") {
14982
14986
  const m = t.length;
14983
14987
  return u && m < u * 1 || d && m > d * 1 ? (s(!1), !1) : !0;
@@ -14986,7 +14990,10 @@ const gS = {
14986
14990
  return u && t * 1 < u * 1 || d && t * 1 > d * 1 ? (s(!1), !1) : !0;
14987
14991
  if (e.type === "identity") {
14988
14992
  const m = u_(t);
14989
- return console.log(m), m || s(), m;
14993
+ return m || s(), m;
14994
+ } else if (e.type === "phone") {
14995
+ const m = /^1[3-9]\d{9}$/.test(t);
14996
+ return m || s(), m;
14990
14997
  } else
14991
14998
  return !0;
14992
14999
  }
@@ -15126,7 +15133,7 @@ const gS = {
15126
15133
  },
15127
15134
  mounted() {
15128
15135
  }
15129
- }, pS = (e) => (ld("data-v-1a2c12d5"), e = e(), ud(), e), vS = { class: "main" }, yS = { class: "content-topimg" }, bS = {
15136
+ }, pS = (e) => (ld("data-v-2119be2c"), e = e(), ud(), e), vS = { class: "main" }, yS = { class: "content-topimg" }, bS = {
15130
15137
  key: 0,
15131
15138
  class: "header-img"
15132
15139
  }, wS = {
@@ -15246,7 +15253,7 @@ function TS(e, t, n, o, a, s) {
15246
15253
  ])) : Ce("", !0)
15247
15254
  ]);
15248
15255
  }
15249
- const OS = /* @__PURE__ */ vo(gS, [["render", TS], ["__scopeId", "data-v-1a2c12d5"]]);
15256
+ const OS = /* @__PURE__ */ vo(gS, [["render", TS], ["__scopeId", "data-v-2119be2c"]]);
15250
15257
  const DS = {
15251
15258
  name: "Content",
15252
15259
  emits: ["onSelect", "addFile", "submit", "edit", "handle"],