magtool 1.6.40 → 1.6.41

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.
Files changed (2) hide show
  1. package/dist/cpt/Form.js +13 -7
  2. package/package.json +1 -1
package/dist/cpt/Form.js CHANGED
@@ -1,4 +1,4 @@
1
- import { defineComponent as y, reactive as O, getCurrentInstance as v, computed as b, watch as a, resolveComponent as S, createElementBlock as h, openBlock as j, createVNode as n, unref as l, withCtx as m, renderSlot as w } from "vue";
1
+ import { defineComponent as y, reactive as O, getCurrentInstance as v, computed as b, watch as a, resolveComponent as h, createElementBlock as S, openBlock as j, createVNode as n, unref as l, withCtx as m, renderSlot as w } from "vue";
2
2
  import { f as N } from "./chip.js";
3
3
  const V = { class: "MvcForm" }, x = y({
4
4
  name: "MvcForm"
@@ -17,10 +17,16 @@ const V = { class: "MvcForm" }, x = y({
17
17
  default: "large"
18
18
  }
19
19
  },
20
- setup(f, { expose: c, emit: u }) {
21
- const r = f, o = O({
20
+ setup(c, { expose: f, emit: u }) {
21
+ const r = c, o = O({
22
22
  form: {}
23
- }), { proxy: i } = v(), d = u, p = async () => await i.$refs.form.validate() ? _() : !1, _ = () => o.form, g = b(() => {
23
+ }), { proxy: i } = v(), d = u, p = async () => {
24
+ try {
25
+ return await i.$refs.form.validate(), _();
26
+ } catch {
27
+ return !1;
28
+ }
29
+ }, _ = () => o.form, g = b(() => {
24
30
  const e = {};
25
31
  for (let s in r.rules)
26
32
  e[s] = r.rules[s].map((t) => (t.message && (t.message = window.$l(t.message)), t));
@@ -43,11 +49,11 @@ const V = { class: "MvcForm" }, x = y({
43
49
  immediate: !0,
44
50
  deep: !0
45
51
  }
46
- ), c({
52
+ ), f({
47
53
  validate: p
48
54
  }), (e, s) => {
49
- const t = S("el-form");
50
- return j(), h("div", V, [
55
+ const t = h("el-form");
56
+ return j(), S("div", V, [
51
57
  n(t, {
52
58
  ref: "form",
53
59
  model: l(o).form,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "magtool",
3
3
  "packageManager": "yarn@4.4.1",
4
- "version": "1.6.40",
4
+ "version": "1.6.41",
5
5
  "author": "matt avis",
6
6
  "main": "./dist/index.js",
7
7
  "module": "./dist/index.js",