@aplus-frontend/ui 0.0.27 → 0.0.29

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 (127) 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-download/hooks/index.mjs +4 -3
  5. package/es/src/ap-download/interface.d.ts +2 -2
  6. package/es/src/ap-field/date/helper.mjs +5 -5
  7. package/es/src/ap-field/date-range/index.vue.mjs +15 -15
  8. package/es/src/ap-form/ap-form-item-group/index.vue.mjs +21 -21
  9. package/es/src/ap-form/ap-form-item.vue.mjs +72 -64
  10. package/es/src/ap-form/ap-form-list.vue.mjs +29 -21
  11. package/es/src/ap-form/ap-form.vue.d.ts +13 -3
  12. package/es/src/ap-form/ap-form.vue2.mjs +87 -66
  13. package/es/src/ap-form/constant.d.ts +1 -0
  14. package/es/src/ap-form/constant.mjs +2 -1
  15. package/es/src/ap-form/context.d.ts +4 -3
  16. package/es/src/ap-form/hooks/use-watch.mjs +20 -16
  17. package/es/src/ap-form/interface.d.ts +39 -4
  18. package/es/src/ap-form/items/checkbox/index.vue.mjs +11 -10
  19. package/es/src/ap-form/items/date/index.vue.mjs +14 -13
  20. package/es/src/ap-form/items/date-range/index.vue.mjs +12 -11
  21. package/es/src/ap-form/items/number/index.vue.mjs +13 -12
  22. package/es/src/ap-form/items/radio/index.vue.mjs +4 -3
  23. package/es/src/ap-form/items/select/index.vue.mjs +3 -2
  24. package/es/src/ap-form/items/switch/index.vue.mjs +9 -8
  25. package/es/src/ap-form/items/text/index.vue2.mjs +15 -14
  26. package/es/src/ap-form/items/text/password.vue.mjs +1 -0
  27. package/es/src/ap-form/items/text-area/index.vue.mjs +7 -6
  28. package/es/src/ap-form/modal-form/index.vue.d.ts +1 -1
  29. package/es/src/ap-form/modal-form/index.vue.mjs +3 -3
  30. package/es/src/ap-form/search-form/index.vue.mjs +123 -99
  31. package/es/src/ap-table/constants.d.ts +132 -0
  32. package/es/src/ap-table/hooks/use-table-paging.mjs +23 -21
  33. package/es/src/ap-upload/apUpload.vue.d.ts +3 -11
  34. package/es/src/ap-upload/apUpload.vue.mjs +42 -36
  35. package/es/src/ap-upload/components/MultipleFile.vue2.mjs +115 -102
  36. package/es/src/ap-upload/components/Picture.vue2.mjs +121 -111
  37. package/es/src/ap-upload/components/SingleFile.vue2.mjs +120 -109
  38. package/es/src/ap-upload/hooks/useOss.d.ts +9 -4
  39. package/es/src/ap-upload/hooks/useOss.mjs +52 -34
  40. package/es/src/ap-upload/utils/accept.d.ts +3 -0
  41. package/es/src/ap-upload/utils/accept.mjs +35 -30
  42. package/es/src/business/ap-status/ApStatusGroup.vue.d.ts +7 -2
  43. package/es/src/business/ap-status/ApStatusGroup.vue2.mjs +7 -6
  44. package/es/src/business/ap-status/interface.d.ts +4 -1
  45. package/es/src/business/expandAlert/ApExpandAlert.vue.d.ts +19 -1
  46. package/es/src/business/expandAlert/ApExpandAlert.vue2.mjs +53 -47
  47. package/es/src/business/expandAlert/interface.d.ts +4 -0
  48. package/es/src/business/index.d.ts +79 -15
  49. package/es/src/business/index.mjs +1 -1
  50. package/es/src/config-provider/config-provider-props.d.ts +5 -1
  51. package/es/src/config-provider/config-provider-props.mjs +4 -0
  52. package/es/src/config-provider/config-provider.d.ts +10 -1
  53. package/es/src/config-provider/config-provider.mjs +9 -8
  54. package/es/src/config-provider/constants.d.ts +10 -0
  55. package/es/src/config-provider/hooks/use-global-config.d.ts +5 -1
  56. package/es/src/config-provider/index.d.ts +20 -1
  57. package/es/src/editable-table/form-item.vue.mjs +72 -74
  58. package/es/src/locale/lang/en.mjs +26 -1
  59. package/es/src/locale/lang/zh-cn.mjs +26 -1
  60. package/es/src/theme/ap-action/item-dropdown.css +2 -0
  61. package/es/src/work-order-modal/createWorkOrder.d.ts +3 -1
  62. package/es/src/work-order-modal/interfaces.d.ts +3 -1
  63. package/es/src/work-order-modal/work-order-modal.vue.mjs +7 -7
  64. package/lib/src/ap-action/group/index.vue.js +1 -1
  65. package/lib/src/ap-action/item-dropdown/index.vue.js +1 -1
  66. package/lib/src/ap-action/style/item-dropdown.css +2 -0
  67. package/lib/src/ap-download/hooks/index.js +1 -1
  68. package/lib/src/ap-download/interface.d.ts +2 -2
  69. package/lib/src/ap-field/date/helper.js +1 -1
  70. package/lib/src/ap-field/date-range/index.vue.js +1 -1
  71. package/lib/src/ap-form/ap-form-item-group/index.vue.js +1 -1
  72. package/lib/src/ap-form/ap-form-item.vue.js +1 -1
  73. package/lib/src/ap-form/ap-form-list.vue.js +1 -1
  74. package/lib/src/ap-form/ap-form.vue.d.ts +13 -3
  75. package/lib/src/ap-form/ap-form.vue2.js +1 -1
  76. package/lib/src/ap-form/constant.d.ts +1 -0
  77. package/lib/src/ap-form/constant.js +1 -1
  78. package/lib/src/ap-form/context.d.ts +4 -3
  79. package/lib/src/ap-form/hooks/use-watch.js +1 -1
  80. package/lib/src/ap-form/interface.d.ts +39 -4
  81. package/lib/src/ap-form/items/checkbox/index.vue.js +1 -1
  82. package/lib/src/ap-form/items/date/index.vue.js +1 -1
  83. package/lib/src/ap-form/items/date-range/index.vue.js +1 -1
  84. package/lib/src/ap-form/items/number/index.vue.js +1 -1
  85. package/lib/src/ap-form/items/radio/index.vue.js +1 -1
  86. package/lib/src/ap-form/items/select/index.vue.js +1 -1
  87. package/lib/src/ap-form/items/switch/index.vue.js +1 -1
  88. package/lib/src/ap-form/items/text/index.vue2.js +1 -1
  89. package/lib/src/ap-form/items/text/password.vue.js +1 -1
  90. package/lib/src/ap-form/items/text-area/index.vue.js +1 -1
  91. package/lib/src/ap-form/modal-form/index.vue.d.ts +1 -1
  92. package/lib/src/ap-form/modal-form/index.vue.js +1 -1
  93. package/lib/src/ap-form/search-form/index.vue.js +1 -1
  94. package/lib/src/ap-table/constants.d.ts +132 -0
  95. package/lib/src/ap-table/hooks/use-table-paging.js +1 -1
  96. package/lib/src/ap-upload/apUpload.vue.d.ts +3 -11
  97. package/lib/src/ap-upload/apUpload.vue.js +1 -1
  98. package/lib/src/ap-upload/components/MultipleFile.vue2.js +1 -1
  99. package/lib/src/ap-upload/components/Picture.vue2.js +1 -1
  100. package/lib/src/ap-upload/components/SingleFile.vue2.js +1 -1
  101. package/lib/src/ap-upload/hooks/useOss.d.ts +9 -4
  102. package/lib/src/ap-upload/hooks/useOss.js +1 -1
  103. package/lib/src/ap-upload/utils/accept.d.ts +3 -0
  104. package/lib/src/ap-upload/utils/accept.js +1 -1
  105. package/lib/src/business/ap-status/ApStatusGroup.vue.d.ts +7 -2
  106. package/lib/src/business/ap-status/ApStatusGroup.vue2.js +1 -1
  107. package/lib/src/business/ap-status/interface.d.ts +4 -1
  108. package/lib/src/business/expandAlert/ApExpandAlert.vue.d.ts +19 -1
  109. package/lib/src/business/expandAlert/ApExpandAlert.vue2.js +1 -1
  110. package/lib/src/business/expandAlert/interface.d.ts +4 -0
  111. package/lib/src/business/index.d.ts +79 -15
  112. package/lib/src/business/index.js +1 -1
  113. package/lib/src/config-provider/config-provider-props.d.ts +5 -1
  114. package/lib/src/config-provider/config-provider-props.js +1 -1
  115. package/lib/src/config-provider/config-provider.d.ts +10 -1
  116. package/lib/src/config-provider/config-provider.js +1 -1
  117. package/lib/src/config-provider/constants.d.ts +10 -0
  118. package/lib/src/config-provider/hooks/use-global-config.d.ts +5 -1
  119. package/lib/src/config-provider/index.d.ts +20 -1
  120. package/lib/src/editable-table/form-item.vue.js +1 -1
  121. package/lib/src/locale/lang/en.js +1 -1
  122. package/lib/src/locale/lang/zh-cn.js +1 -1
  123. package/lib/src/theme/ap-action/item-dropdown.css +2 -0
  124. package/lib/src/work-order-modal/createWorkOrder.d.ts +3 -1
  125. package/lib/src/work-order-modal/interfaces.d.ts +3 -1
  126. package/lib/src/work-order-modal/work-order-modal.vue.js +1 -1
  127. package/package.json +4 -3
@@ -4,7 +4,7 @@ import "../../../ap-field/index.mjs";
4
4
  import { isUndefined as P, omit as c, pick as $ } from "lodash-unified";
5
5
  import { apFormItemSlotNames as b } from "../../constant.mjs";
6
6
  import N from "../../ap-form-item.vue.mjs";
7
- import w from "../../../ap-field/select/index.vue.mjs";
7
+ import V from "../../../ap-field/select/index.vue.mjs";
8
8
  const j = /* @__PURE__ */ x({
9
9
  name: "ApFormItemSelect",
10
10
  __name: "index",
@@ -45,6 +45,7 @@ const j = /* @__PURE__ */ x({
45
45
  flex: {},
46
46
  bordered: { type: Boolean },
47
47
  valuePropName: {},
48
+ initialValue: {},
48
49
  field: { default: () => ({}) },
49
50
  placeholder: {},
50
51
  disabled: { type: Boolean, default: !1 }
@@ -72,7 +73,7 @@ const j = /* @__PURE__ */ x({
72
73
  });
73
74
  return (e, d) => (F(), k(N, t(a(l(c)(o, ["field", "placeholder", "disabled"]))), f({
74
75
  default: n(() => [
75
- C(l(w), t(a(v.value)), f({ _: 2 }, [
76
+ C(l(V), t(a(v.value)), f({ _: 2 }, [
76
77
  u(l(c)(i, l(b)), (B, r) => ({
77
78
  name: r,
78
79
  fn: n((s) => [
@@ -1,11 +1,11 @@
1
- import { defineComponent as B, useSlots as _, openBlock as h, createBlock as y, normalizeProps as t, guardReactiveProps as r, unref as o, createSlots as i, withCtx as s, createVNode as v, mergeProps as g, renderList as n, renderSlot as p } from "vue";
1
+ import { defineComponent as B, useSlots as _, openBlock as h, createBlock as y, normalizeProps as t, guardReactiveProps as r, unref as o, createSlots as d, withCtx as s, createVNode as v, mergeProps as g, renderList as n, renderSlot as p } from "vue";
2
2
  import "../../ap-form-item.vue2.mjs";
3
3
  import "../../../ap-field/switch/index.vue2.mjs";
4
4
  import { omit as m, pick as x } from "lodash-unified";
5
5
  import { apFormItemSlotNames as f } from "../../constant.mjs";
6
6
  import S from "../../ap-form-item.vue.mjs";
7
7
  import k from "../../../ap-field/switch/index.vue.mjs";
8
- const L = /* @__PURE__ */ B({
8
+ const I = /* @__PURE__ */ B({
9
9
  name: "ApFormItemSwitch",
10
10
  __name: "index",
11
11
  props: {
@@ -44,15 +44,16 @@ const L = /* @__PURE__ */ B({
44
44
  xxl: {},
45
45
  flex: {},
46
46
  valuePropName: { default: "checked" },
47
+ initialValue: {},
47
48
  field: { default: () => ({}) },
48
49
  disabled: { type: Boolean, default: !1 }
49
50
  },
50
51
  setup(u) {
51
- const c = u, d = _();
52
- return (l, C) => (h(), y(S, t(r(o(m)(c, ["field", "disabled"]))), i({
52
+ const c = u, i = _();
53
+ return (l, C) => (h(), y(S, t(r(o(m)(c, ["field", "disabled"]))), d({
53
54
  default: s(() => [
54
- v(k, g({ disabled: l.disabled }, l.field), i({ _: 2 }, [
55
- n(o(m)(d, o(f)), (b, e) => ({
55
+ v(k, g({ disabled: l.disabled }, l.field), d({ _: 2 }, [
56
+ n(o(m)(i, o(f)), (b, e) => ({
56
57
  name: e,
57
58
  fn: s((a) => [
58
59
  p(l.$slots, e, t(r(a || {})))
@@ -62,7 +63,7 @@ const L = /* @__PURE__ */ B({
62
63
  ]),
63
64
  _: 2
64
65
  }, [
65
- n(o(x)(d, o(f)), (b, e) => ({
66
+ n(o(x)(i, o(f)), (b, e) => ({
66
67
  name: e,
67
68
  fn: s((a) => [
68
69
  p(l.$slots, e, t(r(a || {})))
@@ -72,5 +73,5 @@ const L = /* @__PURE__ */ B({
72
73
  }
73
74
  });
74
75
  export {
75
- L as default
76
+ I as default
76
77
  };
@@ -44,55 +44,56 @@ const E = /* @__PURE__ */ g({
44
44
  flex: {},
45
45
  bordered: { type: Boolean },
46
46
  valuePropName: {},
47
+ initialValue: {},
47
48
  field: { default: () => ({}) },
48
49
  placeholder: {},
49
50
  disabled: { type: Boolean, default: !1 }
50
51
  },
51
52
  setup(v, { expose: h }) {
52
- const { Text: y } = P, i = x(), B = v, l = S();
53
+ const { Text: y } = P, i = x(), B = v, o = S();
53
54
  return h({
54
55
  focus: (e) => {
55
56
  var a;
56
- (a = l.value) == null || a.focus(e);
57
+ (a = o.value) == null || a.focus(e);
57
58
  },
58
59
  blur: () => {
59
60
  var e;
60
- (e = l.value) == null || e.blur();
61
+ (e = o.value) == null || e.blur();
61
62
  },
62
63
  setSelectionRange: (e, a, r) => {
63
- var o;
64
- (o = l.value) == null || o.setSelectionRange(e, a, r);
64
+ var l;
65
+ (l = o.value) == null || l.setSelectionRange(e, a, r);
65
66
  },
66
67
  select: () => {
67
68
  var e;
68
- (e = l.value) == null || e.select();
69
+ (e = o.value) == null || e.select();
69
70
  },
70
71
  input: _(() => {
71
72
  var e;
72
- return (e = l.value) == null ? void 0 : e.input;
73
+ return (e = o.value) == null ? void 0 : e.input;
73
74
  })
74
75
  }), (e, a) => (k(), F(N, n(p(t(m)(B, ["field", "disabled", "placeholder"]))), u({
75
76
  default: d(() => [
76
77
  R(t(y), C({
77
78
  ref_key: "inputRef",
78
- ref: l,
79
+ ref: o,
79
80
  disabled: e.disabled,
80
81
  placeholder: e.placeholder
81
82
  }, e.field), u({ _: 2 }, [
82
- f(t(m)(i, t(b)), (r, o) => ({
83
- name: o,
83
+ f(t(m)(i, t(b)), (r, l) => ({
84
+ name: l,
84
85
  fn: d((s) => [
85
- c(e.$slots, o, n(p(s || {})))
86
+ c(e.$slots, l, n(p(s || {})))
86
87
  ])
87
88
  }))
88
89
  ]), 1040, ["disabled", "placeholder"])
89
90
  ]),
90
91
  _: 2
91
92
  }, [
92
- f(t(A)(i, t(b)), (r, o) => ({
93
- name: o,
93
+ f(t(A)(i, t(b)), (r, l) => ({
94
+ name: l,
94
95
  fn: d((s) => [
95
- c(e.$slots, o, n(p(s || {})))
96
+ c(e.$slots, l, n(p(s || {})))
96
97
  ])
97
98
  }))
98
99
  ]), 1040));
@@ -44,6 +44,7 @@ const z = /* @__PURE__ */ v({
44
44
  flex: {},
45
45
  bordered: { type: Boolean },
46
46
  valuePropName: {},
47
+ initialValue: {},
47
48
  field: { default: () => ({}) },
48
49
  placeholder: {},
49
50
  disabled: { type: Boolean, default: !1 }
@@ -42,13 +42,14 @@ const $ = /* @__PURE__ */ c({
42
42
  xxl: {},
43
43
  flex: {},
44
44
  valuePropName: {},
45
+ initialValue: {},
45
46
  field: { default: () => ({}) },
46
47
  placeholder: {},
47
48
  disabled: { type: Boolean, default: !1 }
48
49
  },
49
- setup(p, { expose: n }) {
50
- const { TextArea: i } = C, f = b(), u = p, l = x();
51
- return n({
50
+ setup(p, { expose: i }) {
51
+ const { TextArea: n } = C, u = b(), f = p, l = x();
52
+ return i({
52
53
  focus: (e) => {
53
54
  var o;
54
55
  (o = l.value) == null || o.focus(e);
@@ -61,9 +62,9 @@ const $ = /* @__PURE__ */ c({
61
62
  var e;
62
63
  return (e = l.value) == null ? void 0 : e.resizableTextArea;
63
64
  })
64
- }), (e, o) => (v(), y(S, r(t(s(F)(u, ["field", "disabled", "placeholder"]))), B({
65
+ }), (e, o) => (v(), y(S, r(t(s(F)(f, ["field", "disabled", "placeholder"]))), B({
65
66
  default: d(() => [
66
- A(s(i), g({
67
+ A(s(n), g({
67
68
  ref_key: "textAreaRef",
68
69
  ref: l,
69
70
  disabled: e.disabled,
@@ -72,7 +73,7 @@ const $ = /* @__PURE__ */ c({
72
73
  ]),
73
74
  _: 2
74
75
  }, [
75
- _(f, (z, a) => ({
76
+ _(u, (z, a) => ({
76
77
  name: a,
77
78
  fn: d((m) => [
78
79
  k(e.$slots, a, r(t(m || {})))
@@ -28,7 +28,7 @@ declare const _default: __VLS_WithTemplateSlots< DefineComponent<__VLS_WithDefau
28
28
  open: undefined;
29
29
  showCancel: boolean;
30
30
  }>, {
31
- resetFields: (name?: NamePath | undefined) => void;
31
+ resetFields: () => void;
32
32
  clearValidate: (name?: NamePath | undefined) => void;
33
33
  validateFields: (nameList?: string | NamePath[] | undefined, options?: ValidateOptions | undefined) => Promise<Partial<any>> | undefined;
34
34
  getFieldsValue: (nameList?: true | InternalNamePath[] | undefined) => Partial<any> | undefined;
@@ -173,9 +173,9 @@ const _e = /* @__PURE__ */ q({
173
173
  !e && i(r) || m(e);
174
174
  }
175
175
  return S({
176
- resetFields: (e) => {
177
- var t;
178
- (t = o.value) == null || t.resetFields(e);
176
+ resetFields: () => {
177
+ var e;
178
+ (e = o.value) == null || e.resetFields();
179
179
  },
180
180
  clearValidate: (e) => {
181
181
  var t;
@@ -1,24 +1,23 @@
1
- import { isVNode as J, defineComponent as K, useSlots as Q, ref as X, unref as o, shallowRef as P, computed as C, watch as k, cloneVNode as Y, createVNode as a, Fragment as Z, openBlock as A, createBlock as E, mergeProps as ee, withCtx as N, resolveDynamicComponent as te } from "vue";
2
- import { Flex as T, Space as oe, Button as y } from "ant-design-vue";
1
+ import { isVNode as ee, defineComponent as te, useSlots as ae, ref as oe, unref as t, shallowRef as j, computed as C, watch as I, cloneVNode as le, createVNode as l, Fragment as S, openBlock as c, createBlock as h, mergeProps as ne, withCtx as R, resolveDynamicComponent as F, createElementBlock as re, renderList as se } from "vue";
2
+ import { Col as B, Flex as D, Space as ue, Button as b, Row as pe } from "ant-design-vue";
3
3
  import "../ap-form.vue.mjs";
4
- import "../ap-form-item-group/index.vue2.mjs";
5
4
  import "../ap-form-item.vue2.mjs";
6
5
  import "../../hooks/index.mjs";
7
- import { genRealChildren as V } from "../ap-form-item-group/helper.mjs";
8
- import { DoubleRightOutlined as ae } from "@ant-design/icons-vue";
6
+ import { genRealChildren as O } from "../ap-form-item-group/helper.mjs";
7
+ import { DoubleRightOutlined as ie } from "@ant-design/icons-vue";
9
8
  import "../../config-provider/index.mjs";
10
9
  import "../style/search-form.css";
11
- import { omit as le } from "lodash-unified";
12
- import { useControllableValue as ne } from "../../hooks/useControllableValue.mjs";
13
- import { useNamespace as re } from "../../config-provider/hooks/use-namespace.mjs";
14
- import { useLocale as se } from "../../config-provider/hooks/use-locale.mjs";
15
- import I from "../ap-form-item.vue.mjs";
16
- import pe from "../ap-form.vue2.mjs";
17
- import ce from "../ap-form-item-group/index.vue.mjs";
18
- function ie(i) {
19
- return typeof i == "function" || Object.prototype.toString.call(i) === "[object Object]" && !J(i);
10
+ import { isArray as ce, omit as de } from "lodash-unified";
11
+ import { isDef as fe } from "../../utils/index.mjs";
12
+ import { useControllableValue as me } from "../../hooks/useControllableValue.mjs";
13
+ import { useNamespace as he } from "../../config-provider/hooks/use-namespace.mjs";
14
+ import { useLocale as xe } from "../../config-provider/hooks/use-locale.mjs";
15
+ import L from "../ap-form-item.vue.mjs";
16
+ import Ce from "../ap-form.vue2.mjs";
17
+ function ge(d) {
18
+ return typeof d == "function" || Object.prototype.toString.call(d) === "[object Object]" && !ee(d);
20
19
  }
21
- const s = 24, Pe = /* @__PURE__ */ K({
20
+ const p = 24, Ie = /* @__PURE__ */ te({
22
21
  name: "ApFormSearchForm",
23
22
  __name: "index",
24
23
  props: {
@@ -97,113 +96,138 @@ const s = 24, Pe = /* @__PURE__ */ K({
97
96
  }
98
97
  },
99
98
  emits: ["update:collapse"],
100
- setup(i, {
101
- expose: j,
102
- emit: M
99
+ setup(d, {
100
+ expose: M,
101
+ emit: $
103
102
  }) {
104
- var S;
105
- const l = Q(), t = i, O = M, {
106
- value: u,
107
- updateValue: $
108
- } = ne(t, O, {
103
+ var N;
104
+ const r = ae(), a = d, q = $, {
105
+ value: f,
106
+ updateValue: z
107
+ } = me(a, q, {
109
108
  valuePropName: "collapse",
110
109
  defaultValuePropName: "defaultCollapse"
111
110
  }), {
112
- b: D
113
- } = re("ap-form-search-form"), {
114
- t: g
115
- } = se(), m = X();
116
- function L() {
117
- $(!o(u));
111
+ b: U
112
+ } = he("ap-form-search-form"), {
113
+ t: v
114
+ } = xe(), x = oe();
115
+ function W() {
116
+ z(!t(f));
118
117
  }
119
- function q() {
120
- var e, n;
121
- (n = (e = m.value) == null ? void 0 : e.validateFields()) == null || n.then(t.onSubmit);
118
+ function G() {
119
+ var e, o;
120
+ (o = (e = x.value) == null ? void 0 : e.validateFields()) == null || o.then(a.onSubmit);
122
121
  }
123
- function z() {
124
- var e, n, f;
125
- t.customReset || (n = (e = m.value) == null ? void 0 : e.resetFields) == null || n.call(e), (f = t.onReset) == null || f.call(t);
122
+ function H() {
123
+ var e, o, n;
124
+ a.customReset || (o = (e = x.value) == null ? void 0 : e.resetFields) == null || o.call(e), (n = a.onReset) == null || n.call(a);
126
125
  }
127
- const R = P(V(l.default())), d = P((S = l.extra) == null ? void 0 : S.call(l)), F = C(() => Math.floor(s / t.countPerRow));
128
- k(() => l.default(), (e) => {
129
- R.value = V(e);
130
- }), k(() => {
126
+ const w = j(O(r.default())), m = j((N = r.extra) == null ? void 0 : N.call(r)), E = C(() => Math.floor(p / a.countPerRow));
127
+ I(() => r.default(), (e) => {
128
+ w.value = O(e);
129
+ }), I(() => {
131
130
  var e;
132
- return (e = l.extra) == null ? void 0 : e.call(l);
131
+ return (e = r.extra) == null ? void 0 : e.call(r);
133
132
  }, (e) => {
134
- d.value = e;
133
+ m.value = e;
135
134
  });
136
- const U = C(() => {
137
- let e;
138
- const n = [...o(R)], f = [], b = [], r = o(F);
139
- let h = 0;
140
- n.forEach((p) => {
141
- const c = p.props;
142
- c != null && c.hidden ? f.push(p) : (h += c.span || r, b.push(p));
135
+ const J = (e) => fe(e) ? (ce(e) ? e : [e]).join("") : Date.now(), g = C(() => {
136
+ const e = [...t(w)], o = [], n = [], s = t(E);
137
+ let y = 0;
138
+ e.forEach((u) => {
139
+ const i = u.props;
140
+ i != null && i.hidden ? o.push(u) : (y += i.span || s, n.push(u));
143
141
  });
144
- const B = s - (h + r) % s, w = B < r ? s : B, x = s - r * (o(d) && !t.extraInAction ? 2 : 1), W = !t.forceExpand && h > x;
145
- let _ = 0;
146
- const G = b.map((p, c) => {
147
- const v = p.props;
148
- return _ += v.span || r, Y(p, {
149
- span: v.span || r,
150
- key: `ApFormSearchFormItem-${c}-${Date.now()}`,
151
- hidden: !t.forceExpand && o(u) && _ > x
152
- });
153
- }), H = s - Math.min(x, _) - r;
154
- return a(Z, null, [G, f, a(I, {
155
- span: o(F)
142
+ const k = p - (y + s) % p, Q = k < s ? p : k, A = p - s * (t(m) && !a.extraInAction ? 2 : 1), X = !a.forceExpand && y > A;
143
+ let P = 0, T = 0;
144
+ const Y = n.map((u, i) => {
145
+ const _ = u.props, V = _.span || s;
146
+ if (P += V, !a.forceExpand && t(f) && P > A) {
147
+ o.push(le(u, {
148
+ hidden: !0
149
+ }));
150
+ return;
151
+ }
152
+ return T += V, {
153
+ node: u,
154
+ span: _.span || s,
155
+ key: `ApFormSearchFormItem-${i}-${J(_.name)}`
156
+ };
157
+ }).filter(Boolean), Z = p - T - s;
158
+ return {
159
+ hideNode: l(S, null, [o]),
160
+ nodes: Y,
161
+ defaultExtraSpan: Q,
162
+ actualExtraSpan: Z,
163
+ showCollapse: X
164
+ };
165
+ }), K = C(() => {
166
+ let e;
167
+ const o = t(g);
168
+ return l(S, null, [l(B, {
169
+ span: t(t(E))
156
170
  }, {
157
- default: () => [a(T, {
158
- justify: "space-between"
159
- }, {
160
- default: () => [a(oe, null, {
161
- default: () => [a(y, {
162
- type: "primary",
163
- onClick: q,
164
- loading: t.submitLoading
165
- }, {
166
- default: () => [t.searchText || g("ap.apForm.search.search")]
167
- }), a(y, {
168
- onClick: z
169
- }, {
170
- default: () => [t.resetText || g("ap.apForm.search.reset")]
171
- }), W ? a(y, {
172
- onClick: L,
173
- icon: a(ae, {
174
- style: "color:#B8C3D1",
175
- rotate: o(u) ? 90 : -90
176
- }, null)
177
- }, null) : null]
178
- }), t.extraInAction ? o(d) : null]
171
+ default: () => [l(L, null, {
172
+ default: () => [l(D, {
173
+ justify: "space-between"
174
+ }, {
175
+ default: () => [l(ue, null, {
176
+ default: () => [l(b, {
177
+ type: "primary",
178
+ onClick: G,
179
+ loading: a.submitLoading
180
+ }, {
181
+ default: () => [a.searchText || v("ap.apForm.search.search")]
182
+ }), l(b, {
183
+ onClick: H
184
+ }, {
185
+ default: () => [a.resetText || v("ap.apForm.search.reset")]
186
+ }), o.showCollapse ? l(b, {
187
+ onClick: W,
188
+ icon: l(ie, {
189
+ style: "color:#B8C3D1",
190
+ rotate: t(f) ? 90 : -90
191
+ }, null)
192
+ }, null) : null]
193
+ }), a.extraInAction ? t(m) : null]
194
+ })]
179
195
  })]
180
- }), !t.extraInAction && o(d) ? a(I, {
181
- span: o(u) ? H : w
196
+ }), !a.extraInAction && t(m) ? l(B, {
197
+ span: t(f) ? o.actualExtraSpan : o.defaultExtraSpan
182
198
  }, {
183
- default: () => [a(T, {
184
- justify: !o(u) && w === s ? "start" : "end"
185
- }, ie(e = o(d)) ? e : {
186
- default: () => [e]
199
+ default: () => [l(L, null, {
200
+ default: () => [l(D, {
201
+ justify: !t(f) && o.defaultExtraSpan === p ? "start" : "end"
202
+ }, ge(e = t(m)) ? e : {
203
+ default: () => [e]
204
+ })]
187
205
  })]
188
206
  }) : null]);
189
207
  });
190
- return j({
191
- apForm: C(() => o(m))
192
- }), (e, n) => (A(), E(pe, ee({
193
- class: o(D)(),
208
+ return M({
209
+ apForm: C(() => t(x))
210
+ }), (e, o) => (c(), h(Ce, ne({
211
+ class: t(U)(),
194
212
  ref_key: "apForm",
195
- ref: m
196
- }, o(le)(t, ["collapse", "defaultCollapse", "onUpdate:collapse", "searchText", "resetText", "onSubmit", "onReset", "extraInAction", "forceExpand", "countPerRow"])), {
197
- default: N(() => [a(ce, {
198
- "count-per-row": t.countPerRow
213
+ ref: x
214
+ }, t(de)(a, ["collapse", "defaultCollapse", "onUpdate:collapse", "searchText", "resetText", "onSubmit", "onReset", "extraInAction", "forceExpand", "countPerRow"])), {
215
+ default: R(() => [(c(), h(F(g.value.hideNode))), l(t(pe), {
216
+ gutter: 16
199
217
  }, {
200
- default: N(() => [(A(), E(te(U.value)))]),
218
+ default: R(() => [(c(!0), re(S, null, se(g.value.nodes, (n) => (c(), h(t(B), {
219
+ key: n.key,
220
+ span: n.span
221
+ }, {
222
+ default: R(() => [(c(), h(F(n.node)))]),
223
+ _: 2
224
+ }, 1032, ["span"]))), 128)), (c(), h(F(K.value)))]),
201
225
  _: 1
202
- }, 8, ["count-per-row"])]),
226
+ })]),
203
227
  _: 1
204
228
  }, 16, ["class"]));
205
229
  }
206
230
  });
207
231
  export {
208
- Pe as default
232
+ Ie as default
209
233
  };