@aplus-frontend/ui 0.0.26 → 0.0.28

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 (77) hide show
  1. package/es/src/ap-action/group/index.vue.mjs +27 -31
  2. package/es/src/ap-action/item-dropdown/index.vue.mjs +14 -15
  3. package/es/src/ap-action/style/item-dropdown.css +2 -0
  4. package/es/src/ap-form/ap-form-item-group/index.vue.mjs +21 -21
  5. package/es/src/ap-form/ap-form-item.vue.mjs +72 -64
  6. package/es/src/ap-form/ap-form.vue.d.ts +13 -3
  7. package/es/src/ap-form/ap-form.vue2.mjs +91 -70
  8. package/es/src/ap-form/constant.d.ts +1 -0
  9. package/es/src/ap-form/constant.mjs +2 -1
  10. package/es/src/ap-form/context.d.ts +4 -3
  11. package/es/src/ap-form/hooks/use-watch.mjs +20 -16
  12. package/es/src/ap-form/interface.d.ts +35 -4
  13. package/es/src/ap-form/items/checkbox/index.vue.mjs +11 -10
  14. package/es/src/ap-form/items/date/index.vue.mjs +14 -13
  15. package/es/src/ap-form/items/date-range/index.vue.mjs +12 -11
  16. package/es/src/ap-form/items/number/index.vue.mjs +13 -12
  17. package/es/src/ap-form/items/radio/index.vue.mjs +4 -3
  18. package/es/src/ap-form/items/select/index.vue.mjs +3 -2
  19. package/es/src/ap-form/items/switch/index.vue.mjs +9 -8
  20. package/es/src/ap-form/items/text/index.vue2.mjs +15 -14
  21. package/es/src/ap-form/items/text/password.vue.mjs +1 -0
  22. package/es/src/ap-form/items/text-area/index.vue.mjs +7 -6
  23. package/es/src/ap-form/modal-form/index.vue.d.ts +1 -1
  24. package/es/src/ap-form/modal-form/index.vue.mjs +3 -3
  25. package/es/src/ap-table/constants.d.ts +132 -0
  26. package/es/src/ap-table/style/ap-table.css +11 -8
  27. package/es/src/business/expandAlert/ApExpandAlert.vue.d.ts +19 -1
  28. package/es/src/business/expandAlert/ApExpandAlert.vue2.mjs +53 -47
  29. package/es/src/business/expandAlert/interface.d.ts +4 -0
  30. package/es/src/business/index.d.ts +38 -7
  31. package/es/src/business/index.mjs +1 -1
  32. package/es/src/editable-table/form-item.vue.mjs +72 -74
  33. package/es/src/editable-table/style/index.css +13 -4
  34. package/es/src/locale/lang/en.mjs +2 -1
  35. package/es/src/locale/lang/zh-cn.mjs +2 -1
  36. package/es/src/theme/ap-action/item-dropdown.css +2 -0
  37. package/es/src/theme/ap-table/ap-table.css +11 -8
  38. package/es/src/theme/editable-table/index.css +13 -4
  39. package/lib/src/ap-action/group/index.vue.js +1 -1
  40. package/lib/src/ap-action/item-dropdown/index.vue.js +1 -1
  41. package/lib/src/ap-action/style/item-dropdown.css +2 -0
  42. package/lib/src/ap-form/ap-form-item-group/index.vue.js +1 -1
  43. package/lib/src/ap-form/ap-form-item.vue.js +1 -1
  44. package/lib/src/ap-form/ap-form.vue.d.ts +13 -3
  45. package/lib/src/ap-form/ap-form.vue2.js +1 -1
  46. package/lib/src/ap-form/constant.d.ts +1 -0
  47. package/lib/src/ap-form/constant.js +1 -1
  48. package/lib/src/ap-form/context.d.ts +4 -3
  49. package/lib/src/ap-form/hooks/use-watch.js +1 -1
  50. package/lib/src/ap-form/interface.d.ts +35 -4
  51. package/lib/src/ap-form/items/checkbox/index.vue.js +1 -1
  52. package/lib/src/ap-form/items/date/index.vue.js +1 -1
  53. package/lib/src/ap-form/items/date-range/index.vue.js +1 -1
  54. package/lib/src/ap-form/items/number/index.vue.js +1 -1
  55. package/lib/src/ap-form/items/radio/index.vue.js +1 -1
  56. package/lib/src/ap-form/items/select/index.vue.js +1 -1
  57. package/lib/src/ap-form/items/switch/index.vue.js +1 -1
  58. package/lib/src/ap-form/items/text/index.vue2.js +1 -1
  59. package/lib/src/ap-form/items/text/password.vue.js +1 -1
  60. package/lib/src/ap-form/items/text-area/index.vue.js +1 -1
  61. package/lib/src/ap-form/modal-form/index.vue.d.ts +1 -1
  62. package/lib/src/ap-form/modal-form/index.vue.js +1 -1
  63. package/lib/src/ap-table/constants.d.ts +132 -0
  64. package/lib/src/ap-table/style/ap-table.css +11 -8
  65. package/lib/src/business/expandAlert/ApExpandAlert.vue.d.ts +19 -1
  66. package/lib/src/business/expandAlert/ApExpandAlert.vue2.js +1 -1
  67. package/lib/src/business/expandAlert/interface.d.ts +4 -0
  68. package/lib/src/business/index.d.ts +38 -7
  69. package/lib/src/business/index.js +1 -1
  70. package/lib/src/editable-table/form-item.vue.js +1 -1
  71. package/lib/src/editable-table/style/index.css +13 -4
  72. package/lib/src/locale/lang/en.js +1 -1
  73. package/lib/src/locale/lang/zh-cn.js +1 -1
  74. package/lib/src/theme/ap-action/item-dropdown.css +2 -0
  75. package/lib/src/theme/ap-table/ap-table.css +11 -8
  76. package/lib/src/theme/editable-table/index.css +13 -4
  77. package/package.json +4 -3
@@ -1,16 +1,17 @@
1
- import { defineComponent as h, computed as s, unref as i, openBlock as t, createBlock as r, withCtx as a, createElementBlock as m, Fragment as f, renderList as k, mergeProps as c, createVNode as A, createCommentVNode as v } from "vue";
2
- import { Space as w } from "ant-design-vue";
3
- import { MoreOutlined as y } from "@ant-design/icons-vue";
1
+ import { defineComponent as h, computed as s, unref as c, openBlock as t, createBlock as r, withCtx as k, createElementBlock as u, Fragment as a, renderList as A, mergeProps as i, createCommentVNode as v } from "vue";
2
+ import { Space as y } from "ant-design-vue";
4
3
  import "../item/index.vue.mjs";
5
4
  import "../item-modal/index.vue2.mjs";
6
5
  import "../item-popconfirm/index.vue2.mjs";
7
6
  import "../item-dropdown/index.vue2.mjs";
8
- import { isUndefined as $ } from "lodash-unified";
7
+ import "../../config-provider/index.mjs";
8
+ import { isUndefined as w } from "lodash-unified";
9
+ import { useLocale as x } from "../../config-provider/hooks/use-locale.mjs";
9
10
  import p from "../item-dropdown/index.vue.mjs";
10
- import b from "../item-modal/index.vue.mjs";
11
- import B from "../item-popconfirm/index.vue.mjs";
12
- import C from "../item/index.vue2.mjs";
13
- const U = /* @__PURE__ */ h({
11
+ import $ from "../item-modal/index.vue.mjs";
12
+ import b from "../item-popconfirm/index.vue.mjs";
13
+ import B from "../item/index.vue2.mjs";
14
+ const q = /* @__PURE__ */ h({
14
15
  name: "ApActionGroup",
15
16
  __name: "index",
16
17
  props: {
@@ -19,13 +20,13 @@ const U = /* @__PURE__ */ h({
19
20
  placement: { default: "bottomRight" },
20
21
  actions: { default: () => [] }
21
22
  },
22
- setup(_) {
23
- const n = _, l = s(
23
+ setup(f) {
24
+ const n = f, { t: _ } = x(), m = s(
24
25
  () => n.actions.filter(
25
- (e) => e.visible || $(e.visible)
26
+ (e) => e.visible || w(e.visible)
26
27
  )
27
- ), d = s(() => i(l).length > n.count), u = s(() => {
28
- const e = i(l);
28
+ ), g = s(() => c(m).length > n.count), l = s(() => {
29
+ const e = c(m);
29
30
  return e.length <= n.count ? {
30
31
  showActions: e,
31
32
  menuActions: []
@@ -34,43 +35,38 @@ const U = /* @__PURE__ */ h({
34
35
  menuActions: e.slice(n.count - 1)
35
36
  };
36
37
  });
37
- return (e, P) => (t(), r(i(w), {
38
+ return (e, C) => (t(), r(c(y), {
38
39
  size: 16,
39
40
  align: "center"
40
41
  }, {
41
- default: a(() => [
42
- (t(!0), m(f, null, k(u.value.showActions, (o, g) => (t(), m(f, { key: g }, [
43
- o.actions ? (t(), r(p, c({
42
+ default: k(() => [
43
+ (t(!0), u(a, null, A(l.value.showActions, (o, d) => (t(), u(a, { key: d }, [
44
+ o.actions ? (t(), r(p, i({
44
45
  key: 0,
45
46
  ref_for: !0
46
- }, o), null, 16)) : o.modalProps ? (t(), r(b, c({
47
+ }, o), null, 16)) : o.modalProps ? (t(), r($, i({
47
48
  key: 1,
48
49
  ref_for: !0
49
- }, o), null, 16)) : o.popconfirmProps ? (t(), r(B, c({
50
+ }, o), null, 16)) : o.popconfirmProps ? (t(), r(b, i({
50
51
  key: 2,
51
52
  ref_for: !0
52
- }, o), null, 16)) : (t(), r(C, c({
53
+ }, o), null, 16)) : (t(), r(B, i({
53
54
  key: 3,
54
55
  ref_for: !0
55
56
  }, o), null, 16))
56
57
  ], 64))), 128)),
57
- d.value ? (t(), r(p, {
58
+ g.value ? (t(), r(p, {
58
59
  key: 0,
59
- actions: u.value.menuActions,
60
- "show-icon": !1,
60
+ actions: l.value.menuActions,
61
61
  placement: e.placement,
62
- trigger: e.trigger
63
- }, {
64
- default: a(() => [
65
- A(i(y), { rotate: 90 })
66
- ]),
67
- _: 1
68
- }, 8, ["actions", "placement", "trigger"])) : v("", !0)
62
+ trigger: e.trigger,
63
+ text: c(_)("ap.common.more")
64
+ }, null, 8, ["actions", "placement", "trigger", "text"])) : v("", !0)
69
65
  ]),
70
66
  _: 1
71
67
  }));
72
68
  }
73
69
  });
74
70
  export {
75
- U as default
71
+ q as default
76
72
  };
@@ -1,13 +1,13 @@
1
- import { defineComponent as _, ref as v, computed as k, openBlock as t, createBlock as l, unref as r, withCtx as n, createVNode as u, createElementBlock as w, Fragment as B, renderList as b, normalizeClass as m, mergeProps as i, createElementVNode as A, normalizeProps as C, guardReactiveProps as P, renderSlot as D, createCommentVNode as I } from "vue";
1
+ import { defineComponent as _, ref as v, computed as k, openBlock as t, createBlock as l, unref as r, withCtx as n, createVNode as u, createElementBlock as w, Fragment as A, renderList as B, normalizeClass as s, mergeProps as i, createElementVNode as b, normalizeProps as C, guardReactiveProps as I, renderSlot as P, createCommentVNode as D } from "vue";
2
2
  import { Dropdown as N, Menu as $, MenuItem as h } from "ant-design-vue";
3
- import { DownOutlined as V } from "@ant-design/icons-vue";
4
3
  import "../item/index.vue.mjs";
5
4
  import "../item-modal/index.vue2.mjs";
6
5
  import "../item-popconfirm/index.vue2.mjs";
6
+ import { IconApAdLineDown as L } from "@aplus-frontend/icon";
7
7
  import "../../config-provider/index.mjs";
8
- import { isUndefined as z, omit as E } from "lodash-unified";
8
+ import { isUndefined as V, omit as z } from "lodash-unified";
9
9
  import "../style/item-dropdown.css";
10
- import { useNamespace as L } from "../../config-provider/hooks/use-namespace.mjs";
10
+ import { useNamespace as E } from "../../config-provider/hooks/use-namespace.mjs";
11
11
  import M from "../item-modal/index.vue.mjs";
12
12
  import U from "../item-popconfirm/index.vue.mjs";
13
13
  import d from "../item/index.vue2.mjs";
@@ -27,7 +27,7 @@ const W = /* @__PURE__ */ _({
27
27
  loading: { type: Boolean, default: !1 }
28
28
  },
29
29
  setup(c) {
30
- const f = c, p = v(!1), { e: s } = L("action-item-dropdown"), g = k(() => f.actions.filter((e) => e.visible || z(e.visible)).map((e) => ({
30
+ const f = c, p = v(!1), { e: m } = E("action-item-dropdown"), g = k(() => f.actions.filter((e) => e.visible || V(e.visible)).map((e) => ({
31
31
  ...e,
32
32
  onAction: async (a) => {
33
33
  var o;
@@ -47,9 +47,9 @@ const W = /* @__PURE__ */ _({
47
47
  overlay: n(() => [
48
48
  u(r($), null, {
49
49
  default: n(() => [
50
- (t(!0), w(B, null, b(g.value, (o, y) => (t(), l(r(h), {
50
+ (t(!0), w(A, null, B(g.value, (o, y) => (t(), l(r(h), {
51
51
  key: y,
52
- class: m(r(s)("item"))
52
+ class: s(r(m)("item"))
53
53
  }, {
54
54
  default: n(() => [
55
55
  o.modalProps ? (t(), l(M, i({
@@ -70,20 +70,19 @@ const W = /* @__PURE__ */ _({
70
70
  })
71
71
  ]),
72
72
  default: n(() => [
73
- A("span", {
74
- class: m(r(s)("wrapper"))
73
+ b("span", {
74
+ class: s(r(m)("wrapper"))
75
75
  }, [
76
- u(d, C(P(r(E)(f, ["actions", "trigger", "placement"]))), {
76
+ u(d, C(I(r(z)(f, ["actions", "trigger", "placement"]))), {
77
77
  default: n(() => [
78
- D(e.$slots, "default")
78
+ P(e.$slots, "default")
79
79
  ]),
80
80
  _: 3
81
81
  }, 16),
82
- e.showIcon ? (t(), l(r(V), {
82
+ e.showIcon ? (t(), l(r(L), {
83
83
  key: 0,
84
- class: m(r(s)("icon")),
85
- style: { color: "#0070ff" }
86
- }, null, 8, ["class"])) : I("", !0)
84
+ class: s(r(m)("icon"))
85
+ }, null, 8, ["class"])) : D("", !0)
87
86
  ], 2)
88
87
  ]),
89
88
  _: 3
@@ -7,5 +7,7 @@
7
7
  align-items: center;
8
8
  }
9
9
  .aplus-action-item-dropdown__icon {
10
+ color: #0070ff;
10
11
  margin-left: 4px;
12
+ font-size: 14px;
11
13
  }
@@ -1,15 +1,15 @@
1
- import { isVNode as w, defineComponent as _, useSlots as k, watch as b, onBeforeUpdate as h, shallowRef as x, computed as B, unref as p, createVNode as R, mergeProps as m, openBlock as s, createBlock as i, withCtx as S, createElementBlock as j, Fragment as v, renderList as N, resolveDynamicComponent as P } from "vue";
2
- import { Col as F, Row as I } from "ant-design-vue";
3
- import { pick as O } from "lodash-unified";
4
- import { apFormItemColPropKeys as V } from "../constant.mjs";
5
- import { genRealChildren as l, buildColSpan as A } from "./helper.mjs";
1
+ import { isVNode as g, defineComponent as _, useSlots as k, watch as b, onBeforeUpdate as h, shallowRef as x, computed as B, unref as p, createVNode as R, mergeProps as m, openBlock as s, createBlock as i, withCtx as S, createElementBlock as j, Fragment as v, renderList as N, resolveDynamicComponent as P } from "vue";
2
+ import { Col as $, Row as D } from "ant-design-vue";
3
+ import { pick as F } from "lodash-unified";
4
+ import { apFormItemColPropKeys as I } from "../constant.mjs";
5
+ import { genRealChildren as l, buildColSpan as O } from "./helper.mjs";
6
6
  import "../../config-provider/index.mjs";
7
7
  import "../style/ap-form-item-group.css";
8
- import { useNamespace as D } from "../../config-provider/hooks/use-namespace.mjs";
9
- function E(r) {
10
- return typeof r == "function" || Object.prototype.toString.call(r) === "[object Object]" && !w(r);
8
+ import { useNamespace as V } from "../../config-provider/hooks/use-namespace.mjs";
9
+ function A(r) {
10
+ return typeof r == "function" || Object.prototype.toString.call(r) === "[object Object]" && !g(r);
11
11
  }
12
- const M = /* @__PURE__ */ _({
12
+ const J = /* @__PURE__ */ _({
13
13
  name: "ApFormItemGroup",
14
14
  __name: "index",
15
15
  props: {
@@ -30,7 +30,7 @@ const M = /* @__PURE__ */ _({
30
30
  setup(r) {
31
31
  const {
32
32
  b: c
33
- } = D("ap-form-item-group"), {
33
+ } = V("ap-form-item-group"), {
34
34
  countPerRow: f,
35
35
  ...d
36
36
  } = r, n = k();
@@ -39,26 +39,26 @@ const M = /* @__PURE__ */ _({
39
39
  }), h(() => {
40
40
  a.value = l(n.default());
41
41
  });
42
- const a = x(l(n.default())), y = B(() => p(a).map((e, u) => {
43
- const t = e.props, o = O(t, V), C = o != null && o.span ? {} : A(f), g = !!(t != null && t.hidden);
44
- return R(F, m({
45
- key: u
46
- }, C, o, {
47
- class: g ? c("col-hidden") : ""
48
- }), E(e) ? e : {
42
+ const a = x(l(n.default())), w = B(() => p(a).map((e, u) => {
43
+ const t = e.props, o = F(t, I), y = o != null && o.span ? {} : O(f), C = !!(t != null && t.hidden);
44
+ return R($, m({
45
+ key: `${u}-${Date.now()}`
46
+ }, y, o, {
47
+ class: C ? c("col-hidden") : ""
48
+ }), A(e) ? e : {
49
49
  default: () => [e]
50
50
  });
51
51
  }));
52
- return (e, u) => (s(), i(p(I), m({
52
+ return (e, u) => (s(), i(p(D), m({
53
53
  class: p(c)()
54
54
  }, d), {
55
- default: S(() => [(s(!0), j(v, null, N(y.value, (t, o) => (s(), i(P(t), {
56
- key: o
55
+ default: S(() => [(s(!0), j(v, null, N(w.value, (t, o) => (s(), i(P(t), {
56
+ key: `${o}-${Date.now()}`
57
57
  }))), 128))]),
58
58
  _: 1
59
59
  }, 16, ["class"]));
60
60
  }
61
61
  });
62
62
  export {
63
- M as default
63
+ J as default
64
64
  };
@@ -1,14 +1,14 @@
1
- import { defineComponent as j, useSlots as q, ref as m, computed as B, unref as o, watch as D, cloneVNode as E, openBlock as h, createBlock as C, mergeProps as K, createSlots as O, withCtx as i, resolveDynamicComponent as Q, createCommentVNode as U, createElementVNode as w, normalizeClass as G, createVNode as g, normalizeStyle as H, renderList as J, renderSlot as W, normalizeProps as X, guardReactiveProps as Y } from "vue";
2
- import { Form as Z, Tooltip as M } from "ant-design-vue";
3
- import { useToken as ee } from "ant-design-vue/es/theme/internal";
4
- import { isArray as oe, omit as k } from "lodash-unified";
5
- import { apFormItemColPropKeys as te } from "./constant.mjs";
6
- import { QuestionCircleOutlined as re } from "@ant-design/icons-vue";
1
+ import { defineComponent as q, useSlots as D, ref as f, onMounted as E, computed as h, unref as t, watch as K, cloneVNode as O, openBlock as C, createBlock as g, mergeProps as Q, createSlots as U, withCtx as i, resolveDynamicComponent as w, createCommentVNode as G, createElementVNode as H, normalizeClass as J, createVNode as V, normalizeStyle as M, renderList as W, renderSlot as X, normalizeProps as Y, guardReactiveProps as Z } from "vue";
2
+ import { Form as ee, Tooltip as oe } from "ant-design-vue";
3
+ import { useToken as te } from "ant-design-vue/es/theme/internal";
4
+ import { isArray as le, omit as k } from "lodash-unified";
5
+ import { apFormItemColPropKeys as re } from "./constant.mjs";
6
+ import { QuestionCircleOutlined as ae } from "@ant-design/icons-vue";
7
7
  import "../config-provider/index.mjs";
8
- import { useInjectForm as le } from "./context.mjs";
8
+ import { useInjectForm as ne } from "./context.mjs";
9
9
  import "./style/ap-form-item.css";
10
- import { useNamespace as ae } from "../config-provider/hooks/use-namespace.mjs";
11
- const ye = /* @__PURE__ */ j({
10
+ import { useNamespace as ue } from "../config-provider/hooks/use-namespace.mjs";
11
+ const be = /* @__PURE__ */ q({
12
12
  name: "ApFormItem",
13
13
  __name: "ap-form-item",
14
14
  props: {
@@ -47,95 +47,103 @@ const ye = /* @__PURE__ */ j({
47
47
  xxl: {},
48
48
  flex: {},
49
49
  bordered: { type: Boolean, default: !1 },
50
- valuePropName: { default: "value" }
50
+ valuePropName: { default: "value" },
51
+ initialValue: {}
51
52
  },
52
53
  setup(N, { expose: P }) {
53
- var y, F;
54
- const t = N, r = q(), { model: u, updateModel: d } = le(), { m: f, b: x } = ae("ap-form-item"), s = m(!1), l = m(), [, V] = ee(), p = B(() => t.name ? oe(t.name) ? t.name.reduce((e, a) => e == null ? void 0 : e[a], o(u)) : u == null ? void 0 : u.value[t.name] : null), c = m((F = (y = r.default) == null ? void 0 : y.call(r)) == null ? void 0 : F[0]);
55
- D(
54
+ var F, b;
55
+ const o = N, l = D(), { model: u, updateModel: d, internalInstance: s } = ne(), { m: p, b: x } = ue("ap-form-item"), m = f(!1), r = f(), [, S] = te();
56
+ E(() => {
57
+ s == null || s.registerField({
58
+ name: o.name,
59
+ initialValue: o.initialValue
60
+ });
61
+ });
62
+ const c = h(() => o.name ? le(o.name) ? o.name.reduce((e, a) => e == null ? void 0 : e[a], t(u)) : u == null ? void 0 : u.value[o.name] : null), v = f((b = (F = l.default) == null ? void 0 : F.call(l)) == null ? void 0 : b[0]);
63
+ K(
56
64
  () => {
57
65
  var e;
58
- return (e = r.default) == null ? void 0 : e.call(r);
66
+ return (e = l.default) == null ? void 0 : e.call(l);
59
67
  },
60
68
  (e) => {
61
- c.value = e == null ? void 0 : e[0];
69
+ v.value = e == null ? void 0 : e[0];
62
70
  }
63
71
  );
64
72
  function I(e) {
65
- d == null || d(t.name, e);
66
- }
67
- function S() {
68
- s.value = !0;
73
+ d == null || d(o.name, e);
69
74
  }
70
75
  function _() {
71
- s.value = !1;
76
+ m.value = !0;
72
77
  }
73
- const v = B(() => {
78
+ function z() {
79
+ m.value = !1;
80
+ }
81
+ const y = h(() => {
74
82
  var a, n;
75
- if (!t.name)
76
- return (a = r.default()) == null ? void 0 : a[0];
77
- const e = o(c);
78
- return e ? E(e, {
79
- [t.valuePropName]: o(p),
80
- [`onUpdate:${t.valuePropName}`]: I,
81
- bordered: t.bordered ? !1 : (n = e == null ? void 0 : e.props) == null ? void 0 : n.bordered,
82
- onFocus: S,
83
- onBlur: _
83
+ if (!o.name)
84
+ return (a = l.default()) == null ? void 0 : a[0];
85
+ const e = t(v);
86
+ return e ? O(e, {
87
+ [o.valuePropName]: t(c),
88
+ [`onUpdate:${o.valuePropName}`]: I,
89
+ bordered: o.bordered ? !1 : (n = e == null ? void 0 : e.props) == null ? void 0 : n.bordered,
90
+ onFocus: _,
91
+ onBlur: z
84
92
  }) : null;
85
93
  });
86
- function z() {
87
- var e;
88
- (e = l.value) == null || e.onFieldBlur();
89
- }
90
94
  function A() {
91
95
  var e;
92
- (e = l.value) == null || e.onFieldChange();
96
+ (e = r.value) == null || e.onFieldBlur();
93
97
  }
94
98
  function R() {
95
99
  var e;
96
- (e = l.value) == null || e.clearValidate();
100
+ (e = r.value) == null || e.onFieldChange();
97
101
  }
98
102
  function T() {
99
103
  var e;
100
- (e = l.value) == null || e.resetField();
104
+ (e = r.value) == null || e.clearValidate();
101
105
  }
102
106
  function L() {
103
- return o(p);
107
+ var e;
108
+ (e = r.value) == null || e.resetField();
109
+ }
110
+ function $() {
111
+ return t(c);
104
112
  }
105
113
  return P({
106
- onFieldBlur: z,
107
- onFieldChange: A,
108
- clearValidate: R,
109
- resetField: T,
110
- getFieldValue: L
111
- }), (e, a) => (h(), C(o(Z).Item, K({
114
+ onFieldBlur: A,
115
+ onFieldChange: R,
116
+ clearValidate: T,
117
+ resetField: L,
118
+ getFieldValue: $
119
+ }), (e, a) => (C(), g(t(ee).Item, Q({
112
120
  ref_key: "formItemRef",
113
- ref: l
114
- }, o(k)(t, [...o(te), "tooltip"]), {
121
+ ref: r
122
+ }, t(k)(o, [...t(re), "tooltip"]), {
115
123
  class: {
116
- [o(f)("bordered")]: e.bordered,
117
- [o(f)("focused")]: e.bordered && s.value,
118
- [o(x)()]: !0
124
+ [t(p)("bordered")]: e.bordered,
125
+ [t(p)("focused")]: e.bordered && m.value,
126
+ [t(x)()]: !0
119
127
  },
120
- colon: e.bordered ? !1 : t.colon
121
- }), O({
128
+ colon: e.bordered ? !1 : o.colon
129
+ }), U({
122
130
  default: i(() => [
123
- v.value ? (h(), C(Q(v.value), { key: 0 })) : U("", !0)
131
+ y.value ? (C(), g(w(y.value), { key: 0 })) : G("", !0)
124
132
  ]),
125
133
  _: 2
126
134
  }, [
127
- t.tooltip ? {
135
+ o.tooltip ? {
128
136
  name: "tooltip",
129
137
  fn: i(({ class: n }) => [
130
- w("span", {
131
- class: G(n)
138
+ H("span", {
139
+ class: J(n)
132
140
  }, [
133
- g(o(M), {
134
- title: t.tooltip
141
+ V(t(oe), {
142
+ title: o.tooltip
135
143
  }, {
136
144
  default: i(() => [
137
- g(o(re), {
138
- style: H({ color: o(V).colorPrimary })
145
+ V(t(ae), {
146
+ style: M({ color: t(S).colorPrimary })
139
147
  }, null, 8, ["style"])
140
148
  ]),
141
149
  _: 1
@@ -144,15 +152,15 @@ const ye = /* @__PURE__ */ j({
144
152
  ]),
145
153
  key: "0"
146
154
  } : void 0,
147
- J(o(k)(r, "default"), (n, b) => ({
148
- name: b,
149
- fn: i(($) => [
150
- W(e.$slots, b, X(Y($ || {})))
155
+ W(t(k)(l, "default"), (n, B) => ({
156
+ name: B,
157
+ fn: i((j) => [
158
+ X(e.$slots, B, Y(Z(j || {})))
151
159
  ])
152
160
  }))
153
161
  ]), 1040, ["class", "colon"]));
154
162
  }
155
163
  });
156
164
  export {
157
- ye as default
165
+ be as default
158
166
  };
@@ -1,11 +1,20 @@
1
- import { ApFormProps, WatchFunc } from './interface';
1
+ import { ApFormProps, RegistedFieldType, WatchFunc } from './interface';
2
2
  import { InternalNamePath, NamePath, ValidateOptions, FormLabelAlign } from 'ant-design-vue/es/form/interface';
3
3
  import { DefineComponent, ComponentOptionsMixin, PublicProps, ExtractPropTypes, PropType } from 'vue';
4
4
 
5
5
  /**
6
6
  * 订阅事件
7
7
  */
8
- declare function registerWatch(callback: WatchFunc): () => void;
8
+ declare function registerWatch(callback: WatchFunc, inner: boolean): () => void;
9
+ /**
10
+ * 注册表单项
11
+ * @param field
12
+ */
13
+ declare function registerField({ initialValue, name }: RegistedFieldType): void;
14
+ declare function getInternalInstance(mark: string): {
15
+ registerField: typeof registerField;
16
+ registerWatch: typeof registerWatch;
17
+ } | undefined;
9
18
  declare const _default: __VLS_WithTemplateSlots< DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<ApFormProps>, {
10
19
  layout: string;
11
20
  hideRequiredMark: boolean;
@@ -14,7 +23,7 @@ declare const _default: __VLS_WithTemplateSlots< DefineComponent<__VLS_WithDefau
14
23
  validateOnRuleChange: boolean;
15
24
  validateTrigger: string;
16
25
  }>, {
17
- resetFields: (name?: NamePath | undefined) => void;
26
+ resetFields: () => void;
18
27
  clearValidate: (name?: NamePath | undefined) => void;
19
28
  validateFields: (nameList?: string | NamePath[] | undefined, options?: ValidateOptions | undefined) => Promise<{
20
29
  [key: string]: any;
@@ -29,6 +38,7 @@ declare const _default: __VLS_WithTemplateSlots< DefineComponent<__VLS_WithDefau
29
38
  setFieldsValue: (values: Record<string, any>) => void;
30
39
  setFieldValue: (key: any, newValue: any) => void;
31
40
  registerWatch: typeof registerWatch;
41
+ getInternalInstance: typeof getInternalInstance;
32
42
  }, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly< ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<ApFormProps>, {
33
43
  layout: string;
34
44
  hideRequiredMark: boolean;