@aplus-frontend/ui 0.6.0-beta.8 → 0.6.0-beta.9

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 (121) hide show
  1. package/es/src/ap-form/interface.d.ts +4 -0
  2. package/es/src/ap-form/search-form/components/popover-filter.vue.d.ts +131 -2
  3. package/es/src/ap-form/search-form/components/popover-filter.vue2.mjs +40 -36
  4. package/es/src/ap-form/search-form/components/popover-sorter/index.vue2.mjs +79 -71
  5. package/es/src/ap-form/search-form/index.vue.d.ts +6 -2
  6. package/es/src/ap-form/search-form/index.vue.mjs +76 -75
  7. package/es/src/ap-table/hooks/use-table-paging-ng.d.ts +1 -1
  8. package/es/src/ap-table/hooks/use-table-paging-ng.mjs +1 -1
  9. package/es/src/ap-tag/ap-tag-group.vue.mjs +32 -28
  10. package/es/src/business/ap-expand-alert/ApExpandAlert.vue2.mjs +89 -70
  11. package/es/src/business/ap-export-group/ApExportGroup.vue2.mjs +18 -17
  12. package/es/src/business/ap-input-radio/ApInputRadio.vue2.mjs +27 -25
  13. package/es/src/business/ap-label/constans.mjs +1 -1
  14. package/es/src/business/ap-view/components/main-button-content.vue2.mjs +55 -51
  15. package/es/src/business/hooks/usePageListApGrid.mjs +1 -1
  16. package/lib/src/ap-form/interface.d.ts +4 -0
  17. package/lib/src/ap-form/search-form/components/popover-filter.vue.d.ts +131 -2
  18. package/lib/src/ap-form/search-form/components/popover-filter.vue2.js +1 -1
  19. package/lib/src/ap-form/search-form/components/popover-sorter/index.vue2.js +1 -1
  20. package/lib/src/ap-form/search-form/index.vue.d.ts +6 -2
  21. package/lib/src/ap-form/search-form/index.vue.js +1 -1
  22. package/lib/src/ap-table/hooks/use-table-paging-ng.d.ts +1 -1
  23. package/lib/src/ap-table/hooks/use-table-paging-ng.js +1 -1
  24. package/lib/src/ap-tag/ap-tag-group.vue.js +1 -1
  25. package/lib/src/business/ap-expand-alert/ApExpandAlert.vue2.js +1 -1
  26. package/lib/src/business/ap-export-group/ApExportGroup.vue2.js +1 -1
  27. package/lib/src/business/ap-input-radio/ApInputRadio.vue2.js +1 -1
  28. package/lib/src/business/ap-label/constans.js +1 -1
  29. package/lib/src/business/ap-view/components/main-button-content.vue2.js +1 -1
  30. package/lib/src/business/hooks/usePageListApGrid.js +1 -1
  31. package/package.json +1 -1
  32. package/theme/ap-action/item-dropdown.css +1 -1
  33. package/theme/ap-action/item.css +2 -2
  34. package/theme/ap-appendix/ap-appendix.css +3 -3
  35. package/theme/ap-appendix/ap-appendix.less +2 -2
  36. package/theme/ap-attachment/ap-attachment.css +3 -2
  37. package/theme/ap-attachment/ap-attachment.less +2 -2
  38. package/theme/ap-batch-action/ap-batch-action.css +1 -1
  39. package/theme/ap-button/ap-button.css +1 -1
  40. package/theme/ap-card/ap-card.css +1 -1
  41. package/theme/ap-descriptions/ap-descriptions.css +1 -1
  42. package/theme/ap-download/ap-download.css +1 -1
  43. package/theme/ap-expand-alert/ap-expand-alert.css +2 -2
  44. package/theme/ap-expand-alert/ap-expand-alert.less +2 -1
  45. package/theme/ap-field/checkbox.css +1 -1
  46. package/theme/ap-field/index.css +1 -1
  47. package/theme/ap-field/number.css +1 -1
  48. package/theme/ap-field/radio.css +1 -1
  49. package/theme/ap-field/text-area.css +1 -1
  50. package/theme/ap-form/ap-form-item-group.css +1 -1
  51. package/theme/ap-form/ap-form-item.css +1 -1
  52. package/theme/ap-form/drawer-form.css +1 -1
  53. package/theme/ap-form/index.css +14 -5
  54. package/theme/ap-form/item-text-group.css +1 -1
  55. package/theme/ap-form/item-text.css +1 -1
  56. package/theme/ap-form/modal-form.css +1 -1
  57. package/theme/ap-form/search-form-sorter.css +6 -5
  58. package/theme/ap-form/search-form-sorter.less +1 -0
  59. package/theme/ap-form/search-form.css +14 -5
  60. package/theme/ap-form/search-form.less +8 -0
  61. package/theme/ap-grid/editable.css +1 -1
  62. package/theme/ap-grid/index.css +15 -7
  63. package/theme/ap-grid/index.less +0 -1
  64. package/theme/ap-group-search/ap-extension-select.css +1 -1
  65. package/theme/ap-group-search/ap-group-search.css +1 -1
  66. package/theme/ap-group-search/ap-popover-select.css +1 -1
  67. package/theme/ap-image/ap-image.css +1 -1
  68. package/theme/ap-input-radio/ap-input-radio.css +1 -1
  69. package/theme/ap-label/ap-label.css +1 -1
  70. package/theme/ap-ladder/ap-ladder.css +2 -1
  71. package/theme/ap-ladder/ap-ladder.less +1 -0
  72. package/theme/ap-layout/ap-info-layout.css +1 -1
  73. package/theme/ap-list/index.css +1 -1
  74. package/theme/ap-product-info/ap-product-info.css +1 -1
  75. package/theme/ap-select-layout/ap-select-layout.css +1 -1
  76. package/theme/ap-size-input/ap-size-input.css +1 -1
  77. package/theme/ap-status/ap-status.css +2 -2
  78. package/theme/ap-status/ap-status.less +1 -1
  79. package/theme/ap-summary/index.css +1 -1
  80. package/theme/ap-table/ap-table-index.css +1 -1
  81. package/theme/ap-table/ap-table-paragraph-ellipsis.css +1 -1
  82. package/theme/ap-table/ap-table.css +16 -8
  83. package/theme/ap-table/setting/index.css +2 -3
  84. package/theme/ap-table/setting/modal.css +2 -2
  85. package/theme/ap-table/setting/select-group.css +1 -1
  86. package/theme/ap-table/setting/sortable-item-meta.css +1 -1
  87. package/theme/ap-table/setting/sortable-item.css +1 -1
  88. package/theme/ap-table/setting/sorter.css +1 -2
  89. package/theme/ap-table-modal/index.css +16 -8
  90. package/theme/ap-tag/ap-tag-group.css +3 -3
  91. package/theme/ap-tag/ap-tag-group.less +2 -3
  92. package/theme/ap-tag/ap-tag.css +4 -4
  93. package/theme/ap-tag/ap-tag.less +3 -3
  94. package/theme/ap-title/ap-title.css +6 -4
  95. package/theme/ap-title/ap-title.less +5 -3
  96. package/theme/ap-upload/index.css +6 -6
  97. package/theme/ap-upload/multiple-file.css +2 -2
  98. package/theme/ap-upload/multiple-file.less +1 -1
  99. package/theme/ap-upload/picture.css +3 -3
  100. package/theme/ap-upload/picture.less +2 -2
  101. package/theme/ap-upload/single-file.css +3 -3
  102. package/theme/ap-upload/single-file.less +2 -2
  103. package/theme/ap-upload/upload.css +1 -1
  104. package/theme/ap-upload-single/index.css +1 -1
  105. package/theme/ap-view/ap-view.css +1 -1
  106. package/theme/batch-input-group/index.css +2 -1
  107. package/theme/batch-input-group/popover-input.css +2 -1
  108. package/theme/batch-input-group/popover-input.less +1 -0
  109. package/theme/check-card/index.css +4 -4
  110. package/theme/editable-table/index.css +15 -6
  111. package/theme/full-screen/index.css +1 -1
  112. package/theme/index.css +45 -33
  113. package/theme/mask/index.css +1 -1
  114. package/theme/mixins/config.less +1 -1
  115. package/theme/mixins/mixins.css +1 -1
  116. package/theme/scroll-bar/index.css +1 -1
  117. package/theme/scroll-view/index.css +1 -1
  118. package/theme/splitter/index.css +3 -3
  119. package/theme/text/group.css +1 -1
  120. package/theme/text/index.css +2 -2
  121. package/theme/work-order-modal/index.css +1 -1
@@ -1,25 +1,25 @@
1
- import { isVNode as ee, defineComponent as te, useSlots as oe, ref as ae, shallowRef as j, computed as _, unref as n, watch as L, createVNode as t, Fragment as w, createBlock as x, openBlock as d, mergeProps as ne, withCtx as F, resolveDynamicComponent as A, createElementBlock as le, renderList as re } from "vue";
2
- import { Col as R, Flex as B, Button as U, Row as se } from "@aplus-frontend/antdv";
1
+ import { isVNode as oe, defineComponent as ae, useSlots as ne, ref as L, shallowRef as U, computed as _, unref as n, watch as V, createVNode as t, Fragment as w, createBlock as x, openBlock as d, mergeProps as le, withCtx as A, resolveDynamicComponent as B, createElementBlock as re, renderList as se } from "vue";
2
+ import { Col as R, Flex as N, Button as M, Row as ie } from "@aplus-frontend/antdv";
3
3
  import "../ap-form.vue.mjs";
4
4
  import "../item/index.vue2.mjs";
5
- import { genRealChildren as V } from "../item-group/helper.mjs";
5
+ import { genRealChildren as W } from "../item-group/helper.mjs";
6
6
  import "../../config-provider/index.mjs";
7
- import { isArray as ie, isBoolean as ue, omit as ce } from "lodash-unified";
8
- import { isDef as M } from "../../utils/index.mjs";
9
- import { execFunc as W, diffFormItem as pe } from "./utils.mjs";
7
+ import { isArray as ue, isBoolean as ce, omit as pe } from "lodash-unified";
8
+ import { isDef as D } from "../../utils/index.mjs";
9
+ import { execFunc as q, diffFormItem as de } from "./utils.mjs";
10
10
  import "./components/popover-filter.vue.mjs";
11
- import { useCountPerRow as de } from "./hooks/use-count-per-row.mjs";
11
+ import { useCountPerRow as fe } from "./hooks/use-count-per-row.mjs";
12
12
  import "./components/popover-sorter/index.vue.mjs";
13
- import { useNamespace as fe } from "../../config-provider/hooks/use-namespace.mjs";
14
- import { useLocale as me } from "../../config-provider/hooks/use-locale.mjs";
15
- import D from "../item/index.vue.mjs";
16
- import he from "./components/popover-filter.vue2.mjs";
17
- import xe from "./components/popover-sorter/index.vue2.mjs";
18
- import ye from "../ap-form.vue2.mjs";
19
- function ge(f) {
20
- return typeof f == "function" || Object.prototype.toString.call(f) === "[object Object]" && !ee(f);
13
+ import { useNamespace as me } from "../../config-provider/hooks/use-namespace.mjs";
14
+ import { useLocale as he } from "../../config-provider/hooks/use-locale.mjs";
15
+ import z from "../item/index.vue.mjs";
16
+ import xe from "./components/popover-filter.vue2.mjs";
17
+ import ye from "./components/popover-sorter/index.vue2.mjs";
18
+ import ge from "../ap-form.vue2.mjs";
19
+ function ve(f) {
20
+ return typeof f == "function" || Object.prototype.toString.call(f) === "[object Object]" && !oe(f);
21
21
  }
22
- const s = 24, Le = /* @__PURE__ */ te({
22
+ const s = 24, Ue = /* @__PURE__ */ ae({
23
23
  name: "ApFormSearchForm",
24
24
  __name: "index",
25
25
  props: {
@@ -111,102 +111,103 @@ const s = 24, Le = /* @__PURE__ */ te({
111
111
  }
112
112
  },
113
113
  setup(f, {
114
- expose: q
114
+ expose: H
115
115
  }) {
116
- var E;
117
- const i = oe(), o = f, {
116
+ var P;
117
+ const i = ne(), o = f, {
118
118
  b: m
119
- } = fe("ap-form-search-form"), {
120
- t: N
121
- } = me(), z = de(o), y = ae();
122
- function k() {
119
+ } = me("ap-form-search-form"), {
120
+ t: k
121
+ } = he(), G = fe(o), y = L();
122
+ function I() {
123
123
  var a;
124
124
  const e = (a = y.value) == null ? void 0 : a.getFieldsValueTransformed(!0);
125
- W(o.onSubmit, e);
125
+ q(o.onSubmit, e);
126
126
  }
127
- function H() {
127
+ function J() {
128
128
  var e, a;
129
- o.customReset || (a = (e = y.value) == null ? void 0 : e.resetFields) == null || a.call(e), W(o.onReset);
129
+ o.customReset || (a = (e = y.value) == null ? void 0 : e.resetFields) == null || a.call(e), q(o.onReset);
130
130
  }
131
- const G = (e) => M(e) ? (ie(e) ? e : [e]).join("") : Date.now();
132
- let I = [];
133
- const u = j(V(i.default())), c = j((E = i.extra) == null ? void 0 : E.call(i)), T = _(() => Math.floor(s / n(z)));
134
- L(() => i.default(), (e) => {
135
- I = u.value, u.value = pe(I, V(e));
136
- }), L(() => {
131
+ const K = (e) => D(e) ? (ue(e) ? e : [e]).join("") : Date.now();
132
+ let T = [];
133
+ const u = U(W(i.default())), b = L(!1), c = U((P = i.extra) == null ? void 0 : P.call(i)), E = _(() => Math.floor(s / n(G)));
134
+ V(() => i.default(), (e) => {
135
+ T = u.value, u.value = de(T, W(e)), b.value = !1;
136
+ }), V(() => {
137
137
  var e;
138
138
  return (e = i.extra) == null ? void 0 : e.call(i);
139
139
  }, (e) => {
140
140
  c.value = e;
141
141
  });
142
142
  const l = _(() => {
143
- const e = u.value, a = [], r = [], g = [], h = n(T);
144
- let v = 0, b = 0;
145
- const Q = s * o.maxRows - h * (n(c) && !o.extraInAction ? 2 : 1);
146
- e.forEach((S, Z) => {
147
- const p = S.props;
148
- if (ue(p.hidden) ? !!p.hidden : M(p.hidden))
149
- a.push(S);
143
+ const e = u.value, a = [], r = [], g = [], h = n(E);
144
+ let v = 0, S = 0;
145
+ const Y = s * o.maxRows - h * (n(c) && !o.extraInAction ? 2 : 1);
146
+ e.forEach((F, te) => {
147
+ const p = F.props;
148
+ if (ce(p.hidden) ? !!p.hidden : D(p.hidden))
149
+ a.push(F);
150
150
  else {
151
151
  let C = p.span || h;
152
- const O = {
153
- node: S,
152
+ const $ = {
153
+ node: F,
154
154
  span: C,
155
- key: `ApFormSearchFormItem-${Z}-${G(p.name)}-${p._signal}`
156
- }, $ = s - v % s;
157
- $ < C && (C += $), v += C, v > Q ? r.push(O) : (b = v, g.push(O));
155
+ key: `ApFormSearchFormItem-${te}-${K(p.name)}-${p._signal}`
156
+ }, j = s - v % s;
157
+ j < C && (C += j), v += C, v > Y ? r.push($) : (S = v, g.push($));
158
158
  }
159
159
  });
160
- const P = s - (b + h) % s, X = b % s < h, Y = P < h ? s : P;
160
+ const O = s - (S + h) % s, Z = S % s < h, ee = O < h ? s : O;
161
161
  return {
162
162
  hideNode: t(w, null, [a]),
163
163
  nodes: g,
164
164
  collapseNodes: r,
165
- extraSpan: Y,
166
- lastRowOnlyIncludeActionAndExtra: X
165
+ extraSpan: ee,
166
+ lastRowOnlyIncludeActionAndExtra: Z
167
167
  };
168
168
  });
169
- function J(e) {
170
- u.value = [...e];
169
+ function Q(e) {
170
+ u.value = [...e], b.value = !0;
171
171
  }
172
- const K = _(() => {
172
+ const X = _(() => {
173
173
  let e;
174
174
  const a = t(R, {
175
- span: n(T),
175
+ span: n(E),
176
176
  key: "actionWrapper"
177
177
  }, {
178
- default: () => [t(D, null, {
179
- default: () => [t(B, {
178
+ default: () => [t(z, null, {
179
+ default: () => [t(N, {
180
180
  wrap: "wrap",
181
181
  justify: l.value.lastRowOnlyIncludeActionAndExtra && !(n(c) && o.extraInAction) ? "flex-end" : "space-between"
182
182
  }, {
183
- default: () => [t(B, {
183
+ default: () => [t(N, {
184
184
  gap: 8,
185
185
  wrap: "wrap"
186
186
  }, {
187
187
  default: () => [t("div", {
188
188
  class: m("column-setting-trigger-wrapper")
189
- }, [l.value.collapseNodes.length ? t(he, {
190
- onSubmit: k,
189
+ }, [l.value.collapseNodes.length ? t(xe, {
190
+ onSubmit: I,
191
191
  config: l.value.collapseNodes,
192
192
  submitLoading: o.submitLoading
193
- }, null) : null, o.sortable && u.value.length ? t(xe, {
193
+ }, null) : null, o.sortable && u.value.length ? t(ye, {
194
194
  children: u.value,
195
- onClickConfirm: J
196
- }, null) : null]), t(U, {
195
+ onClickConfirm: Q,
196
+ sorted: b.value
197
+ }, null) : null]), t(M, {
197
198
  type: "primary",
198
- onClick: k,
199
+ onClick: I,
199
200
  loading: o.submitLoading,
200
201
  htmlType: "submit",
201
202
  class: m("action-btn")
202
203
  }, {
203
- default: () => [o.searchText || N("ap.apForm.search.search")]
204
- }), t(U, {
205
- onClick: H,
204
+ default: () => [o.searchText || k("ap.apForm.search.search")]
205
+ }), t(M, {
206
+ onClick: J,
206
207
  type: "text",
207
208
  class: [m("action-btn"), m("action-btn-reset")]
208
209
  }, {
209
- default: () => [o.resetText || N("ap.apForm.search.reset")]
210
+ default: () => [o.resetText || k("ap.apForm.search.reset")]
210
211
  })]
211
212
  }), o.extraInAction ? n(c) : null]
212
213
  })]
@@ -215,10 +216,10 @@ const s = 24, Le = /* @__PURE__ */ te({
215
216
  span: l.value.extraSpan,
216
217
  key: "extraNode"
217
218
  }, {
218
- default: () => [t(D, null, {
219
- default: () => [t(B, {
219
+ default: () => [t(z, null, {
220
+ default: () => [t(N, {
220
221
  justify: l.value.extraSpan === s || l.value.lastRowOnlyIncludeActionAndExtra ? "start" : "flex-end"
221
- }, ge(e = n(c)) ? e : {
222
+ }, ve(e = n(c)) ? e : {
222
223
  default: () => [e]
223
224
  })]
224
225
  })]
@@ -227,23 +228,23 @@ const s = 24, Le = /* @__PURE__ */ te({
227
228
  }, null);
228
229
  return l.value.lastRowOnlyIncludeActionAndExtra ? t(w, null, [r || g, a]) : t(w, null, [a, r]);
229
230
  });
230
- return q({
231
+ return H({
231
232
  apForm: _(() => n(y))
232
- }), (e, a) => (d(), x(ye, ne({
233
+ }), (e, a) => (d(), x(ge, le({
233
234
  ref_key: "apForm",
234
235
  ref: y,
235
236
  class: n(m)()
236
- }, n(ce)(o, ["collapse", "defaultCollapse", "onUpdate:collapse", "searchText", "resetText", "onSubmit", "onReset", "extraInAction", "forceExpand", "countPerRow"])), {
237
- default: F(() => [(d(), x(A(l.value.hideNode))), t(n(se), {
237
+ }, n(pe)(o, ["collapse", "defaultCollapse", "onUpdate:collapse", "searchText", "resetText", "onSubmit", "onReset", "extraInAction", "forceExpand", "countPerRow"])), {
238
+ default: A(() => [(d(), x(B(l.value.hideNode))), t(n(ie), {
238
239
  gutter: 8
239
240
  }, {
240
- default: F(() => [(d(!0), le(w, null, re(l.value.nodes, (r) => (d(), x(n(R), {
241
+ default: A(() => [(d(!0), re(w, null, se(l.value.nodes, (r) => (d(), x(n(R), {
241
242
  key: r.key,
242
243
  span: r.span
243
244
  }, {
244
- default: F(() => [(d(), x(A(r.node)))]),
245
+ default: A(() => [(d(), x(B(r.node)))]),
245
246
  _: 2
246
- }, 1032, ["span"]))), 128)), (d(), x(A(K.value)))]),
247
+ }, 1032, ["span"]))), 128)), (d(), x(B(X.value)))]),
247
248
  _: 1
248
249
  })]),
249
250
  _: 1
@@ -251,5 +252,5 @@ const s = 24, Le = /* @__PURE__ */ te({
251
252
  }
252
253
  });
253
254
  export {
254
- Le as default
255
+ Ue as default
255
256
  };
@@ -60,7 +60,7 @@ type InternalDataType<DataType = Recordable> = {
60
60
  loading: boolean;
61
61
  };
62
62
  export declare const DEFAULT_CURRENT = 1;
63
- export declare const DEFAULT_PAGE_SIZE = 10;
63
+ export declare const DEFAULT_PAGE_SIZE = 20;
64
64
  export declare const useTablePaging: <DataType = any, ParamsType = Record<string, any>>({ manual, request, defaultParams, defaultData, formatParams, paramsValueTypeMap, resetFieldsIgnores, filterFields, sortFields, namespace, pagination }: UseTablePagingParams<DataType, ParamsType>) => {
65
65
  formRef: Ref<ApFormSearchFormExpose | undefined, ApFormSearchFormExpose | undefined>;
66
66
  submit: () => void;
@@ -6,7 +6,7 @@ import { isArray as q, isEqualWith as de, isUndefined as pe } from "lodash-unifi
6
6
  import { isDef as N } from "../../utils/index.mjs";
7
7
  import { useLocale as me } from "../../config-provider/hooks/use-locale.mjs";
8
8
  import { useNamespace as he } from "../../config-provider/hooks/use-namespace.mjs";
9
- const h = 1, D = 10, B = {
9
+ const h = 1, D = 20, B = {
10
10
  defaultCurrent: h,
11
11
  defaultPageSize: D,
12
12
  showLessItems: !1,
@@ -1,4 +1,4 @@
1
- import { defineComponent as D, ref as C, computed as n, unref as f, watch as N, nextTick as S, onMounted as j, onUnmounted as G, createBlock as d, openBlock as c, mergeProps as b, withCtx as g, createElementVNode as o, normalizeStyle as k, normalizeClass as W, createElementBlock as _, createCommentVNode as R, Fragment as A, renderList as F, toDisplayString as T, renderSlot as I, createTextVNode as U } from "vue";
1
+ import { defineComponent as D, ref as b, computed as n, unref as f, watch as N, nextTick as S, onMounted as j, onUnmounted as G, createBlock as d, openBlock as u, mergeProps as k, withCtx as g, createElementVNode as o, normalizeStyle as W, normalizeClass as _, createElementBlock as T, createCommentVNode as R, Fragment as A, renderList as F, toDisplayString as E, renderSlot as I, createTextVNode as U } from "vue";
2
2
  import { Tooltip as q } from "@aplus-frontend/antdv";
3
3
  import H from "@ant-design/icons-vue";
4
4
  import "./ap-tag.vue2.mjs";
@@ -8,7 +8,7 @@ import { useLocale as K } from "../config-provider/hooks/use-locale.mjs";
8
8
  import { useGlobalConfig as O } from "../config-provider/hooks/use-global-config.mjs";
9
9
  import { useNamespace as Q } from "../config-provider/hooks/use-namespace.mjs";
10
10
  import X from "./ap-tag.vue.mjs";
11
- const ue = /* @__PURE__ */ D({
11
+ const ce = /* @__PURE__ */ D({
12
12
  __name: "ap-tag-group",
13
13
  props: {
14
14
  list: { default: () => [] },
@@ -16,15 +16,15 @@ const ue = /* @__PURE__ */ D({
16
16
  ellipsisColor: {},
17
17
  ellipsis: { default: () => ({}) }
18
18
  },
19
- setup(E) {
20
- const { t: z } = K(), i = E, B = O("uiMode"), { b: V, bm: v } = Q("tag-group"), u = C(), r = n(() => ({
19
+ setup(z) {
20
+ const { t: V } = K(), i = z, v = O("uiMode"), { b: $, bm: h } = Q("tag-group"), c = b(), r = n(() => ({
21
21
  ...{
22
- iconColor: "#34B77C",
22
+ iconColor: v.value === "aplus" ? "#182948" : "#333",
23
23
  symbol: "icon",
24
- text: z("ap.common.more")
24
+ text: V("ap.common.more")
25
25
  },
26
26
  ...i.ellipsis
27
- })), $ = n(() => r.value.tooltip && typeof r.value.tooltip == "object" ? J(r.value.tooltip, ["trigger", "title"]) : {}), p = n(() => f(m) < i.list.length), m = C(0), L = n(() => i.list.map((e) => e.text).join("、")), M = n(() => [V()].filter(Boolean)), P = n(() => B.value === "aplus" ? [v("ellipsis-text", "aplus")] : [v("ellipsis-text", "admin")]), h = (e, t) => {
27
+ })), B = n(() => r.value.tooltip && typeof r.value.tooltip == "object" ? J(r.value.tooltip, ["trigger", "title"]) : {}), p = n(() => f(m) < i.list.length), m = b(0), L = n(() => i.list.map((e) => e.text).join("、")), M = n(() => [$()].filter(Boolean)), P = n(() => v.value === "aplus" ? [h("ellipsis-text", "aplus")] : [h("ellipsis-text", "admin")]), y = (e, t) => {
28
28
  let s = document.createElement("canvas");
29
29
  const l = s.getContext("2d");
30
30
  l.font = `${e}px system-ui`;
@@ -34,21 +34,21 @@ const ue = /* @__PURE__ */ D({
34
34
  }, 0), a.width;
35
35
  }, x = () => {
36
36
  let e = 0, t = 0;
37
- if (!u.value) return;
38
- const s = u.value.offsetWidth;
37
+ if (!c.value) return;
38
+ const s = c.value.offsetWidth;
39
39
  for (let l of i.list) {
40
- const a = l.size === "large" ? 16 : 12, w = h(
40
+ const a = l.size === "large" ? 16 : 12, C = y(
41
41
  l.size === "large" ? 14 : 12,
42
42
  l.text
43
43
  ) + a + 2 + i.space;
44
- if (e += w, e > s) {
45
- e -= w;
44
+ if (e += C, e > s) {
45
+ e -= C;
46
46
  break;
47
47
  }
48
48
  t++;
49
49
  }
50
50
  if (t < i.list.length) {
51
- const a = h(12, r.value.text);
51
+ const a = y(12, r.value.text);
52
52
  i.ellipsis.symbol === "icon" ? e += 16 : e += a, e > s && t--;
53
53
  }
54
54
  m.value = t;
@@ -64,7 +64,7 @@ const ue = /* @__PURE__ */ D({
64
64
  immediate: !0
65
65
  }
66
66
  );
67
- const y = () => {
67
+ const w = () => {
68
68
  x();
69
69
  };
70
70
  return j(() => {
@@ -74,35 +74,38 @@ const ue = /* @__PURE__ */ D({
74
74
  `[ApTagGroup]: \`${e}\` is deprecated, please use \`${t}\` instead.`
75
75
  );
76
76
  }
77
- ), window.addEventListener("resize", y);
77
+ ), window.addEventListener("resize", w);
78
78
  }), G(() => {
79
- window.removeEventListener("resize", y);
80
- }), (e, t) => (c(), d(f(q), b({ trigger: "hover" }, $.value), {
79
+ window.removeEventListener("resize", w);
80
+ }), (e, t) => (u(), d(f(q), k({ trigger: "hover" }, B.value), {
81
81
  title: g(() => [
82
82
  I(e.$slots, "tooltip", { tags: e.list }, () => [
83
- U(T(L.value), 1)
83
+ U(E(L.value), 1)
84
84
  ])
85
85
  ]),
86
86
  default: g(() => [
87
87
  o("div", {
88
88
  ref_key: "container",
89
- ref: u,
90
- class: W(M.value),
91
- style: k({
89
+ ref: c,
90
+ class: _(M.value),
91
+ style: W({
92
92
  pointerEvents: p.value ? "auto" : "none"
93
93
  // opacity: isUpdating ? '0' : '1'
94
94
  })
95
95
  }, [
96
- (c(!0), _(A, null, F(e.list, (s, l) => (c(), d(X, b({ ref_for: !0 }, s, {
96
+ (u(!0), T(A, null, F(e.list, (s, l) => (u(), d(X, k({ ref_for: !0 }, s, {
97
97
  key: l,
98
98
  style: {
99
99
  display: l >= m.value ? "none" : "inline-block",
100
100
  marginRight: `${e.space}px`
101
101
  }
102
102
  }), null, 16, ["style"]))), 128)),
103
- p.value && r.value.symbol === "icon" ? (c(), d(f(H), {
103
+ p.value && r.value.symbol === "icon" ? (u(), d(f(H), {
104
104
  key: 0,
105
- style: k({ color: e.ellipsisColor || r.value.iconColor })
105
+ style: W({
106
+ color: e.ellipsisColor || r.value.iconColor,
107
+ cursor: "pointer"
108
+ })
106
109
  }, {
107
110
  component: g(() => t[0] || (t[0] = [
108
111
  o("svg", {
@@ -160,10 +163,11 @@ const ue = /* @__PURE__ */ D({
160
163
  ], -1)
161
164
  ])),
162
165
  _: 1
163
- }, 8, ["style"])) : p.value && r.value.symbol === "text" ? (c(), _("span", {
166
+ }, 8, ["style"])) : p.value && r.value.symbol === "text" ? (u(), T("span", {
164
167
  key: 1,
165
- class: W(P.value)
166
- }, T(r.value.text), 3)) : R("", !0)
168
+ class: _(P.value),
169
+ style: { cursor: "pointer" }
170
+ }, E(r.value.text), 3)) : R("", !0)
167
171
  ], 6)
168
172
  ]),
169
173
  _: 3
@@ -171,5 +175,5 @@ const ue = /* @__PURE__ */ D({
171
175
  }
172
176
  });
173
177
  export {
174
- ue as default
178
+ ce as default
175
179
  };
@@ -1,13 +1,13 @@
1
- import { defineComponent as W, computed as f, ref as h, watch as A, nextTick as w, createElementBlock as n, openBlock as a, normalizeClass as s, unref as t, createVNode as x, withCtx as m, createElementVNode as b, normalizeStyle as c, renderSlot as N, createBlock as g, toDisplayString as i, resolveDynamicComponent as I, Fragment as C, renderList as j, createCommentVNode as L, createTextVNode as q } from "vue";
1
+ import { defineComponent as K, computed as c, ref as w, watch as x, nextTick as f, createElementBlock as i, openBlock as a, normalizeClass as n, unref as t, createVNode as b, withCtx as m, createElementVNode as S, normalizeStyle as y, renderSlot as H, createBlock as $, toDisplayString as u, resolveDynamicComponent as I, Fragment as C, renderList as W, createCommentVNode as L, createTextVNode as j } from "vue";
2
2
  import { DownOutlined as J } from "@ant-design/icons-vue";
3
- import { Alert as K, Tooltip as P } from "@aplus-frontend/antdv";
4
- import { ApActionItem as Q } from "../../ap-action/index.mjs";
3
+ import { Alert as P, Tooltip as Q } from "@aplus-frontend/antdv";
4
+ import { ApActionItem as U } from "../../ap-action/index.mjs";
5
5
  import "../../config-provider/index.mjs";
6
- import { isString as E } from "lodash-unified";
7
- import { useLocale as U } from "../../config-provider/hooks/use-locale.mjs";
8
- import { useNamespace as X } from "../../config-provider/hooks/use-namespace.mjs";
9
- import { useGlobalConfig as Y } from "../../config-provider/hooks/use-global-config.mjs";
10
- const Z = ["onClick"], ie = /* @__PURE__ */ W({
6
+ import { isNil as X, isString as E } from "lodash-unified";
7
+ import { useLocale as Y } from "../../config-provider/hooks/use-locale.mjs";
8
+ import { useNamespace as Z } from "../../config-provider/hooks/use-namespace.mjs";
9
+ import { useGlobalConfig as _ } from "../../config-provider/hooks/use-global-config.mjs";
10
+ const ee = ["onClick"], de = /* @__PURE__ */ K({
11
11
  __name: "ApExpandAlert",
12
12
  props: {
13
13
  type: { default: "warning" },
@@ -24,124 +24,143 @@ const Z = ["onClick"], ie = /* @__PURE__ */ W({
24
24
  showIcon: { type: Boolean, default: !0 }
25
25
  },
26
26
  emits: ["choose", "expand"],
27
- setup($, { expose: z, emit: H }) {
28
- const S = H, r = $, { t: B } = U(), V = f(() => {
29
- if (r.type != "card")
30
- return r.type;
31
- }), l = h(""), u = h(null), D = f(() => ({
27
+ setup(z, { expose: D, emit: V }) {
28
+ const A = V, p = z, { t: B } = Y(), M = c(() => {
29
+ if (p.type != "card")
30
+ return p.type;
31
+ }), l = w(""), d = w(null), R = c(() => ({
32
32
  fontWeight: "400",
33
33
  wordBreak: "break-all",
34
34
  overflow: "hidden",
35
35
  display: "-webkit-box",
36
36
  webkitLineClamp: l.value,
37
- webkitBoxOrient: "vertical"
37
+ webkitBoxOrient: "vertical",
38
+ lineHeight: "18px"
38
39
  }));
39
- function R() {
40
- l.value === "1" ? (l.value = "", S("expand", "expand")) : (l.value = "1", S("expand", "collapse"));
40
+ function q() {
41
+ l.value === "1" ? (l.value = "", A("expand", "expand")) : (l.value = "1", A("expand", "collapse"));
41
42
  }
42
- const M = f(() => l.value === "1" ? B("ap.apExpandAlert.expand") : B("ap.apExpandAlert.collapse")), y = h(!0), T = f(() => l.value !== "1");
43
+ const F = c(() => l.value === "1" ? B("ap.apExpandAlert.expand") : B("ap.apExpandAlert.collapse")), h = w(!0), N = c(() => l.value !== "1");
43
44
  function v(e) {
44
45
  e ? l.value = "" : l.value = "1";
45
46
  }
46
- A(
47
- () => r.data,
47
+ x(
48
+ () => p.data,
48
49
  () => {
49
- l.value = "", w(() => {
50
- if (u.value) {
51
- const e = Number(u.value.clientHeight), d = Number(
52
- parseInt(u.value.style.lineHeight)
50
+ l.value = "", f(() => {
51
+ if (d.value) {
52
+ const e = Number(d.value.clientHeight), s = Number(
53
+ parseInt(d.value.style.lineHeight)
53
54
  );
54
- e < d * Number(r.rows) && T.value ? y.value = !1 : y.value = !0;
55
+ e < s * Number(p.rows) && N.value ? h.value = !1 : h.value = !0;
55
56
  }
56
57
  });
57
58
  },
58
59
  {
59
60
  immediate: !0
60
61
  }
61
- ), A(
62
- () => r.defaultExpand,
62
+ ), x(
63
+ () => p.defaultExpand,
63
64
  (e) => {
64
- e ? w(() => {
65
+ e ? f(() => {
65
66
  v(e);
66
- }) : w(() => {
67
+ }) : f(() => {
67
68
  v(e);
68
69
  });
69
70
  },
70
71
  { immediate: !0 }
72
+ ), x(
73
+ () => p.contentStyle,
74
+ (e) => {
75
+ X(e.lineHeight) || f(() => {
76
+ const s = document.querySelector(
77
+ `#${k} .ant-alert-action`
78
+ ), r = document.querySelector(
79
+ `#${k} .ant-alert-icon`
80
+ );
81
+ console.log(s), s && s.setAttribute("style", `line-height: ${e.lineHeight}`), r && r.setAttribute("style", `line-height: ${e.lineHeight}`);
82
+ });
83
+ },
84
+ {
85
+ deep: !0,
86
+ immediate: !0,
87
+ flush: "post"
88
+ }
71
89
  );
72
- const { b: O, e: o, m: F } = X("ap-expand-alert"), G = Y("uiMode", "aplus");
73
- return z({
90
+ const { b: T, e: o, m: O } = Z("ap-expand-alert"), k = `${T()}-key-${Date.now()}-${(Math.random() * 1e6).toFixed(0)}`, G = _("uiMode", "aplus");
91
+ return D({
74
92
  setExpand: v
75
- }), (e, d) => (a(), n("div", {
76
- class: s([t(O)(), `${t(F)(t(G))}`])
93
+ }), (e, s) => (a(), i("div", {
94
+ id: k,
95
+ class: n([t(T)(), `${t(O)(t(G))}`])
77
96
  }, [
78
- x(t(K), {
79
- type: V.value,
97
+ b(t(P), {
98
+ type: M.value,
80
99
  "show-icon": e.showIcon,
81
- class: s([t(o)("antAlert"), e.type == "card" ? "card-alert" : ""])
100
+ class: n([t(o)("antAlert"), e.type == "card" ? "card-alert" : ""])
82
101
  }, {
83
102
  action: m(() => [
84
- y.value ? (a(), g(t(Q), {
103
+ h.value ? (a(), $(t(U), {
85
104
  key: 0,
86
105
  size: "small",
87
106
  style: { "font-size": "12px", "padding-left": "16px" },
88
- onClick: d[0] || (d[0] = (p) => R())
107
+ onClick: s[0] || (s[0] = (r) => q())
89
108
  }, {
90
109
  default: m(() => [
91
- b("span", {
92
- class: s(t(o)("expandText"))
93
- }, i(M.value), 3),
94
- x(t(J), {
95
- class: s(T.value ? t(o)("expandIcon") : t(o)("collapseIcon"))
110
+ S("span", {
111
+ class: n(t(o)("expandText"))
112
+ }, u(F.value), 3),
113
+ b(t(J), {
114
+ class: n(N.value ? t(o)("expandIcon") : t(o)("collapseIcon"))
96
115
  }, null, 8, ["class"])
97
116
  ]),
98
117
  _: 1
99
118
  })) : L("", !0)
100
119
  ]),
101
120
  message: m(() => [
102
- b("div", {
121
+ S("div", {
103
122
  ref_key: "ellipsisBoxRef",
104
- ref: u,
105
- style: c({ ...D.value, ...e.contentStyle }),
106
- class: s(t(o)("alertContent"))
123
+ ref: d,
124
+ style: y({ ...R.value, ...e.contentStyle }),
125
+ class: n(t(o)("alertContent"))
107
126
  }, [
108
- N(e.$slots, "default", {}, () => [
109
- t(E)(e.prefix) ? (a(), n("span", {
127
+ H(e.$slots, "default", {}, () => [
128
+ t(E)(e.prefix) ? (a(), i("span", {
110
129
  key: 0,
111
- class: s(t(o)("prefix")),
112
- style: c(e.prefixStyle)
113
- }, i(e.prefix), 7)) : (a(), g(I(e.prefix), {
130
+ class: n(t(o)("prefix")),
131
+ style: y(e.prefixStyle)
132
+ }, u(e.prefix), 7)) : (a(), $(I(e.prefix), {
114
133
  key: 1,
115
- style: c(e.prefixStyle)
134
+ style: y(e.prefixStyle)
116
135
  }, null, 8, ["style"])),
117
- t(E)(e.data) ? (a(), n("span", {
136
+ t(E)(e.data) ? (a(), i("span", {
118
137
  key: 2,
119
- class: s(t(o)("text"))
120
- }, i(e.data), 3)) : (a(!0), n(C, { key: 3 }, j(e.data, (p, k) => (a(), n(C, { key: k }, [
121
- x(t(P), {
138
+ class: n(t(o)("text"))
139
+ }, u(e.data), 3)) : (a(!0), i(C, { key: 3 }, W(e.data, (r, g) => (a(), i(C, { key: g }, [
140
+ b(t(Q), {
122
141
  title: e.tipTitle ? e.tipTitle : null
123
142
  }, {
124
143
  default: m(() => [
125
- N(e.$slots, "item", {
126
- record: p,
127
- index: k
144
+ H(e.$slots, "item", {
145
+ record: r,
146
+ index: g
128
147
  }, () => [
129
- b("span", {
130
- class: s(t(o)("showItem")),
131
- onClick: (_) => e.$emit("choose", p)
132
- }, i(e.mapLabel ? p[e.mapLabel] : p), 11, Z)
148
+ S("span", {
149
+ class: n(t(o)("showItem")),
150
+ onClick: (te) => e.$emit("choose", r)
151
+ }, u(e.mapLabel ? r[e.mapLabel] : r), 11, ee)
133
152
  ])
134
153
  ]),
135
154
  _: 2
136
155
  }, 1032, ["title"]),
137
- k !== e.data.length - 1 ? (a(), n("span", {
156
+ g !== e.data.length - 1 ? (a(), i("span", {
138
157
  key: 0,
139
- class: s(t(o)("spliter")),
140
- style: c(e.separatorStyle)
158
+ class: n(t(o)("spliter")),
159
+ style: y(e.separatorStyle)
141
160
  }, [
142
- t(E)(e.separator) ? (a(), n(C, { key: 0 }, [
143
- q(i(e.separator), 1)
144
- ], 64)) : (a(), g(I(e.separator), { key: 1 }))
161
+ t(E)(e.separator) ? (a(), i(C, { key: 0 }, [
162
+ j(u(e.separator), 1)
163
+ ], 64)) : (a(), $(I(e.separator), { key: 1 }))
145
164
  ], 6)) : L("", !0)
146
165
  ], 64))), 128))
147
166
  ])
@@ -153,5 +172,5 @@ const Z = ["onClick"], ie = /* @__PURE__ */ W({
153
172
  }
154
173
  });
155
174
  export {
156
- ie as default
175
+ de as default
157
176
  };