@aplus-frontend/ui 0.1.40 → 0.1.42

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (77) hide show
  1. package/es/src/ap-action/group/index.vue.d.ts +1 -1
  2. package/es/src/ap-download/interface.d.ts +1 -1
  3. package/es/src/ap-field/date/index.vue.d.ts +1 -1
  4. package/es/src/ap-field/date-range/index.vue.d.ts +1 -1
  5. package/es/src/ap-field/number/index.vue.d.ts +1 -1
  6. package/es/src/ap-field/rate/index.vue.d.ts +1 -1
  7. package/es/src/ap-field/select/index.vue.d.ts +1 -1
  8. package/es/src/ap-form/ap-form-item.vue.d.ts +1 -1
  9. package/es/src/ap-form/items/number/index.vue.d.ts +16 -16
  10. package/es/src/ap-form/items/text/index.vue.d.ts +12 -12
  11. package/es/src/ap-form/items/text/password.vue.d.ts +12 -12
  12. package/es/src/ap-form/items/text-area/index.vue.d.ts +12 -12
  13. package/es/src/ap-table/constants.d.ts +209 -209
  14. package/es/src/ap-table/utils.d.ts +72 -72
  15. package/es/src/ap-table/utils.mjs +69 -69
  16. package/es/src/ap-upload/components/SingleFile.vue2.mjs +41 -39
  17. package/es/src/base-button/index.d.ts +4 -4
  18. package/es/src/business/ap-batch-action-group/ApBatchActionGroup.vue2.mjs +42 -43
  19. package/es/src/business/ap-batch-action-group/interface.d.ts +4 -1
  20. package/es/src/business/ap-label/ApLabel.d.ts +1 -1
  21. package/es/src/business/index.d.ts +24 -16
  22. package/es/src/check-card/group.vue.d.ts +1 -1
  23. package/es/src/config-provider/config-provider-props.d.ts +5 -0
  24. package/es/src/config-provider/config-provider-props.mjs +4 -0
  25. package/es/src/config-provider/config-provider.d.ts +90 -3
  26. package/es/src/config-provider/config-provider.mjs +27 -23
  27. package/es/src/config-provider/css-var.d.ts +88 -0
  28. package/es/src/{theme/css-var/index.mjs → config-provider/css-var.mjs} +1 -0
  29. package/es/src/config-provider/hooks/use-global-config.d.ts +5 -0
  30. package/es/src/config-provider/index.d.ts +486 -9
  31. package/es/src/editable-table/utils.mjs +51 -51
  32. package/es/src/theme/antd-global-overwrite/admin/button.css +0 -3
  33. package/es/src/theme/antd-global-overwrite/admin/index.css +0 -3
  34. package/es/src/theme/antd-global-overwrite/aplus/button.css +0 -3
  35. package/es/src/theme/antd-global-overwrite/aplus/index.css +0 -3
  36. package/es/src/type.d.ts +3 -0
  37. package/es/src/utils/config-provider-preset.d.ts +3 -3
  38. package/lib/src/ap-action/group/index.vue.d.ts +1 -1
  39. package/lib/src/ap-download/interface.d.ts +1 -1
  40. package/lib/src/ap-field/date/index.vue.d.ts +1 -1
  41. package/lib/src/ap-field/date-range/index.vue.d.ts +1 -1
  42. package/lib/src/ap-field/number/index.vue.d.ts +1 -1
  43. package/lib/src/ap-field/rate/index.vue.d.ts +1 -1
  44. package/lib/src/ap-field/select/index.vue.d.ts +1 -1
  45. package/lib/src/ap-form/ap-form-item.vue.d.ts +1 -1
  46. package/lib/src/ap-form/items/number/index.vue.d.ts +16 -16
  47. package/lib/src/ap-form/items/text/index.vue.d.ts +12 -12
  48. package/lib/src/ap-form/items/text/password.vue.d.ts +12 -12
  49. package/lib/src/ap-form/items/text-area/index.vue.d.ts +12 -12
  50. package/lib/src/ap-table/constants.d.ts +209 -209
  51. package/lib/src/ap-table/utils.d.ts +72 -72
  52. package/lib/src/ap-table/utils.js +1 -1
  53. package/lib/src/ap-upload/components/SingleFile.vue2.js +1 -1
  54. package/lib/src/base-button/index.d.ts +4 -4
  55. package/lib/src/business/ap-batch-action-group/ApBatchActionGroup.vue2.js +1 -1
  56. package/lib/src/business/ap-batch-action-group/interface.d.ts +4 -1
  57. package/lib/src/business/ap-label/ApLabel.d.ts +1 -1
  58. package/lib/src/business/index.d.ts +24 -16
  59. package/lib/src/check-card/group.vue.d.ts +1 -1
  60. package/lib/src/config-provider/config-provider-props.d.ts +5 -0
  61. package/lib/src/config-provider/config-provider-props.js +1 -1
  62. package/lib/src/config-provider/config-provider.d.ts +90 -3
  63. package/lib/src/config-provider/config-provider.js +1 -1
  64. package/lib/src/config-provider/css-var.d.ts +88 -0
  65. package/lib/src/{theme/css-var/index.js → config-provider/css-var.js} +1 -1
  66. package/lib/src/config-provider/hooks/use-global-config.d.ts +5 -0
  67. package/lib/src/config-provider/index.d.ts +486 -9
  68. package/lib/src/editable-table/utils.js +1 -1
  69. package/lib/src/theme/antd-global-overwrite/admin/button.css +0 -3
  70. package/lib/src/theme/antd-global-overwrite/admin/index.css +0 -3
  71. package/lib/src/theme/antd-global-overwrite/aplus/button.css +0 -3
  72. package/lib/src/theme/antd-global-overwrite/aplus/index.css +0 -3
  73. package/lib/src/type.d.ts +3 -0
  74. package/lib/src/utils/config-provider-preset.d.ts +3 -3
  75. package/package.json +2 -2
  76. package/es/src/theme/css-var/index.d.ts +0 -7
  77. package/lib/src/theme/css-var/index.d.ts +0 -7
@@ -1,20 +1,20 @@
1
- import { isVNode as m, createVNode as u, mergeProps as a, cloneVNode as T, Fragment as b } from "vue";
2
- import { isObject as c, isArray as f, isUndefined as h, isFunction as p, omit as y, isBoolean as g, isString as j } from "lodash-unified";
3
- import { apTableRenderItemMap as F, apTableFormItemMap as O } from "./constants.mjs";
4
- import { isType as E } from "@fruits-chain/utils";
1
+ import { isVNode as b, createVNode as s, mergeProps as a, cloneVNode as y, Fragment as g } from "vue";
2
+ import { isObject as f, isArray as p, isUndefined as h, isFunction as d, omit as j, isBoolean as F, isString as O } from "lodash-unified";
3
+ import { apTableRenderItemMap as E, apTableFormItemMap as x } from "./constants.mjs";
4
+ import { isType as N } from "@fruits-chain/utils";
5
5
  import "../ap-form/index.mjs";
6
- import { Tooltip as x } from "ant-design-vue";
7
- import { QuestionCircleOutlined as N } from "@ant-design/icons-vue";
8
- import S from "../ap-form/ap-form-item.vue.mjs";
9
- function I(t) {
10
- return typeof t == "function" || Object.prototype.toString.call(t) === "[object Object]" && !m(t);
6
+ import { Tooltip as S } from "ant-design-vue";
7
+ import { QuestionCircleOutlined as I } from "@ant-design/icons-vue";
8
+ import v from "../ap-form/ap-form-item.vue.mjs";
9
+ function P(t) {
10
+ return typeof t == "function" || Object.prototype.toString.call(t) === "[object Object]" && !b(t);
11
11
  }
12
- const v = (t, e, n) => {
12
+ const V = (t, e, n) => {
13
13
  let r = {};
14
- return c(t) ? Object.keys(t).forEach((o) => {
15
- c(t[o]) ? r[o] = v(t[o], e[o], n) : r[o] = n(t[o], e);
14
+ return f(t) ? Object.keys(t).forEach((o) => {
15
+ f(t[o]) ? r[o] = V(t[o], e[o], n) : r[o] = n(t[o], e);
16
16
  }) : r = n(t, e), r;
17
- }, H = (t, e) => {
17
+ }, Q = (t, e) => {
18
18
  switch (t) {
19
19
  case "dayjs":
20
20
  return e.valueOf();
@@ -26,7 +26,7 @@ const v = (t, e, n) => {
26
26
  }
27
27
  case "multiple":
28
28
  case "multipleNumber":
29
- return f(e) ? e : [e];
29
+ return p(e) ? e : [e];
30
30
  case "boolean":
31
31
  return e;
32
32
  case "object":
@@ -35,15 +35,15 @@ const v = (t, e, n) => {
35
35
  return e;
36
36
  }
37
37
  };
38
- function J(t) {
39
- return f(t) ? t.join(".") : t;
38
+ function U(t) {
39
+ return p(t) ? t.join(".") : t;
40
40
  }
41
- function P(t) {
41
+ function w(t) {
42
42
  const e = Object.prototype.toString.call(t).match(/^\[object (.*)\]$/)[1].toLowerCase();
43
43
  return e === "string" && typeof t == "object" ? "object" : t === null ? "null" : t === void 0 ? "undefined" : e;
44
44
  }
45
- const V = (t) => P(t) === "map" ? t : new Map(Object.entries(t || {})), d = (t) => {
46
- const e = [], n = V(t);
45
+ const A = (t) => w(t) === "map" ? t : new Map(Object.entries(t || {})), m = (t) => {
46
+ const e = [], n = A(t);
47
47
  return n.forEach((r, o) => {
48
48
  const i = n.get(o) || n.get(`${o}`);
49
49
  if (i) {
@@ -63,7 +63,7 @@ const V = (t) => P(t) === "map" ? t : new Map(Object.entries(t || {})), d = (t)
63
63
  });
64
64
  }
65
65
  }), e;
66
- }, L = (t) => h(t) || t < 0 ? 0 : t, Q = (t, e, n) => {
66
+ }, z = (t) => h(t) || t < 0 ? 0 : t, G = (t, e, n) => {
67
67
  if (n)
68
68
  return n;
69
69
  const r = ["select", "date"], o = ["text", "textArea", "number"];
@@ -74,74 +74,74 @@ const V = (t) => P(t) === "map" ? t : new Map(Object.entries(t || {})), d = (t)
74
74
  if (o.includes(e))
75
75
  return t("ap.common.inputText");
76
76
  };
77
- function w(t, e) {
78
- return !t || !p(t) ? t : t(e);
77
+ function C(t, e) {
78
+ return !t || !d(t) ? t : t(e);
79
79
  }
80
- function U(t) {
80
+ function K(t) {
81
81
  let e = t.valueType || "text";
82
82
  return t.valueEnum && (e = "status"), e;
83
83
  }
84
- function z(t, e, n, r) {
85
- var s;
86
- const o = F[t];
84
+ function X(t, e, n, r) {
85
+ var u;
86
+ const o = E[t];
87
87
  if (o)
88
- return u(o, a(e, {
88
+ return s(o, a(e, {
89
89
  mode: "read"
90
90
  }), null);
91
91
  const i = r == null ? void 0 : r[t];
92
- return ((s = i == null ? void 0 : i.render) == null ? void 0 : s.call(i, e.value, n, e)) || e.value;
92
+ return ((u = i == null ? void 0 : i.render) == null ? void 0 : u.call(i, e.value, n, e)) || e.value;
93
93
  }
94
- function G(t, e) {
94
+ function Y(t, e) {
95
95
  if (t.customRenderFormItem)
96
96
  return () => {
97
97
  const o = t.customRenderFormItem(t);
98
- return T(o, {
98
+ return y(o, {
99
99
  ...t.fieldProps,
100
100
  span: t.span,
101
101
  ...o.props || {}
102
102
  });
103
103
  };
104
- const n = O[t.valueType];
104
+ const n = x[t.valueType];
105
105
  if (n)
106
106
  return n;
107
107
  const r = e == null ? void 0 : e[t.valueType];
108
108
  return () => {
109
109
  var i;
110
110
  const o = (i = r == null ? void 0 : r.renderFormItem) == null ? void 0 : i.call(r, t.fieldProps.field);
111
- return o ? u(S, a(t.fieldProps, {
111
+ return o ? s(v, a(t.fieldProps, {
112
112
  span: t.span
113
- }), I(o) ? o : {
113
+ }), P(o) ? o : {
114
114
  default: () => [o]
115
115
  }) : null;
116
116
  };
117
117
  }
118
- function K(t, e) {
119
- const n = w(t.fieldProps, e), r = (n == null ? void 0 : n.field) || n || {}, o = t.valueType === "switch", i = t.valueType === "index", s = o ? {
118
+ function Z(t, e) {
119
+ const n = C(t.fieldProps, e), r = (n == null ? void 0 : n.field) || n || {}, o = t.valueType === "switch", i = t.valueType === "index", u = o ? {
120
120
  checked: e.value
121
121
  } : {
122
122
  value: i ? e.index + 1 : e.value
123
123
  };
124
124
  return t.valueEnum && (r.valueEnum = t.valueEnum), {
125
- ...y(r, ["request"]),
126
- ...s
125
+ ...j(r, ["request"]),
126
+ ...u
127
127
  };
128
128
  }
129
- function X(t) {
129
+ function k(t) {
130
130
  const e = {
131
131
  ...t
132
132
  };
133
- return g(t.filters) && t.filters && t.valueEnum && (e.filters = d(t.valueEnum)), e;
133
+ return F(t.filters) && t.filters && t.valueEnum && (e.filters = m(t.valueEnum)), e;
134
134
  }
135
- function Y(t, e) {
135
+ function H(t, e) {
136
136
  var r;
137
137
  const n = e || {};
138
138
  return t.valueEnum && !((r = n.field) != null && r.options) && (n.field = {
139
139
  ...n.field,
140
- options: d(t.valueEnum)
140
+ options: m(t.valueEnum)
141
141
  }), n;
142
142
  }
143
- function Z(t) {
144
- if (!E("Object")(t))
143
+ function M(t) {
144
+ if (!N("Object")(t))
145
145
  return t;
146
146
  try {
147
147
  return JSON.stringify(t);
@@ -149,51 +149,51 @@ function Z(t) {
149
149
  return t;
150
150
  }
151
151
  }
152
- function k(t, e, n, r) {
152
+ function tt(t, e, n, r) {
153
153
  const o = n == null ? void 0 : n({
154
154
  title: t.title,
155
155
  column: t
156
- });
157
- if (o && (o.length > 1 || o[0].children && o[0].children !== "v-if"))
156
+ }), i = (o == null ? void 0 : o.filter((T) => T.type !== Symbol.for("v-cmt"))) || [];
157
+ if (o && i.length > 0)
158
158
  return o;
159
- const s = j(t.title) ? u("span", {
159
+ const l = O(t.title) ? s("span", {
160
160
  class: e,
161
161
  title: t.title
162
- }, [t.title]) : t.title, l = t.tooltip ? p(t.tooltip) ? t.tooltip(t) : u(b, null, [t.tooltip]) : null;
163
- return l ? u("span", {
162
+ }, [t.title]) : t.title, c = t.tooltip ? d(t.tooltip) ? t.tooltip(t) : s(g, null, [t.tooltip]) : null;
163
+ return c ? s("span", {
164
164
  style: {
165
165
  display: "inline-flex",
166
166
  alignItems: "center",
167
167
  maxWidth: "100%"
168
168
  }
169
- }, [s, u(x, {
170
- title: l,
169
+ }, [l, s(S, {
170
+ title: c,
171
171
  placement: "bottom"
172
172
  }, {
173
- default: () => [u(N, {
173
+ default: () => [s(I, {
174
174
  style: {
175
175
  padding: "4px",
176
176
  color: r,
177
177
  verticalAlign: "middle"
178
178
  }
179
179
  }, null)]
180
- })]) : s;
180
+ })]) : l;
181
181
  }
182
182
  export {
183
- X as apColumnToColumn,
184
- J as dataIndexToStr,
185
- v as formatParamsValueType,
186
- L as getColumnOrder,
187
- w as getFieldProps,
188
- Q as getPlaceholder,
189
- G as getSearchFormItemRenderNode,
190
- z as getTableCellRenderNode,
191
- K as getTableRenderProps,
192
- U as getTableRenderType,
193
- k as getTableTitle,
194
- V as objectToMap,
195
- Z as objectToString,
196
- H as parseFieldValue,
197
- Y as updateFormProps,
198
- d as valueEnumToArray
183
+ k as apColumnToColumn,
184
+ U as dataIndexToStr,
185
+ V as formatParamsValueType,
186
+ z as getColumnOrder,
187
+ C as getFieldProps,
188
+ G as getPlaceholder,
189
+ Y as getSearchFormItemRenderNode,
190
+ X as getTableCellRenderNode,
191
+ Z as getTableRenderProps,
192
+ K as getTableRenderType,
193
+ tt as getTableTitle,
194
+ A as objectToMap,
195
+ M as objectToString,
196
+ Q as parseFieldValue,
197
+ H as updateFormProps,
198
+ m as valueEnumToArray
199
199
  };
@@ -15,44 +15,46 @@ const ge = ["accept"], he = {
15
15
  }, _e = ["src"], ke = { class: "state-un-title" }, ye = { class: "state-un-subtitle" }, De = {
16
16
  key: 1,
17
17
  class: "state-ing"
18
- }, Ce = { class: "left" }, we = ["src"], Fe = { class: "center" }, Ue = { class: "center-progress" }, Te = /* @__PURE__ */ V({
18
+ }, Ce = { class: "left" }, we = ["src"], Fe = { class: "center" }, Ue = { class: "center-progress" }, Re = /* @__PURE__ */ V({
19
19
  __name: "SingleFile",
20
20
  setup(Ne) {
21
- const { t: r } = fe(), { b: k } = me("ap-upload-single-file"), { put: M, client: B } = ie(), y = s("theme"), j = s("dirName"), D = s("accept") || "*", C = s("maxSize") ?? 500, G = s("title") || r("ap.apUpload.clickOrDragUpload"), w = s("subTitle"), n = s("value"), F = s("needName"), p = s("uploadingCount"), b = s("beforeUpload"), O = s("customRequest"), W = s("getOssAccess"), o = h(null);
21
+ const { t: r } = fe(), { b: k } = me("ap-upload-single-file"), { put: M, client: B } = ie(), y = s("theme"), j = s("dirName"), D = s("accept") || "*", C = s("maxSize") ?? 500, G = s("title") || r("ap.apUpload.clickOrDragUpload"), w = s("subTitle"), l = s("value"), F = s("needName"), p = s("uploadingCount"), b = s("beforeUpload"), O = s("customRequest"), W = s("getOssAccess"), n = h(null);
22
22
  ee(
23
- () => n == null ? void 0 : n.value,
23
+ () => l == null ? void 0 : l.value,
24
24
  function(e) {
25
- if (o.value === null && e) {
26
- const t = re(F, e);
27
- l.value = 3, o.value = new File(
28
- [e],
29
- t,
30
- {}
31
- );
32
- }
25
+ setTimeout(() => {
26
+ if (n.value === null && e) {
27
+ const t = re(F, e);
28
+ o.value = 3, n.value = new File(
29
+ [e],
30
+ t,
31
+ {}
32
+ );
33
+ }
34
+ });
33
35
  },
34
36
  { immediate: !0 }
35
37
  );
36
- const l = h(1), f = h(0), m = h(null), P = te(() => o.value && (n == null ? void 0 : n.value));
38
+ const o = h(1), f = h(0), m = h(null), P = te(() => n.value && (l == null ? void 0 : l.value));
37
39
  function H() {
38
40
  var e;
39
- l.value === 1 && ((e = m.value) == null || e.click());
41
+ o.value === 1 && ((e = m.value) == null || e.click());
40
42
  }
41
- function L(e) {
43
+ function T(e) {
42
44
  e.preventDefault(), e.stopPropagation();
43
45
  }
44
46
  function J(e) {
45
47
  e.dataTransfer.dropEffect = "copy", e.preventDefault(), e.stopPropagation();
46
48
  }
47
49
  function K(e) {
48
- R(e);
50
+ L(e);
49
51
  }
50
52
  function Q(e) {
51
- if (e.preventDefault(), e.stopPropagation(), l.value !== 1)
53
+ if (e.preventDefault(), e.stopPropagation(), o.value !== 1)
52
54
  return;
53
- var t = e.dataTransfer, c = [], T = 0, I = t.files.length;
55
+ var t = e.dataTransfer, c = [], R = 0, I = t.files.length;
54
56
  function v() {
55
- T === I - 1 && K(c), T++;
57
+ R === I - 1 && K(c), R++;
56
58
  }
57
59
  if (t.items !== void 0)
58
60
  for (var U = 0; U < t.items.length; U++) {
@@ -90,9 +92,9 @@ const ge = ["accept"], he = {
90
92
  }
91
93
  function X(e) {
92
94
  const t = e.target;
93
- R(t == null ? void 0 : t.files), m.value && (m.value.value = "");
95
+ L(t == null ? void 0 : t.files), m.value && (m.value.value = "");
94
96
  }
95
- async function R(e) {
97
+ async function L(e) {
96
98
  if (e != null && e.length) {
97
99
  if (typeof b == "function") {
98
100
  if (b(e[0]) === !1)
@@ -111,20 +113,20 @@ const ge = ["accept"], he = {
111
113
  return;
112
114
  }
113
115
  }
114
- if (o.value = e[0], l.value = 2, f.value = 0, n.value = "", p.value++, typeof O == "function") {
116
+ if (n.value = e[0], o.value = 2, f.value = 0, p.value++, typeof O == "function") {
115
117
  O({
116
118
  onProgress: (t) => {
117
119
  f.value = t;
118
120
  },
119
121
  onError: (t) => {
120
- u.warning(t || r("ap.apUpload.networkAnomaly")), l.value = 1, o.value = null, p.value--;
122
+ u.warning(t || r("ap.apUpload.networkAnomaly")), o.value = 1, n.value = null, p.value--;
121
123
  },
122
124
  onSuccess: (t) => {
123
- n.value = $(
125
+ l.value = $(
124
126
  F,
125
127
  t,
126
- o.value.name
127
- ), l.value = 3, p.value--;
128
+ n.value.name
129
+ ), o.value = 3, p.value--;
128
130
  },
129
131
  file: e[0]
130
132
  });
@@ -132,18 +134,18 @@ const ge = ["accept"], he = {
132
134
  }
133
135
  try {
134
136
  await ce(W), M({
135
- file: o.value,
137
+ file: n.value,
136
138
  dirName: j,
137
139
  oss: B,
138
140
  successCallBack(t) {
139
- n.value = $(
141
+ l.value = $(
140
142
  F,
141
143
  t,
142
- o.value.name
143
- ), l.value = 3, p.value--;
144
+ n.value.name
145
+ ), o.value = 3, p.value--;
144
146
  },
145
147
  errorCallBack(t) {
146
- u.warning(t || r("ap.apUpload.networkAnomaly")), l.value = 1, o.value = null, p.value--;
148
+ u.warning(t || r("ap.apUpload.networkAnomaly")), o.value = 1, n.value = null, p.value--;
147
149
  },
148
150
  progressCallBack(t) {
149
151
  f.value = t;
@@ -152,12 +154,12 @@ const ge = ["accept"], he = {
152
154
  } catch (t) {
153
155
  u.warning(
154
156
  typeof (t == null ? void 0 : t.message) == "string" ? t.message : r("ap.apUpload.networkAnomaly")
155
- ), l.value = 1, o.value = null, p.value--;
157
+ ), o.value = 1, n.value = null, p.value--;
156
158
  }
157
159
  }
158
160
  }
159
161
  function Y() {
160
- o.value && !(n != null && n.value) && B.pauseUpload(), l.value = 1, o.value = null, n.value = void 0;
162
+ n.value && !(l != null && l.value) && B.pauseUpload(), o.value = 1, n.value = null, l.value = void 0;
161
163
  }
162
164
  return (e, t) => {
163
165
  var c;
@@ -165,12 +167,12 @@ const ge = ["accept"], he = {
165
167
  class: ae({
166
168
  [a(k)()]: !0,
167
169
  [a(k)("admin")]: a(y) === "admin",
168
- [a(k)("un")]: l.value === 1
170
+ [a(k)("un")]: o.value === 1
169
171
  }),
170
172
  onClick: H,
171
- onDragenter: L,
173
+ onDragenter: T,
172
174
  onDragover: J,
173
- onDragleave: L,
175
+ onDragleave: T,
174
176
  onDrop: Q
175
177
  }, [
176
178
  i("input", {
@@ -181,7 +183,7 @@ const ge = ["accept"], he = {
181
183
  accept: a(D),
182
184
  onChange: X
183
185
  }, null, 40, ge),
184
- l.value === 1 ? (_(), A("div", he, [
186
+ o.value === 1 ? (_(), A("div", he, [
185
187
  i("img", {
186
188
  class: "state-un-icon",
187
189
  src: a(q)
@@ -193,7 +195,7 @@ const ge = ["accept"], he = {
193
195
  maxSize: a(C)
194
196
  })}`), 1)
195
197
  ])) : z("", !0),
196
- [2, 3].includes(l.value) ? (_(), A("div", De, [
198
+ [2, 3].includes(o.value) ? (_(), A("div", De, [
197
199
  i("div", Ce, [
198
200
  i("img", { src: a(q) }, null, 8, we)
199
201
  ]),
@@ -203,7 +205,7 @@ const ge = ["accept"], he = {
203
205
  style: ne({
204
206
  color: P.value ? "#0070FF" : "#182948"
205
207
  })
206
- }, x((c = o.value) == null ? void 0 : c.name), 5),
208
+ }, x((c = n.value) == null ? void 0 : c.name), 5),
207
209
  i("div", Ue, [
208
210
  P.value ? z("", !0) : (_(), oe(a(ve), {
209
211
  key: 0,
@@ -227,5 +229,5 @@ const ge = ["accept"], he = {
227
229
  }
228
230
  });
229
231
  export {
230
- Te as default
232
+ Re as default
231
233
  };
@@ -9,7 +9,7 @@ export declare const BaseButton: {
9
9
  type: PropType<() => void>;
10
10
  };
11
11
  color: {
12
- type: PropType<"error" | "success" | "warning" | "primary">;
12
+ type: PropType<"error" | "primary" | "success" | "warning">;
13
13
  };
14
14
  text: {
15
15
  type: PropType<string>;
@@ -35,7 +35,7 @@ export declare const BaseButton: {
35
35
  type: PropType<() => void>;
36
36
  };
37
37
  color: {
38
- type: PropType<"error" | "success" | "warning" | "primary">;
38
+ type: PropType<"error" | "primary" | "success" | "warning">;
39
39
  };
40
40
  text: {
41
41
  type: PropType<string>;
@@ -70,7 +70,7 @@ export declare const BaseButton: {
70
70
  type: PropType<() => void>;
71
71
  };
72
72
  color: {
73
- type: PropType<"error" | "success" | "warning" | "primary">;
73
+ type: PropType<"error" | "primary" | "success" | "warning">;
74
74
  };
75
75
  text: {
76
76
  type: PropType<string>;
@@ -102,7 +102,7 @@ export declare const BaseButton: {
102
102
  type: PropType<() => void>;
103
103
  };
104
104
  color: {
105
- type: PropType<"error" | "success" | "warning" | "primary">;
105
+ type: PropType<"error" | "primary" | "success" | "warning">;
106
106
  };
107
107
  text: {
108
108
  type: PropType<string>;
@@ -1,14 +1,16 @@
1
- import { defineComponent as A, computed as n, openBlock as y, createBlock as h, unref as a, mergeProps as s, withCtx as u, createVNode as c, createElementVNode as C, normalizeStyle as D, toDisplayString as w, normalizeClass as N, createTextVNode as T, createCommentVNode as x } from "vue";
2
- import { DropdownButton as R, Dropdown as V, Button as G } from "ant-design-vue";
1
+ import { defineComponent as A, computed as n, openBlock as v, createBlock as y, unref as a, mergeProps as m, withCtx as r, createVNode as c, createElementVNode as C, normalizeStyle as D, toDisplayString as h, normalizeClass as N, normalizeProps as R, guardReactiveProps as T, createTextVNode as x, createCommentVNode as V } from "vue";
2
+ import { DropdownButton as z, Dropdown as G } from "ant-design-vue";
3
+ import "../../ap-button/index.mjs";
3
4
  import "./MenuItemGroup.vue.mjs";
4
5
  import "../../config-provider/index.mjs";
5
6
  import { DownOutlined as M } from "@ant-design/icons-vue";
6
7
  import { usePermission as S } from "@aplus-frontend/hooks";
7
- import { useNamespace as z } from "../../config-provider/hooks/use-namespace.mjs";
8
+ import { useNamespace as $ } from "../../config-provider/hooks/use-namespace.mjs";
8
9
  import { useLocale as F } from "../../config-provider/hooks/use-locale.mjs";
9
10
  import { useGlobalConfig as O } from "../../config-provider/hooks/use-global-config.mjs";
10
- import L from "./MenuItemGroup.vue2.mjs";
11
- const W = /* @__PURE__ */ A({
11
+ import w from "./MenuItemGroup.vue2.mjs";
12
+ import E from "../../ap-button/ap-button.vue.mjs";
13
+ const ee = /* @__PURE__ */ A({
12
14
  __name: "ApBatchActionGroup",
13
15
  props: {
14
16
  selectedRows: {},
@@ -16,95 +18,92 @@ const W = /* @__PURE__ */ A({
16
18
  menuList: {}
17
19
  },
18
20
  setup(P) {
19
- const { b: i } = z("ap-batch-action-group"), { t: _ } = F(), e = P, B = O("uiMode"), { hasPermission: g } = S(), f = n(
21
+ const { b: i } = $("ap-batch-action-group"), { t: _ } = F(), e = P, L = O("uiMode"), { hasPermission: g } = S(), p = n(
20
22
  () => {
21
23
  var t;
22
24
  return ((t = e == null ? void 0 : e.buttonProps) == null ? void 0 : t.dropdownType) || "default";
23
25
  }
24
- ), d = n(
26
+ ), u = n(
25
27
  () => {
26
28
  var t;
27
29
  return ((t = e == null ? void 0 : e.buttonProps) == null ? void 0 : t.type) || "borderLink";
28
30
  }
29
- ), p = n(
31
+ ), f = n(
30
32
  () => {
31
33
  var t;
32
34
  return ((t = e == null ? void 0 : e.buttonProps) == null ? void 0 : t.content) || _("ap.apApBatchActionGroup.batchOperation");
33
35
  }
34
- ), k = n(() => (e == null ? void 0 : e.selectedRows) || []), m = n(
36
+ ), k = n(() => (e == null ? void 0 : e.selectedRows) || []), d = n(
35
37
  () => {
36
38
  var t;
37
39
  return ((t = e == null ? void 0 : e.buttonProps) == null ? void 0 : t.disabled) ?? (Array.isArray(e.selectedRows) ? k.value.length === 0 : !1);
38
40
  }
39
- ), b = n(() => {
41
+ ), B = n(() => {
40
42
  const t = {
41
43
  aplus: "#0070FF",
42
44
  admin: "#34b77c"
43
45
  };
44
- return d.value === "borderLink" ? m.value ? void 0 : t[B.value] || t.aplus : void 0;
45
- }), r = n(() => {
46
+ return u.value === "borderLink" ? d.value ? void 0 : t[L.value] || t.aplus : void 0;
47
+ }), l = n(() => {
46
48
  var t;
47
49
  return ((t = e == null ? void 0 : e.menuList) == null ? void 0 : t.filter((o) => {
48
- let l = o == null ? void 0 : o.ifShow;
49
- return !(o != null && o.ifShow) && (o != null && o.auth) && (l = () => g(o.auth)), (l == null ? void 0 : l()) ?? !0;
50
+ let s = o == null ? void 0 : o.ifShow;
51
+ return !(o != null && o.ifShow) && (o != null && o.auth) && (s = () => g(o.auth)), (s == null ? void 0 : s()) ?? !0;
50
52
  })) || [];
51
53
  });
52
- function v() {
54
+ function b() {
53
55
  return e != null && e.buttonProps ? {
54
56
  ...e.buttonProps,
55
- type: d.value === "borderLink" ? "default" : d.value
57
+ type: u.value === "borderLink" ? "default" : u.value
56
58
  } : {};
57
59
  }
58
- return (t, o) => r.value.length && f.value === "dropdown" ? (y(), h(a(R), s({
60
+ return (t, o) => l.value.length && p.value === "dropdown" ? (v(), y(a(z), m({
59
61
  key: 0,
60
62
  class: [a(i)()]
61
63
  }, {
62
- ...v(),
63
- disabled: m.value
64
+ ...b(),
65
+ disabled: d.value
64
66
  }), {
65
- overlay: u(() => [
66
- c(L, s({
67
+ overlay: r(() => [
68
+ c(w, m({
67
69
  ...e
68
- }, { menuList: r.value }), null, 16, ["menuList"])
70
+ }, { menuList: l.value }), null, 16, ["menuList"])
69
71
  ]),
70
- default: u(() => [
72
+ default: r(() => [
71
73
  C("span", {
72
74
  style: D({
73
- color: b.value
75
+ color: B.value
74
76
  })
75
- }, w(p.value), 5)
77
+ }, h(f.value), 5)
76
78
  ]),
77
79
  _: 1
78
- }, 16, ["class"])) : r.value.length && f.value === "default" ? (y(), h(a(V), {
80
+ }, 16, ["class"])) : l.value.length && p.value === "default" ? (v(), y(a(G), {
79
81
  key: 1,
80
82
  class: N([a(i)()]),
81
- disabled: m.value
83
+ disabled: d.value
82
84
  }, {
83
- overlay: u(() => [
84
- c(L, s({
85
+ overlay: r(() => [
86
+ c(w, m({
85
87
  ...e
86
- }, { menuList: r.value }), null, 16, ["menuList"])
88
+ }, { menuList: l.value }), null, 16, ["menuList"])
87
89
  ]),
88
- default: u(() => [
89
- c(a(G), s({
90
+ default: r(() => [
91
+ c(a(E), R(T({
90
92
  ...t.$attrs,
91
- ...v()
92
- }, {
93
- style: {
94
- color: b.value
95
- }
96
- }), {
97
- default: u(() => [
98
- T(w(p.value) + " ", 1),
93
+ ...b(),
94
+ type: u.value
95
+ })), {
96
+ default: r(() => [
97
+ x(h(f.value) + " ", 1),
99
98
  c(a(M))
100
99
  ]),
101
100
  _: 1
102
- }, 16, ["style"])
101
+ }, 16)
103
102
  ]),
104
103
  _: 1
105
- }, 8, ["class", "disabled"])) : x("", !0);
104
+ }, 8, ["class", "disabled"])) : V("", !0);
106
105
  }
107
106
  });
108
107
  export {
109
- W as default
108
+ ee as default
110
109
  };
@@ -1,4 +1,5 @@
1
1
  import { ButtonProps, MenuItemProps } from 'ant-design-vue';
2
+ import { ApButtonProps } from '../../ap-button/interface';
2
3
  import { DropdownButtonProps } from 'ant-design-vue/es/dropdown';
3
4
  import { VNodeChild } from 'vue';
4
5
  type ApBatchActionGroupButtonType = ButtonProps['type'] | 'borderLink';
@@ -7,7 +8,9 @@ type MixinButton<T> = Omit<T, 'type'> & {
7
8
  content?: string;
8
9
  };
9
10
  interface ApBatchActionGroupTypeProps {
10
- default: MixinButton<ButtonProps>;
11
+ default: ApButtonProps & {
12
+ content?: string;
13
+ };
11
14
  dropdown: MixinButton<DropdownButtonProps>;
12
15
  }
13
16
  export type ApBatchActionGroupPropsKeys = keyof ApBatchActionGroupTypeProps;
@@ -127,12 +127,12 @@ declare const _default: DefineComponent<{
127
127
  placement: TooltipPlacement;
128
128
  show: boolean;
129
129
  dot: boolean;
130
+ count: any;
130
131
  iconType: "ellipsis" | "success" | "warning" | "question";
131
132
  iconSize: number;
132
133
  helpMessage: string | VNode< RendererNode, RendererElement, {
133
134
  [key: string]: any;
134
135
  }> | undefined;
135
- count: any;
136
136
  showZero: boolean;
137
137
  overflowCount: number;
138
138
  numberStyle: CSSProperties;