@aplus-frontend/ui 0.3.0 → 0.3.2

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 (139) hide show
  1. package/es/src/ap-action/item/index.vue2.mjs +11 -11
  2. package/es/src/ap-action/item-popconfirm/index.vue.mjs +2 -2
  3. package/es/src/ap-descriptions/ap-descriptions.vue.mjs +24 -24
  4. package/es/src/ap-drawer/utils/createDrawer.mjs +10 -10
  5. package/es/src/ap-field/checkbox/index.vue.mjs +3 -3
  6. package/es/src/ap-field/date/index.vue.mjs +2 -2
  7. package/es/src/ap-field/date-range/index.vue.mjs +2 -2
  8. package/es/src/ap-field/number/index.vue.mjs +3 -3
  9. package/es/src/ap-field/radio/index.vue.mjs +5 -5
  10. package/es/src/ap-field/rate/index.vue.mjs +4 -4
  11. package/es/src/ap-field/segmented/index.vue.mjs +3 -3
  12. package/es/src/ap-field/select/index.vue.mjs +4 -4
  13. package/es/src/ap-field/slider/index.vue.mjs +3 -3
  14. package/es/src/ap-field/switch/index.vue.mjs +4 -4
  15. package/es/src/ap-field/text-area/index.vue.mjs +3 -3
  16. package/es/src/ap-form/ap-form.vue.d.ts +5 -6
  17. package/es/src/ap-form/ap-form.vue2.mjs +5 -5
  18. package/es/src/ap-form/drawer-form/index.vue.d.ts +4 -4
  19. package/es/src/ap-form/drawer-form/index.vue.mjs +2 -2
  20. package/es/src/ap-form/interface.d.ts +12 -3
  21. package/es/src/ap-form/modal-form/index.vue.d.ts +4 -4
  22. package/es/src/ap-form/modal-form/index.vue.mjs +3 -3
  23. package/es/src/ap-form/search-form/index.vue.d.ts +5 -5
  24. package/es/src/ap-form/search-form/index.vue.mjs +2 -2
  25. package/es/src/ap-info-layout/ap-info-layout-admin/ApInfoLayoutAdmin.vue2.mjs +6 -6
  26. package/es/src/ap-list/index.vue.mjs +27 -27
  27. package/es/src/ap-modal/utils/createModal.mjs +10 -10
  28. package/es/src/ap-scroll-bar/ap-scroll-bar.vue2.mjs +3 -3
  29. package/es/src/ap-table/ap-table.vue2.mjs +3 -3
  30. package/es/src/ap-table/components/index/index.vue2.mjs +3 -3
  31. package/es/src/ap-table/components/setting/modal/index.vue2.mjs +4 -4
  32. package/es/src/ap-table/components/setting/select-group/index.vue2.mjs +2 -2
  33. package/es/src/ap-table/components/setting/sortable/index.vue2.mjs +3 -3
  34. package/es/src/ap-table/components/setting/sortable/item.vue2.mjs +8 -8
  35. package/es/src/ap-table/components/setting/sorter/index.vue2.mjs +6 -6
  36. package/es/src/ap-table/components/status/index.vue2.mjs +4 -4
  37. package/es/src/ap-table/hooks/use-table-content-height.mjs +13 -11
  38. package/es/src/ap-tag/ap-tag-group.vue.mjs +1 -1
  39. package/es/src/ap-upload/apUpload.vue.d.ts +57 -8
  40. package/es/src/ap-upload/apUpload.vue.mjs +56 -37
  41. package/es/src/ap-upload/components/MultipleFile.vue2.mjs +10 -10
  42. package/es/src/ap-upload/components/Picture.vue2.mjs +26 -26
  43. package/es/src/ap-upload/components/SingleFile.vue2.mjs +27 -27
  44. package/es/src/business/ap-appendix/ap-appendix.vue2.mjs +49 -49
  45. package/es/src/business/ap-batch-action-group/ApBatchActionGroup.vue2.mjs +10 -10
  46. package/es/src/business/ap-expand-alert/ApExpandAlert.vue2.mjs +5 -5
  47. package/es/src/business/ap-export-group/ApExportGroup.vue2.mjs +11 -11
  48. package/es/src/business/ap-group-search/ap-group-search.vue.d.ts +1 -1
  49. package/es/src/business/ap-group-search/ap-group-search.vue2.mjs +26 -26
  50. package/es/src/business/ap-group-search/extension-select/index.vue2.mjs +15 -15
  51. package/es/src/business/ap-group-search/index.d.ts +1 -1
  52. package/es/src/business/ap-group-search/popover-select/index.vue2.mjs +15 -15
  53. package/es/src/business/ap-image/ApImage.vue2.mjs +28 -28
  54. package/es/src/business/ap-summary/ap-summary.vue2.mjs +1 -1
  55. package/es/src/business/ap-table-modal/table-modal.vue2.mjs +8 -9
  56. package/es/src/business/ap-upload-file/ap-upload-single/ap-upload-single.vue.d.ts +5 -2
  57. package/es/src/business/ap-upload-file/ap-upload-single/ap-upload-single.vue.mjs +74 -70
  58. package/es/src/business/ap-upload-file/hook/useProps.mjs +8 -8
  59. package/es/src/business/ap-upload-file/icon/file-icon.vue.mjs +1 -1
  60. package/es/src/business/ap-upload-file/interface.d.ts +2 -0
  61. package/es/src/business/ap-upload-file/utils/fileList.d.ts +2 -2
  62. package/es/src/business/ap-upload-file/utils/fileList.mjs +12 -12
  63. package/es/src/business/ap-upload-file/utils/upload.d.ts +3 -0
  64. package/es/src/business/ap-upload-file/utils/upload.mjs +23 -23
  65. package/es/src/business/batch-input-group/index.vue.mjs +5 -5
  66. package/es/src/business/batch-input-group/popover-input/index.vue2.mjs +15 -15
  67. package/es/src/editable-table/form-item.vue.mjs +3 -3
  68. package/es/src/editable-table/index.vue.mjs +6 -6
  69. package/es/src/work-order-modal/work-order-modal.vue.mjs +28 -28
  70. package/lib/src/ap-action/item/index.vue2.js +1 -1
  71. package/lib/src/ap-action/item-popconfirm/index.vue.js +1 -1
  72. package/lib/src/ap-descriptions/ap-descriptions.vue.js +1 -1
  73. package/lib/src/ap-drawer/utils/createDrawer.js +1 -1
  74. package/lib/src/ap-field/checkbox/index.vue.js +1 -1
  75. package/lib/src/ap-field/date/index.vue.js +1 -1
  76. package/lib/src/ap-field/date-range/index.vue.js +1 -1
  77. package/lib/src/ap-field/number/index.vue.js +1 -1
  78. package/lib/src/ap-field/radio/index.vue.js +1 -1
  79. package/lib/src/ap-field/rate/index.vue.js +1 -1
  80. package/lib/src/ap-field/segmented/index.vue.js +1 -1
  81. package/lib/src/ap-field/select/index.vue.js +1 -1
  82. package/lib/src/ap-field/slider/index.vue.js +1 -1
  83. package/lib/src/ap-field/switch/index.vue.js +1 -1
  84. package/lib/src/ap-field/text-area/index.vue.js +1 -1
  85. package/lib/src/ap-form/ap-form.vue.d.ts +5 -6
  86. package/lib/src/ap-form/ap-form.vue2.js +1 -1
  87. package/lib/src/ap-form/drawer-form/index.vue.d.ts +4 -4
  88. package/lib/src/ap-form/drawer-form/index.vue.js +1 -1
  89. package/lib/src/ap-form/interface.d.ts +12 -3
  90. package/lib/src/ap-form/modal-form/index.vue.d.ts +4 -4
  91. package/lib/src/ap-form/modal-form/index.vue.js +1 -1
  92. package/lib/src/ap-form/search-form/index.vue.d.ts +5 -5
  93. package/lib/src/ap-form/search-form/index.vue.js +1 -1
  94. package/lib/src/ap-info-layout/ap-info-layout-admin/ApInfoLayoutAdmin.vue2.js +1 -1
  95. package/lib/src/ap-list/index.vue.js +1 -1
  96. package/lib/src/ap-modal/utils/createModal.js +1 -1
  97. package/lib/src/ap-scroll-bar/ap-scroll-bar.vue2.js +1 -1
  98. package/lib/src/ap-table/ap-table.vue2.js +1 -1
  99. package/lib/src/ap-table/components/index/index.vue2.js +1 -1
  100. package/lib/src/ap-table/components/setting/modal/index.vue2.js +1 -1
  101. package/lib/src/ap-table/components/setting/select-group/index.vue2.js +1 -1
  102. package/lib/src/ap-table/components/setting/sortable/index.vue2.js +1 -1
  103. package/lib/src/ap-table/components/setting/sortable/item.vue2.js +1 -1
  104. package/lib/src/ap-table/components/setting/sorter/index.vue2.js +1 -1
  105. package/lib/src/ap-table/components/status/index.vue2.js +1 -1
  106. package/lib/src/ap-table/hooks/use-table-content-height.js +1 -1
  107. package/lib/src/ap-tag/ap-tag-group.vue.js +1 -1
  108. package/lib/src/ap-upload/apUpload.vue.d.ts +57 -8
  109. package/lib/src/ap-upload/apUpload.vue.js +1 -1
  110. package/lib/src/ap-upload/components/MultipleFile.vue2.js +1 -1
  111. package/lib/src/ap-upload/components/Picture.vue2.js +1 -1
  112. package/lib/src/ap-upload/components/SingleFile.vue2.js +1 -1
  113. package/lib/src/business/ap-appendix/ap-appendix.vue2.js +1 -1
  114. package/lib/src/business/ap-batch-action-group/ApBatchActionGroup.vue2.js +1 -1
  115. package/lib/src/business/ap-expand-alert/ApExpandAlert.vue2.js +1 -1
  116. package/lib/src/business/ap-export-group/ApExportGroup.vue2.js +1 -1
  117. package/lib/src/business/ap-group-search/ap-group-search.vue.d.ts +1 -1
  118. package/lib/src/business/ap-group-search/ap-group-search.vue2.js +1 -1
  119. package/lib/src/business/ap-group-search/extension-select/index.vue2.js +1 -1
  120. package/lib/src/business/ap-group-search/index.d.ts +1 -1
  121. package/lib/src/business/ap-group-search/popover-select/index.vue2.js +2 -2
  122. package/lib/src/business/ap-image/ApImage.vue2.js +1 -1
  123. package/lib/src/business/ap-summary/ap-summary.vue2.js +1 -1
  124. package/lib/src/business/ap-table-modal/table-modal.vue2.js +1 -1
  125. package/lib/src/business/ap-upload-file/ap-upload-single/ap-upload-single.vue.d.ts +5 -2
  126. package/lib/src/business/ap-upload-file/ap-upload-single/ap-upload-single.vue.js +1 -1
  127. package/lib/src/business/ap-upload-file/hook/useProps.js +1 -1
  128. package/lib/src/business/ap-upload-file/icon/file-icon.vue.js +1 -1
  129. package/lib/src/business/ap-upload-file/interface.d.ts +2 -0
  130. package/lib/src/business/ap-upload-file/utils/fileList.d.ts +2 -2
  131. package/lib/src/business/ap-upload-file/utils/fileList.js +1 -1
  132. package/lib/src/business/ap-upload-file/utils/upload.d.ts +3 -0
  133. package/lib/src/business/ap-upload-file/utils/upload.js +1 -1
  134. package/lib/src/business/batch-input-group/index.vue.js +1 -1
  135. package/lib/src/business/batch-input-group/popover-input/index.vue2.js +2 -2
  136. package/lib/src/editable-table/form-item.vue.js +1 -1
  137. package/lib/src/editable-table/index.vue.js +1 -1
  138. package/lib/src/work-order-modal/work-order-modal.vue.js +1 -1
  139. package/package.json +2 -2
@@ -1,8 +1,8 @@
1
1
  import { defineComponent as b, createPropsRestProxy as k, ref as v, unref as r, computed as c, renderSlot as u, openBlock as l, createElementBlock as f, mergeProps as C, createBlock as m, createCommentVNode as p, isVNode as B, resolveDynamicComponent as A, toDisplayString as h } from "vue";
2
2
  import "../../config-provider/index.mjs";
3
- import I from "@aplus-frontend/antdv/es/button/LoadingIcon";
4
- import { useNamespace as L } from "../../config-provider/hooks/use-namespace.mjs";
5
- const N = { key: 1 }, F = /* @__PURE__ */ b({
3
+ import L from "@aplus-frontend/antdv/es/button/LoadingIcon";
4
+ import { useNamespace as N } from "../../config-provider/hooks/use-namespace.mjs";
5
+ const P = { key: 1 }, I = /* @__PURE__ */ b({
6
6
  name: "ApActionItem",
7
7
  __name: "index",
8
8
  props: {
@@ -15,7 +15,7 @@ const N = { key: 1 }, F = /* @__PURE__ */ b({
15
15
  loading: { type: Boolean, default: !1 }
16
16
  },
17
17
  setup(o) {
18
- const n = k(o, ["color", "disabled", "visible", "loading"]), { b: g, m: a } = L("action-item"), i = v(!1);
18
+ const n = k(o, ["color", "disabled", "visible", "loading"]), { b: g, m: a } = N("action-item"), i = v(!1);
19
19
  function d(e) {
20
20
  var s;
21
21
  r(t) || o.disabled || ((s = n.onClick) == null || s.call(n, e), n.onAction && (i.value = !0, n.onAction(e).finally(() => i.value = !1)));
@@ -32,22 +32,22 @@ const N = { key: 1 }, F = /* @__PURE__ */ b({
32
32
  onClick: d
33
33
  }, () => [
34
34
  e.visible ? (l(), f("span", C({ key: 0 }, e.$attrs, {
35
- onClick: d,
36
- class: y.value
35
+ class: y.value,
36
+ onClick: d
37
37
  }), [
38
- t.value ? (l(), m(r(I), {
38
+ t.value ? (l(), m(r(L), {
39
39
  key: 0,
40
- prefixCls: "btn",
41
- existIcon: !1,
40
+ "prefix-cls": "btn",
41
+ "exist-icon": !1,
42
42
  loading: ""
43
43
  })) : p("", !0),
44
44
  u(e.$slots, "default", {}, () => [
45
- B(e.text) ? (l(), m(A(e.text), { key: 0 })) : (l(), f("span", N, h(e.text || ""), 1))
45
+ B(e.text) ? (l(), m(A(e.text), { key: 0 })) : (l(), f("span", P, h(e.text || ""), 1))
46
46
  ])
47
47
  ], 16)) : p("", !0)
48
48
  ]);
49
49
  }
50
50
  });
51
51
  export {
52
- F as default
52
+ I as default
53
53
  };
@@ -23,9 +23,9 @@ const I = /* @__PURE__ */ d({
23
23
  (t = (r = o.popconfirmProps).onConfirm) == null || t.call(r, n), await ((e = o.onAction) == null ? void 0 : e.call(o, n));
24
24
  }
25
25
  return (n, r) => (P(), _(i(b), y(o.popconfirmProps, {
26
- onConfirm: m,
27
26
  disabled: !o.popconfirmProps,
28
- "overlay-style": { zIndex: 1060 }
27
+ "overlay-style": { zIndex: 1060 },
28
+ onConfirm: m
29
29
  }), {
30
30
  default: a(() => [
31
31
  C(h, p(s(i(g)(o, ["popconfirmProps", "onAction"]))), x({ _: 2 }, [
@@ -1,7 +1,7 @@
1
- import { defineComponent as N, openBlock as l, createElementBlock as a, normalizeClass as h, unref as r, normalizeStyle as T, createVNode as B, mergeProps as _, withCtx as f, Fragment as s, renderList as w, createBlock as i, h as c, renderSlot as E, resolveDynamicComponent as M } from "vue";
1
+ import { defineComponent as N, openBlock as l, createElementBlock as n, normalizeClass as h, unref as r, normalizeStyle as T, createVNode as B, mergeProps as _, withCtx as f, Fragment as a, renderList as w, createBlock as i, h as c, renderSlot as E, resolveDynamicComponent as M } from "vue";
2
2
  import { Descriptions as V, DescriptionsItem as m } from "@aplus-frontend/antdv";
3
3
  import { mixinsAttachmentExtraProps as j, transformValue as x, isEmptyWithType as z } from "./helper.mjs";
4
- import { get as S } from "lodash-unified";
4
+ import { get as b } from "lodash-unified";
5
5
  import "./help-message/index.vue.mjs";
6
6
  import "../config-provider/index.mjs";
7
7
  import { useGlobalConfig as u } from "../config-provider/hooks/use-global-config.mjs";
@@ -16,61 +16,61 @@ const G = { key: 0 }, K = /* @__PURE__ */ N({
16
16
  style: { type: [Boolean, null, String, Object, Array] },
17
17
  className: {}
18
18
  },
19
- setup(b) {
20
- const p = b, g = u("uiMode", "admin"), C = u("apDescriptions"), k = u("downloadCenterTriggerConfig"), { m: v, b: P } = A("ap-descriptions"), D = (t = {}) => {
19
+ setup(g) {
20
+ const p = g, S = u("uiMode", "admin"), C = u("apDescriptions"), k = u("downloadCenterTriggerConfig"), { m: v, b: P } = A("ap-descriptions"), D = (t = {}) => {
21
21
  var o;
22
- let n = "";
23
- return ((o = p.descriptionsProps) == null ? void 0 : o.layout) === "vertical" && (n = "start"), {
24
- justifyContent: n,
22
+ let s = "";
23
+ return ((o = p.descriptionsProps) == null ? void 0 : o.layout) === "vertical" && (s = "start"), {
24
+ justifyContent: s,
25
25
  ...t
26
26
  };
27
27
  }, y = (t) => {
28
28
  var o, e;
29
- const n = S(p.dataSource, t.field);
29
+ const s = b(p.dataSource, t.field);
30
30
  return t.customRender ? t.customRender(p.dataSource) : (t.valueType === "attachment" && (t.extraProps = j(t.extraProps, {
31
31
  fromConfig: (o = C.value) == null ? void 0 : o.downloadFile,
32
32
  fromGlobal: (e = k.value) == null ? void 0 : e.trigger
33
- })), x({ value: n, record: p.dataSource }, t));
33
+ })), x({ value: s, record: p.dataSource }, t));
34
34
  };
35
- return (t, n) => {
35
+ return (t, s) => {
36
36
  var o;
37
- return l(), a("div", {
38
- class: h([t.className, r(P)(), r(v)(r(g))]),
37
+ return l(), n("div", {
38
+ class: h([t.className, r(P)(), r(v)(r(S))]),
39
39
  style: T(t.style)
40
40
  }, [
41
41
  B(r(V), _(t.descriptionsProps, {
42
- labelStyle: D({ ...((o = t.descriptionsProps) == null ? void 0 : o.labelStyle) || {} })
42
+ "label-style": D({ ...((o = t.descriptionsProps) == null ? void 0 : o.labelStyle) || {} })
43
43
  }), {
44
44
  default: f(() => [
45
- (l(!0), a(s, null, w(t.schemas, (e, d) => (l(), a(s, {
45
+ (l(!0), n(a, null, w(t.schemas, (e, d) => (l(), n(a, {
46
46
  key: e.field || "empty" + d
47
47
  }, [
48
48
  e.valueType === "empty" ? (l(), i(r(m), {
49
49
  key: 0,
50
- contentStyle: e.contentStyle,
51
- labelStyle: e.labelStyle,
50
+ "content-style": e.contentStyle,
51
+ "label-style": e.labelStyle,
52
52
  span: e.span
53
- }, null, 8, ["contentStyle", "labelStyle", "span"])) : (l(), i(r(m), {
53
+ }, null, 8, ["content-style", "label-style", "span"])) : (l(), i(r(m), {
54
54
  key: 1,
55
- label: e.label ? c(s, [
55
+ label: e.label ? c(a, [
56
56
  c(F, {
57
57
  helpMessage: e.helpMessage,
58
58
  label: e.label
59
59
  })
60
60
  ]) : null,
61
61
  span: e.span,
62
- contentStyle: e.contentStyle,
63
- labelStyle: e.labelStyle
62
+ "content-style": e.contentStyle,
63
+ "label-style": e.labelStyle
64
64
  }, {
65
65
  default: f(() => [
66
- r(z)(r(S)(t.dataSource, e.field), e.valueType) ? (l(), a("span", G, "--")) : (l(), a(s, { key: 1 }, [
66
+ r(z)(r(b)(t.dataSource, e.field), e.valueType) ? (l(), n("span", G, "--")) : (l(), n(a, { key: 1 }, [
67
67
  e.contentSlotName ? E(t.$slots, e.contentSlotName, {
68
68
  key: 0,
69
69
  index: d,
70
70
  item: y(e),
71
71
  record: t.dataSource
72
72
  }) : (l(), i(M(
73
- c(s, [
73
+ c(a, [
74
74
  e.prefix,
75
75
  y(e),
76
76
  e.suffix
@@ -79,11 +79,11 @@ const G = { key: 0 }, K = /* @__PURE__ */ N({
79
79
  ], 64))
80
80
  ]),
81
81
  _: 2
82
- }, 1032, ["label", "span", "contentStyle", "labelStyle"]))
82
+ }, 1032, ["label", "span", "content-style", "label-style"]))
83
83
  ], 64))), 128))
84
84
  ]),
85
85
  _: 3
86
- }, 16, ["labelStyle"])
86
+ }, 16, ["label-style"])
87
87
  ], 6);
88
88
  };
89
89
  }
@@ -29,16 +29,6 @@ const z = (l) => {
29
29
  props: l
30
30
  };
31
31
  },
32
- methods: {
33
- async handleClose() {
34
- var e, n, r, s, p;
35
- if ((e = this.props) != null && e.onClose) {
36
- const i = ((s = (r = (n = this.props) == null ? void 0 : n.content) == null ? void 0 : r.component) == null ? void 0 : s.exposed) ?? void 0;
37
- await ((p = this.props) == null ? void 0 : p.onClose(i));
38
- }
39
- f ? h() : m();
40
- }
41
- },
42
32
  created() {
43
33
  o = (e) => {
44
34
  this.open = e;
@@ -49,6 +39,16 @@ const z = (l) => {
49
39
  };
50
40
  };
51
41
  },
42
+ methods: {
43
+ async handleClose() {
44
+ var e, n, r, s, p;
45
+ if ((e = this.props) != null && e.onClose) {
46
+ const i = ((s = (r = (n = this.props) == null ? void 0 : n.content) == null ? void 0 : r.component) == null ? void 0 : s.exposed) ?? void 0;
47
+ await ((p = this.props) == null ? void 0 : p.onClose(i));
48
+ }
49
+ f ? h() : m();
50
+ }
51
+ },
52
52
  render() {
53
53
  var s, p, i;
54
54
  const e = N(this.props, ["onClose", "extra", "footer", "visible", "onUpdate:visible", "afterVisibleChange", "onAfterVisibleOChange", "open", "onUpdate:open", "getContainer"]), n = ((i = (p = (s = this.props) == null ? void 0 : s.content) == null ? void 0 : p.component) == null ? void 0 : i.exposed) ?? void 0, r = () => f ? h() : m();
@@ -58,9 +58,9 @@ const I = /* @__PURE__ */ h({
58
58
  })) : (o(), c(e(U), V({ key: 1 }, e(q)(t, ["onUpdate:value", "value", "request", "vertical"]), {
59
59
  options: e(p),
60
60
  value: e(r),
61
- "onUpdate:value": e(g),
62
- class: a.vertical ? e(x)("vertical") : null
63
- }), null, 16, ["options", "value", "onUpdate:value", "class"]))
61
+ class: a.vertical ? e(x)("vertical") : null,
62
+ "onUpdate:value": e(g)
63
+ }), null, 16, ["options", "value", "class", "onUpdate:value"]))
64
64
  ], 64));
65
65
  };
66
66
  }
@@ -138,10 +138,10 @@ const le = /* @__PURE__ */ b({
138
138
  ], 64)) : (v(), F(t(j), A({ key: 1 }, O.value, {
139
139
  value: f.value,
140
140
  format: d.value,
141
+ picker: g.value,
141
142
  "onUpdate:value": C,
142
143
  onChange: T,
143
- onOk: S,
144
- picker: g.value
144
+ onOk: S
145
145
  }), D({ _: 2 }, [
146
146
  x(o.$slots, (u, n) => ({
147
147
  name: n,
@@ -213,10 +213,10 @@ const Be = /* @__PURE__ */ U({
213
213
  key: 1
214
214
  }, z.value, {
215
215
  value: v.value,
216
- "onUpdate:value": E,
217
- onChange: I,
218
216
  picker: x.value,
219
217
  format: l.value,
218
+ "onUpdate:value": E,
219
+ onChange: I,
220
220
  onOk: V
221
221
  }), W({
222
222
  _: 2
@@ -91,11 +91,11 @@ const te = /* @__PURE__ */ x({
91
91
  s(e.$slots, "addonAfter")
92
92
  ], 2)) : m("", !0)
93
93
  ], 64)) : (r(), $(t(F), R({ key: 1 }, t(T)(o, ["value", "onUpdate:value"]), {
94
+ ref_key: "inputRef",
95
+ ref: l,
94
96
  placeholder: t(B),
95
97
  value: t(u),
96
- "onUpdate:value": t(b),
97
- ref_key: "inputRef",
98
- ref: l
98
+ "onUpdate:value": t(b)
99
99
  }), A({ _: 2 }, [
100
100
  I(e.$slots, (q, p) => ({
101
101
  name: p,
@@ -75,14 +75,14 @@ const W = /* @__PURE__ */ q({
75
75
  "vertical"
76
76
  ]),
77
77
  {
78
- value: o(i),
79
- "onUpdate:value": o(x),
80
- options: o(u),
81
78
  ref_key: "radioGroupRef",
82
79
  ref: n,
83
- class: e.vertical ? o(b)("vertical") : null
80
+ value: o(i),
81
+ options: o(u),
82
+ class: e.vertical ? o(b)("vertical") : null,
83
+ "onUpdate:value": o(x)
84
84
  }
85
- ), null, 16, ["value", "onUpdate:value", "options", "class"]))
85
+ ), null, 16, ["value", "options", "class", "onUpdate:value"]))
86
86
  ], 64));
87
87
  }
88
88
  });
@@ -45,11 +45,11 @@ const D = /* @__PURE__ */ v({
45
45
  focus: p,
46
46
  blur: m
47
47
  }), (e, t) => (B(), C(o(R), _(o(w)(a, ["mode", "defaultValue"]), {
48
+ ref_key: "rateRef",
49
+ ref: l,
48
50
  value: o(f),
49
- "onUpdate:value": o(c),
50
51
  disabled: i.value,
51
- ref_key: "rateRef",
52
- ref: l
52
+ "onUpdate:value": o(c)
53
53
  }), x({ _: 2 }, [
54
54
  s.character ? {
55
55
  name: "character",
@@ -58,7 +58,7 @@ const D = /* @__PURE__ */ v({
58
58
  ]),
59
59
  key: "0"
60
60
  } : void 0
61
- ]), 1040, ["value", "onUpdate:value", "disabled"]));
61
+ ]), 1040, ["value", "disabled", "onUpdate:value"]));
62
62
  }
63
63
  });
64
64
  export {
@@ -74,12 +74,12 @@ const L = /* @__PURE__ */ S({
74
74
  key: 1
75
75
  }, l(E)(o, ["onUpdate:value", "value", "defaultValue", "options"]), {
76
76
  value: l(p),
77
- "onUpdate:value": l(b),
78
- options: l(m)
77
+ options: l(m),
78
+ "onUpdate:value": l(b)
79
79
  }), {
80
80
  label: z((n) => [F(e.$slots, "label", P(T(n)))]),
81
81
  _: 3
82
- }, 16, ["value", "onUpdate:value", "options"]))], 64));
82
+ }, 16, ["value", "options", "onUpdate:value"]))], 64));
83
83
  }
84
84
  });
85
85
  export {
@@ -196,15 +196,15 @@ const ne = { key: 0 }, pe = /* @__PURE__ */ _({
196
196
  request: f
197
197
  }), (o, t) => o.mode === "read" ? (S(), R("span", ne, U(k.value), 1)) : (S(), z(a(Y), D({
198
198
  key: 1,
199
- "allow-clear": "",
200
199
  ref_key: "selectRef",
201
- ref: c
200
+ ref: c,
201
+ "allow-clear": ""
202
202
  }, q.value, {
203
203
  mode: o.multiple ? "multiple" : void 0,
204
204
  value: a(m),
205
- "onUpdate:value": a(V),
206
205
  options: a(s),
207
206
  loading: u.value,
207
+ "onUpdate:value": a(V),
208
208
  onFocus: O
209
209
  }), K({ _: 2 }, [
210
210
  H(o.$slots, (l, n) => ({
@@ -220,7 +220,7 @@ const ne = { key: 0 }, pe = /* @__PURE__ */ _({
220
220
  ]),
221
221
  key: "0"
222
222
  } : void 0
223
- ]), 1040, ["mode", "value", "onUpdate:value", "options", "loading"]));
223
+ ]), 1040, ["mode", "value", "options", "loading", "onUpdate:value"]));
224
224
  }
225
225
  });
226
226
  export {
@@ -69,10 +69,10 @@ const I = /* @__PURE__ */ x({
69
69
  "defaultValue"
70
70
  ]),
71
71
  {
72
- value: o(r),
73
- "onUpdate:value": o(m),
74
72
  ref_key: "sliderRef",
75
- ref: l
73
+ ref: l,
74
+ value: o(r),
75
+ "onUpdate:value": o(m)
76
76
  }
77
77
  ), h({ _: 2 }, [
78
78
  F(d, (L, n) => ({
@@ -94,8 +94,8 @@ const O = /* @__PURE__ */ z({
94
94
  key: 0
95
95
  }, o(P)(e, "onUpdate:checked"), {
96
96
  checked: o(d),
97
- onClick: y,
98
- loading: n.loading ?? l.value
97
+ loading: n.loading ?? l.value,
98
+ onClick: y
99
99
  }), v({
100
100
  _: 2
101
101
  }, [V(c, (i, t) => ({
@@ -109,8 +109,8 @@ const O = /* @__PURE__ */ z({
109
109
  }), {
110
110
  default: C(() => [s(o(A), p(o(P)(e, "onUpdate:checked"), {
111
111
  checked: o(d),
112
- onClick: y,
113
- loading: n.loading ?? l.value
112
+ loading: n.loading ?? l.value,
113
+ onClick: y
114
114
  }), v({
115
115
  _: 2
116
116
  }, [V(c, (i, t) => ({
@@ -78,11 +78,11 @@ const S = /* @__PURE__ */ f({
78
78
  key: 0,
79
79
  class: B(o(m)())
80
80
  }, h(o(z)(o(a)) || o(a) === "" ? e.emptyText : o(a)), 3)) : (r(), b(o(g).TextArea, C({ key: 1 }, o(A)(l, ["onUpdate:value", "value"]), {
81
+ ref_key: "textAreaRef",
82
+ ref: t,
81
83
  placeholder: o(c),
82
84
  value: o(a),
83
- "onUpdate:value": o(i),
84
- ref_key: "textAreaRef",
85
- ref: t
85
+ "onUpdate:value": o(i)
86
86
  }), null, 16, ["placeholder", "value", "onUpdate:value"]));
87
87
  }
88
88
  });
@@ -288,14 +288,13 @@ declare function __VLS_template(): {
288
288
  };
289
289
  xxl: {
290
290
  type: PropType<string | number | ColSize>;
291
- default: string | number | ColSize;
291
+ default: string | number | **
292
+ * 订阅事件
293
+ */).ColSize;
292
294
  };
293
295
  prefixCls: StringConstructor;
294
296
  flex: (StringConstructor | NumberConstructor)[];
295
- }>> & **
296
- * 注册表单项
297
- * @param field
298
- */).HTMLAttributes;
297
+ }>> & HTMLAttributes;
299
298
  labelAlign: FormLabelAlign;
300
299
  labelWrap: boolean;
301
300
  wrapperCol: Partial< ExtractPropTypes<{
@@ -683,7 +682,7 @@ declare const __VLS_component: DefineComponent<ApFormProps, {
683
682
  }> | undefined;
684
683
  scrollToField: (name: NamePath, options?: {}) => void;
685
684
  setFieldsValue: (values: Record<string, any>) => void;
686
- setFieldValue: (name: NamePath, newValue: any) => void;
685
+ setFieldValue: (name: NamePath, newValue: any, triggerChange?: boolean) => void;
687
686
  registerWatch: typeof registerWatch;
688
687
  validateFieldsReturnTransformed: (nameList?: NamePath[] | string, options?: ValidateOptions) => Promise<any>;
689
688
  getFieldsValueTransformed: (nameList?: InternalNamePath[] | true) => any;
@@ -49,7 +49,7 @@ const ye = /* @__PURE__ */ $({
49
49
  } else
50
50
  n[e] = t;
51
51
  let o = f(e) ? e[0] : e;
52
- l && ((i = s.onValuesChange) == null || i.call(s, { [o]: n[o] }, n)), g();
52
+ l && ((i = s.onValuesChange) == null || i.call(s, { [o]: n[o] }, n, e)), g();
53
53
  }
54
54
  const a = M(), v = se(ne()), B = M(
55
55
  s.syncToUrl ? _(s.syncToUrl, v, "get") : {}
@@ -112,8 +112,8 @@ const ye = /* @__PURE__ */ $({
112
112
  (l = a.value) == null || l.scrollToField(e, t);
113
113
  }, L = (e) => {
114
114
  Object.assign(n, e), g();
115
- }, P = (e, t) => {
116
- y(e, t), g();
115
+ }, P = (e, t, l = !0) => {
116
+ y(e, t, l), g();
117
117
  };
118
118
  function T(e, t) {
119
119
  return t || e(O(n)), F.push(e), () => {
@@ -201,8 +201,8 @@ const ye = /* @__PURE__ */ $({
201
201
  ref_key: "formRef",
202
202
  ref: a
203
203
  }, m(re)(s, ["initialValues", "onValuesChange", "onFinish"]), {
204
- onFinish: x,
205
- model: n
204
+ model: n,
205
+ onFinish: x
206
206
  }), {
207
207
  default: Z(() => [
208
208
  ee(e.$slots, "default")
@@ -110,7 +110,7 @@ declare function __VLS_template(): {
110
110
  readonly hideRequiredMark?: boolean | undefined;
111
111
  readonly validateOnRuleChange?: boolean | undefined;
112
112
  readonly scrollToFirstError?: boolean | Options<any> | undefined;
113
- readonly onValuesChange?: (((changedValues: any, values: any) => void) & ((changedValues: Recordable, allValues: Recordable) => void)) | undefined;
113
+ readonly onValuesChange?: (((changedValues: any, values: any) => void) & ((changedValues: Recordable, allValues: Recordable, fieldName: NamePath) => void)) | undefined;
114
114
  readonly onFieldsChange?: ((changedFields: FieldData[], allFields: FieldData[]) => void) | undefined;
115
115
  readonly onFinish?: ((values: any) => void) | undefined;
116
116
  readonly onFinishFailed?: ((errorInfo: ValidateErrorEntity<any>) => void) | undefined;
@@ -147,7 +147,7 @@ declare function __VLS_template(): {
147
147
  }> | undefined;
148
148
  scrollToField: (name: NamePath, options?: {}) => void;
149
149
  setFieldsValue: (values: Record<string, any>) => void;
150
- setFieldValue: (name: NamePath, newValue: any) => void;
150
+ setFieldValue: (name: NamePath, newValue: any, triggerChange?: boolean) => void;
151
151
  registerWatch: (callback: WatchFunc, inner: boolean) => () => void;
152
152
  validateFieldsReturnTransformed: (nameList?: NamePath[] | string, options?: ValidateOptions) => Promise<any>;
153
153
  getFieldsValueTransformed: (nameList?: InternalNamePath[] | true) => any;
@@ -191,7 +191,7 @@ declare function __VLS_template(): {
191
191
  hideRequiredMark: boolean;
192
192
  validateOnRuleChange: boolean;
193
193
  syncToUrl: boolean | ((values: Recordable, type: "get" | "set") => Recordable);
194
- }> & Omit<Readonly< ApFormProps> & Readonly<{}>, "validate" | "setFieldValue" | "setFieldsValue" | "resetFields" | "clearValidate" | "validateFields" | "getFieldsValue" | "scrollToField" | "getInternalInstance" | "validateFieldsReturnTransformed" | "getFieldsValueTransformed" | "registerWatch" | ("layout" | "colon" | "labelAlign" | "validateTrigger" | "hideRequiredMark" | "validateOnRuleChange" | "syncToUrl")> & ShallowUnwrapRef<{
194
+ }> & Omit<Readonly< ApFormProps> & Readonly<{}>, "validate" | "resetFields" | "clearValidate" | "validateFields" | "getFieldsValue" | "scrollToField" | "registerWatch" | "setFieldValue" | "setFieldsValue" | "validateFieldsReturnTransformed" | "getFieldsValueTransformed" | "getInternalInstance" | ("layout" | "colon" | "labelAlign" | "validateTrigger" | "hideRequiredMark" | "validateOnRuleChange" | "syncToUrl")> & ShallowUnwrapRef<{
195
195
  resetFields: () => Promise<void>;
196
196
  clearValidate: (name?: NamePath | NamePath[]) => void;
197
197
  validateFields: (nameList?: NamePath[] | string, options?: ValidateOptions) => Promise<{
@@ -205,7 +205,7 @@ declare function __VLS_template(): {
205
205
  }> | undefined;
206
206
  scrollToField: (name: NamePath, options?: {}) => void;
207
207
  setFieldsValue: (values: Record<string, any>) => void;
208
- setFieldValue: (name: NamePath, newValue: any) => void;
208
+ setFieldValue: (name: NamePath, newValue: any, triggerChange?: boolean) => void;
209
209
  registerWatch: (callback: WatchFunc, inner: boolean) => () => void;
210
210
  validateFieldsReturnTransformed: (nameList?: NamePath[] | string, options?: ValidateOptions) => Promise<any>;
211
211
  getFieldsValueTransformed: (nameList?: InternalNamePath[] | true) => any;
@@ -270,9 +270,9 @@ const je = /* @__PURE__ */ Q({
270
270
  }
271
271
  }), (e, t) => (y(), N(ee, null, [d(l(se), b(e.drawerProps, {
272
272
  open: l(C),
273
+ width: f.value,
273
274
  "onUpdate:open": H,
274
- onCancel: R,
275
- width: f.value
275
+ onCancel: R
276
276
  }), {
277
277
  title: g(() => [M(e.$slots, "title", {}, () => [te(ie(n.title), 1)])]),
278
278
  footer: g(() => [(y(), S(_(I.value)))]),
@@ -43,9 +43,10 @@ export type ApFormProps = Omit<FormProps, 'model'> & {
43
43
  * 字段值更新时触发
44
44
  * @param changedValues 更改的字段值
45
45
  * @param allValues 更改后的字段值
46
+ * @param fieldName 触发change的表单项
46
47
  * @returns
47
48
  */
48
- onValuesChange?: (changedValues: Recordable, allValues: Recordable) => void;
49
+ onValuesChange?: (changedValues: Recordable, allValues: Recordable, fieldName: NamePath) => void;
49
50
  /**
50
51
  * 同步表单数据到url中
51
52
  */
@@ -58,7 +59,7 @@ export type ApFormProps = Omit<FormProps, 'model'> & {
58
59
  export type WatchFunc = (values?: Recordable) => void;
59
60
  export type ApFormExpose<ModelType = any> = {
60
61
  setFieldsValue: (fields: Partial<ModelType>) => void;
61
- setFieldValue: (name: NamePath, value: any) => void;
62
+ setFieldValue: (name: NamePath, value: any, triggerChange?: boolean) => void;
62
63
  resetFields: () => Promise<void>;
63
64
  clearValidate: (name?: NamePath) => void;
64
65
  validateFields: (nameList?: NamePath[] | string, options?: ValidateOptions) => Promise<Partial<ModelType>> | undefined;
@@ -107,7 +108,15 @@ export type ApFormInternalInstance = {
107
108
  * @returns
108
109
  */
109
110
  registerField: (field: RegistedFieldType) => void;
110
- } & Pick<ApFormExpose, 'setFieldValue'>;
111
+ /**
112
+ * 设置表单值
113
+ * @param name
114
+ * @param value
115
+ * @param triggerChange
116
+ * @returns
117
+ */
118
+ setFieldValue: (name: NamePath, value: any, triggerChange?: boolean) => void;
119
+ };
111
120
  export type ApFormItemExpose = FormItemExpose & {
112
121
  /**
113
122
  * 是否需要格式化(默认为false)
@@ -111,7 +111,7 @@ declare function __VLS_template(): {
111
111
  readonly hideRequiredMark?: boolean | undefined;
112
112
  readonly validateOnRuleChange?: boolean | undefined;
113
113
  readonly scrollToFirstError?: boolean | Options<any> | undefined;
114
- readonly onValuesChange?: (((changedValues: any, values: any) => void) & ((changedValues: Recordable, allValues: Recordable) => void)) | undefined;
114
+ readonly onValuesChange?: (((changedValues: any, values: any) => void) & ((changedValues: Recordable, allValues: Recordable, fieldName: NamePath) => void)) | undefined;
115
115
  readonly onFieldsChange?: ((changedFields: FieldData[], allFields: FieldData[]) => void) | undefined;
116
116
  readonly onFinish?: ((values: any) => void) | undefined;
117
117
  readonly onFinishFailed?: ((errorInfo: ValidateErrorEntity<any>) => void) | undefined;
@@ -148,7 +148,7 @@ declare function __VLS_template(): {
148
148
  }> | undefined;
149
149
  scrollToField: (name: NamePath, options?: {}) => void;
150
150
  setFieldsValue: (values: Record<string, any>) => void;
151
- setFieldValue: (name: NamePath, newValue: any) => void;
151
+ setFieldValue: (name: NamePath, newValue: any, triggerChange?: boolean) => void;
152
152
  registerWatch: (callback: WatchFunc, inner: boolean) => () => void;
153
153
  validateFieldsReturnTransformed: (nameList?: NamePath[] | string, options?: ValidateOptions) => Promise<any>;
154
154
  getFieldsValueTransformed: (nameList?: InternalNamePath[] | true) => any;
@@ -192,7 +192,7 @@ declare function __VLS_template(): {
192
192
  hideRequiredMark: boolean;
193
193
  validateOnRuleChange: boolean;
194
194
  syncToUrl: boolean | ((values: Recordable, type: "get" | "set") => Recordable);
195
- }> & Omit<Readonly< ApFormProps> & Readonly<{}>, "validate" | "setFieldValue" | "setFieldsValue" | "resetFields" | "clearValidate" | "validateFields" | "getFieldsValue" | "scrollToField" | "getInternalInstance" | "validateFieldsReturnTransformed" | "getFieldsValueTransformed" | "registerWatch" | ("layout" | "colon" | "labelAlign" | "validateTrigger" | "hideRequiredMark" | "validateOnRuleChange" | "syncToUrl")> & ShallowUnwrapRef<{
195
+ }> & Omit<Readonly< ApFormProps> & Readonly<{}>, "validate" | "resetFields" | "clearValidate" | "validateFields" | "getFieldsValue" | "scrollToField" | "registerWatch" | "setFieldValue" | "setFieldsValue" | "validateFieldsReturnTransformed" | "getFieldsValueTransformed" | "getInternalInstance" | ("layout" | "colon" | "labelAlign" | "validateTrigger" | "hideRequiredMark" | "validateOnRuleChange" | "syncToUrl")> & ShallowUnwrapRef<{
196
196
  resetFields: () => Promise<void>;
197
197
  clearValidate: (name?: NamePath | NamePath[]) => void;
198
198
  validateFields: (nameList?: NamePath[] | string, options?: ValidateOptions) => Promise<{
@@ -206,7 +206,7 @@ declare function __VLS_template(): {
206
206
  }> | undefined;
207
207
  scrollToField: (name: NamePath, options?: {}) => void;
208
208
  setFieldsValue: (values: Record<string, any>) => void;
209
- setFieldValue: (name: NamePath, newValue: any) => void;
209
+ setFieldValue: (name: NamePath, newValue: any, triggerChange?: boolean) => void;
210
210
  registerWatch: (callback: WatchFunc, inner: boolean) => () => void;
211
211
  validateFieldsReturnTransformed: (nameList?: NamePath[] | string, options?: ValidateOptions) => Promise<any>;
212
212
  getFieldsValueTransformed: (nameList?: InternalNamePath[] | true) => any;
@@ -229,8 +229,6 @@ const Me = /* @__PURE__ */ D({
229
229
  }
230
230
  }), (e, t) => (F(), W(H, null, [u(n(te), p(e.modalProps, {
231
231
  open: n(M),
232
- "onUpdate:open": E,
233
- onCancel: k,
234
232
  footer: null,
235
233
  width: e.width,
236
234
  class: n(j)(),
@@ -238,7 +236,9 @@ const Me = /* @__PURE__ */ D({
238
236
  padding: n(y) === "admin" ? "0px !important" : "20px !important"
239
237
  // 这里使用内联样式目的是为了使用最高优先级覆盖设置的全局样式
240
238
  // 使用ModalForm你可能无法再自定义body的样式
241
- }
239
+ },
240
+ "onUpdate:open": E,
241
+ onCancel: k
242
242
  }), {
243
243
  title: h(() => [w(e.$slots, "title", {}, () => [J(K(a.title), 1)])]),
244
244
  default: h(() => [Q("div", {