@aplus-frontend/ui 6.18.0 → 6.19.0

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 (102) hide show
  1. package/es/src/ap-action/item-popconfirm/index.vue.d.ts +31 -2
  2. package/es/src/ap-button/ap-action-button.vue.mjs +11 -7
  3. package/es/src/ap-button/ap-button.vue.mjs +24 -20
  4. package/es/src/ap-button/ap-confirm-button.vue.mjs +14 -10
  5. package/es/src/ap-download/ap-download.vue.mjs +21 -18
  6. package/es/src/ap-field/number/index.vue.d.ts +29 -29
  7. package/es/src/ap-field/rate/index.vue.d.ts +4 -4
  8. package/es/src/ap-field/segmented/index.vue.mjs +17 -12
  9. package/es/src/ap-field/select/index.vue.d.ts +97 -97
  10. package/es/src/ap-field/select/index.vue.mjs +8 -8
  11. package/es/src/ap-field/slider/index.vue.d.ts +8 -8
  12. package/es/src/ap-field/text-area/index.vue.d.ts +54 -54
  13. package/es/src/ap-field/text-area/index.vue.mjs +9 -9
  14. package/es/src/ap-field/tree-select/index.vue.d.ts +93 -93
  15. package/es/src/ap-field/tree-select/index.vue.mjs +16 -16
  16. package/es/src/ap-form/ap-form.vue.d.ts +13 -13
  17. package/es/src/ap-form/drawer-form/index.vue.d.ts +15 -15
  18. package/es/src/ap-form/items/number/index.vue.d.ts +31 -31
  19. package/es/src/ap-form/items/select/index.vue.d.ts +99 -99
  20. package/es/src/ap-form/items/text/index.vue.d.ts +3 -3
  21. package/es/src/ap-form/items/text/password.vue.d.ts +3 -3
  22. package/es/src/ap-form/items/text-area/index.vue.d.ts +106 -106
  23. package/es/src/ap-form/items/tree-select/index.vue.d.ts +95 -95
  24. package/es/src/ap-form/modal-form/index.vue.d.ts +45 -16
  25. package/es/src/ap-form/search-form/components/popover-filter.vue.d.ts +29 -10
  26. package/es/src/ap-form/search-form/index.vue.d.ts +15 -15
  27. package/es/src/ap-table/constants.d.ts +326 -326
  28. package/es/src/ap-tag/ap-tag-group.vue.mjs +73 -78
  29. package/es/src/ap-tag/ap-tag.vue.d.ts +1 -0
  30. package/es/src/ap-tag/ap-tag.vue.mjs +45 -30
  31. package/es/src/ap-tag/interface.d.ts +6 -0
  32. package/es/src/ap-tag/utils.d.ts +1 -0
  33. package/es/src/ap-tag/utils.mjs +12 -0
  34. package/es/src/ap-upload/components/MultipleFile.vue.d.ts +2 -2
  35. package/es/src/business/ap-batch-action-group/index.d.ts +30 -8
  36. package/es/src/business/ap-view/components/main-button-content.vue.d.ts +8 -8
  37. package/es/src/business/ap-view/components/menu-list-content.vue.d.ts +8 -8
  38. package/es/src/business/batch-input-group/index.vue.d.ts +2 -2
  39. package/es/src/business/batch-input-group/popover-input/index.vue.d.ts +54 -54
  40. package/es/src/config-provider/config-provider-props.d.ts +4 -5
  41. package/es/src/config-provider/config-provider.d.ts +8 -9
  42. package/es/src/config-provider/hooks/use-global-config.d.ts +4 -5
  43. package/es/src/config-provider/index.d.ts +13 -14
  44. package/es/src/utils/config-provider-preset.d.ts +5 -6
  45. package/es/src/version.d.ts +1 -1
  46. package/es/src/version.mjs +1 -1
  47. package/es/src/work-order-modal/work-order-modal.vue.d.ts +8 -8
  48. package/lib/src/ap-action/item-popconfirm/index.vue.d.ts +31 -2
  49. package/lib/src/ap-button/ap-action-button.vue.js +1 -1
  50. package/lib/src/ap-button/ap-button.vue.js +1 -1
  51. package/lib/src/ap-button/ap-confirm-button.vue.js +1 -1
  52. package/lib/src/ap-download/ap-download.vue.js +1 -1
  53. package/lib/src/ap-field/number/index.vue.d.ts +29 -29
  54. package/lib/src/ap-field/rate/index.vue.d.ts +4 -4
  55. package/lib/src/ap-field/segmented/index.vue.js +1 -1
  56. package/lib/src/ap-field/select/index.vue.d.ts +97 -97
  57. package/lib/src/ap-field/select/index.vue.js +1 -1
  58. package/lib/src/ap-field/slider/index.vue.d.ts +8 -8
  59. package/lib/src/ap-field/text-area/index.vue.d.ts +54 -54
  60. package/lib/src/ap-field/text-area/index.vue.js +1 -1
  61. package/lib/src/ap-field/tree-select/index.vue.d.ts +93 -93
  62. package/lib/src/ap-field/tree-select/index.vue.js +1 -1
  63. package/lib/src/ap-form/ap-form.vue.d.ts +13 -13
  64. package/lib/src/ap-form/drawer-form/index.vue.d.ts +15 -15
  65. package/lib/src/ap-form/items/number/index.vue.d.ts +31 -31
  66. package/lib/src/ap-form/items/select/index.vue.d.ts +99 -99
  67. package/lib/src/ap-form/items/text/index.vue.d.ts +3 -3
  68. package/lib/src/ap-form/items/text/password.vue.d.ts +3 -3
  69. package/lib/src/ap-form/items/text-area/index.vue.d.ts +106 -106
  70. package/lib/src/ap-form/items/tree-select/index.vue.d.ts +95 -95
  71. package/lib/src/ap-form/modal-form/index.vue.d.ts +45 -16
  72. package/lib/src/ap-form/search-form/components/popover-filter.vue.d.ts +29 -10
  73. package/lib/src/ap-form/search-form/index.vue.d.ts +15 -15
  74. package/lib/src/ap-table/constants.d.ts +326 -326
  75. package/lib/src/ap-tag/ap-tag-group.vue.js +1 -1
  76. package/lib/src/ap-tag/ap-tag.vue.d.ts +1 -0
  77. package/lib/src/ap-tag/ap-tag.vue.js +1 -1
  78. package/lib/src/ap-tag/interface.d.ts +6 -0
  79. package/lib/src/ap-tag/utils.d.ts +1 -0
  80. package/lib/src/ap-tag/utils.js +1 -0
  81. package/lib/src/ap-upload/components/MultipleFile.vue.d.ts +2 -2
  82. package/lib/src/business/ap-batch-action-group/index.d.ts +30 -8
  83. package/lib/src/business/ap-view/components/main-button-content.vue.d.ts +8 -8
  84. package/lib/src/business/ap-view/components/menu-list-content.vue.d.ts +8 -8
  85. package/lib/src/business/batch-input-group/index.vue.d.ts +2 -2
  86. package/lib/src/business/batch-input-group/popover-input/index.vue.d.ts +54 -54
  87. package/lib/src/config-provider/config-provider-props.d.ts +4 -5
  88. package/lib/src/config-provider/config-provider.d.ts +8 -9
  89. package/lib/src/config-provider/hooks/use-global-config.d.ts +4 -5
  90. package/lib/src/config-provider/index.d.ts +13 -14
  91. package/lib/src/utils/config-provider-preset.d.ts +5 -6
  92. package/lib/src/version.d.ts +1 -1
  93. package/lib/src/version.js +1 -1
  94. package/lib/src/work-order-modal/work-order-modal.vue.d.ts +8 -8
  95. package/package.json +3 -3
  96. package/theme/antdv-override.css +2 -6
  97. package/theme/antdv-override.less +2 -6
  98. package/theme/ap-label/ap-label.css +1 -0
  99. package/theme/ap-label/ap-label.less +1 -0
  100. package/theme/ap-tag/ap-tag.css +3 -1
  101. package/theme/ap-tag/ap-tag.less +3 -1
  102. package/theme/index.css +6 -7
@@ -1,14 +1,17 @@
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
- import { Tooltip as q } from "@aplus-frontend/antdv";
3
- import H from "@ant-design/icons-vue";
1
+ import { defineComponent as G, ref as C, computed as n, unref as f, watch as L, nextTick as A, onMounted as F, onUnmounted as I, createBlock as d, openBlock as a, mergeProps as b, withCtx as g, createElementVNode as t, normalizeStyle as w, normalizeClass as k, createElementBlock as _, createCommentVNode as U, Fragment as q, renderList as H, toDisplayString as W, renderSlot as J, createTextVNode as K } from "vue";
2
+ import { Tooltip as O } from "@aplus-frontend/antdv";
3
+ import Q from "@ant-design/icons-vue";
4
4
  import "./ap-tag.vue2.mjs";
5
5
  import "../config-provider/index.mjs";
6
- import { omit as J } from "lodash-unified";
7
- import { useLocale as K } from "../config-provider/hooks/use-locale.mjs";
8
- import { useGlobalConfig as O } from "../config-provider/hooks/use-global-config.mjs";
9
- import { useNamespace as Q } from "../config-provider/hooks/use-namespace.mjs";
10
- import X from "./ap-tag.vue.mjs";
11
- const ce = /* @__PURE__ */ D({
6
+ import { omit as X } from "lodash-unified";
7
+ import { getTextWidth as T } from "./utils.mjs";
8
+ import "../hooks/index.mjs";
9
+ import { useLocale as Y } from "../config-provider/hooks/use-locale.mjs";
10
+ import { useGlobalConfig as Z } from "../config-provider/hooks/use-global-config.mjs";
11
+ import { useNamespace as ee } from "../config-provider/hooks/use-namespace.mjs";
12
+ import { useResize as te } from "../hooks/useResize.mjs";
13
+ import le from "./ap-tag.vue.mjs";
14
+ const ve = /* @__PURE__ */ G({
12
15
  __name: "ap-tag-group",
13
16
  props: {
14
17
  list: { default: () => [] },
@@ -17,98 +20,90 @@ const ce = /* @__PURE__ */ D({
17
20
  ellipsis: { default: () => ({}) }
18
21
  },
19
22
  setup(z) {
20
- const { t: V } = K(), i = z, v = O("uiMode"), { b: $, bm: h } = Q("tag-group"), c = b(), r = n(() => ({
23
+ const { t: V } = Y(), o = z, v = Z("uiMode"), { b: B, bm: y } = ee("tag-group"), s = C(), { observe: E, unobserve: $ } = te(), i = n(() => ({
21
24
  ...{
22
25
  iconColor: v.value === "aplus" ? "#182948" : "#333",
23
26
  symbol: "icon",
24
27
  text: V("ap.common.more")
25
28
  },
26
- ...i.ellipsis
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
- let s = document.createElement("canvas");
29
- const l = s.getContext("2d");
30
- l.font = `${e}px system-ui`;
31
- const a = l.measureText(t);
32
- return setTimeout(() => {
33
- s = null;
34
- }, 0), a.width;
35
- }, x = () => {
36
- let e = 0, t = 0;
37
- if (!c.value) return;
38
- const s = c.value.offsetWidth;
39
- for (let l of i.list) {
40
- const a = l.size === "large" ? 16 : 12, C = y(
41
- l.size === "large" ? 14 : 12,
42
- l.text
43
- ) + a + 2 + i.space;
44
- if (e += C, e > s) {
45
- e -= C;
29
+ ...o.ellipsis
30
+ })), M = n(() => i.value.tooltip && typeof i.value.tooltip == "object" ? X(i.value.tooltip, ["trigger", "title"]) : {}), p = n(() => f(c) < o.list.length), c = C(0), P = n(() => o.list.map((e) => e.text).join("、")), D = n(() => [B()].filter(Boolean)), N = n(() => v.value === "aplus" ? [y("ellipsis-text", "aplus")] : [y("ellipsis-text", "admin")]), h = () => {
31
+ let e = 0, l = 0;
32
+ if (!s.value) return;
33
+ const u = s.value.offsetWidth;
34
+ for (let r of o.list) {
35
+ const m = r.size === "small" ? 8 : 12, S = T(
36
+ r.size === "large" ? 14 : 12,
37
+ r.text
38
+ ), j = r.type === "border" ? 2 : 0, x = S + m + j + o.space;
39
+ if (e += x, e > u) {
40
+ e -= x;
46
41
  break;
47
42
  }
48
- t++;
43
+ l++;
49
44
  }
50
- if (t < i.list.length) {
51
- const a = y(12, r.value.text);
52
- i.ellipsis.symbol === "icon" ? e += 16 : e += a, e > s && t--;
45
+ if (l < o.list.length) {
46
+ const m = T(12, i.value.text);
47
+ o.ellipsis.symbol === "icon" ? e += 16 : e += m, e > u && l--;
53
48
  }
54
- m.value = t;
49
+ c.value = l;
55
50
  };
56
- N(
57
- () => i.list,
58
- (e, t) => {
59
- e !== t && S(() => {
60
- x();
51
+ L(
52
+ () => o.list,
53
+ (e, l) => {
54
+ e !== l && A(() => {
55
+ h();
61
56
  });
62
57
  },
63
58
  {
64
59
  immediate: !0
65
60
  }
66
61
  );
67
- const w = () => {
68
- x();
62
+ const R = () => {
63
+ h();
69
64
  };
70
- return j(() => {
65
+ return F(() => {
71
66
  [["ellipsisColor", "ellipse.color"]].forEach(
72
- ([e, t]) => {
73
- i[e] && console.error(
74
- `[ApTagGroup]: \`${e}\` is deprecated, please use \`${t}\` instead.`
67
+ ([e, l]) => {
68
+ o[e] && console.error(
69
+ `[ApTagGroup]: \`${e}\` is deprecated, please use \`${l}\` instead.`
75
70
  );
76
71
  }
77
- ), window.addEventListener("resize", w);
78
- }), G(() => {
79
- window.removeEventListener("resize", w);
80
- }), (e, t) => (u(), d(f(q), k({ trigger: "hover" }, B.value), {
72
+ ), s.value && E(s.value, R);
73
+ }), I(() => {
74
+ s.value && $(s.value);
75
+ }), (e, l) => (a(), d(f(O), b({ trigger: "hover" }, M.value), {
81
76
  title: g(() => [
82
- I(e.$slots, "tooltip", { tags: e.list }, () => [
83
- U(E(L.value), 1)
77
+ J(e.$slots, "tooltip", { tags: e.list }, () => [
78
+ K(W(P.value), 1)
84
79
  ])
85
80
  ]),
86
81
  default: g(() => [
87
- o("div", {
82
+ t("div", {
88
83
  ref_key: "container",
89
- ref: c,
90
- class: _(M.value),
91
- style: W({
84
+ ref: s,
85
+ class: k(D.value),
86
+ style: w({
92
87
  pointerEvents: p.value ? "auto" : "none"
93
88
  // opacity: isUpdating ? '0' : '1'
94
89
  })
95
90
  }, [
96
- (u(!0), T(A, null, F(e.list, (s, l) => (u(), d(X, k({ ref_for: !0 }, s, {
97
- key: l,
91
+ (a(!0), _(q, null, H(e.list, (u, r) => (a(), d(le, b({ ref_for: !0 }, u, {
92
+ key: r,
98
93
  style: {
99
- display: l >= m.value ? "none" : "inline-block",
94
+ display: r >= c.value ? "none" : "inline-block",
100
95
  marginRight: `${e.space}px`
101
96
  }
102
97
  }), null, 16, ["style"]))), 128)),
103
- p.value && r.value.symbol === "icon" ? (u(), d(f(H), {
98
+ p.value && i.value.symbol === "icon" ? (a(), d(f(Q), {
104
99
  key: 0,
105
- style: W({
106
- color: e.ellipsisColor || r.value.iconColor,
100
+ style: w({
101
+ color: e.ellipsisColor || i.value.iconColor,
107
102
  cursor: "pointer"
108
103
  })
109
104
  }, {
110
- component: g(() => t[0] || (t[0] = [
111
- o("svg", {
105
+ component: g(() => l[0] || (l[0] = [
106
+ t("svg", {
112
107
  xmlns: "http://www.w3.org/2000/svg",
113
108
  "xmlns:xlink": "http://www.w3.org/1999/xlink",
114
109
  fill: "none",
@@ -117,9 +112,9 @@ const ce = /* @__PURE__ */ D({
117
112
  height: "16",
118
113
  viewBox: "0 0 16 16"
119
114
  }, [
120
- o("defs", null, [
121
- o("clipPath", { id: "master_svg0_1133_24991" }, [
122
- o("rect", {
115
+ t("defs", null, [
116
+ t("clipPath", { id: "master_svg0_1133_24991" }, [
117
+ t("rect", {
123
118
  x: "0",
124
119
  y: "0",
125
120
  width: "16",
@@ -128,9 +123,9 @@ const ce = /* @__PURE__ */ D({
128
123
  })
129
124
  ])
130
125
  ]),
131
- o("g", { "clip-path": "url(#master_svg0_1133_24991)" }, [
132
- o("g", null, [
133
- o("ellipse", {
126
+ t("g", { "clip-path": "url(#master_svg0_1133_24991)" }, [
127
+ t("g", null, [
128
+ t("ellipse", {
134
129
  cx: "8",
135
130
  cy: "8",
136
131
  rx: "1",
@@ -139,8 +134,8 @@ const ce = /* @__PURE__ */ D({
139
134
  "fill-opacity": "1"
140
135
  })
141
136
  ]),
142
- o("g", null, [
143
- o("ellipse", {
137
+ t("g", null, [
138
+ t("ellipse", {
144
139
  cx: "3.25",
145
140
  cy: "8",
146
141
  rx: "1",
@@ -149,8 +144,8 @@ const ce = /* @__PURE__ */ D({
149
144
  "fill-opacity": "1"
150
145
  })
151
146
  ]),
152
- o("g", null, [
153
- o("ellipse", {
147
+ t("g", null, [
148
+ t("ellipse", {
154
149
  cx: "12.75",
155
150
  cy: "8",
156
151
  rx: "1",
@@ -163,11 +158,11 @@ const ce = /* @__PURE__ */ D({
163
158
  ], -1)
164
159
  ])),
165
160
  _: 1
166
- }, 8, ["style"])) : p.value && r.value.symbol === "text" ? (u(), T("span", {
161
+ }, 8, ["style"])) : p.value && i.value.symbol === "text" ? (a(), _("span", {
167
162
  key: 1,
168
- class: _(P.value),
163
+ class: k(N.value),
169
164
  style: { cursor: "pointer" }
170
- }, E(r.value.text), 3)) : R("", !0)
165
+ }, W(i.value.text), 3)) : U("", !0)
171
166
  ], 6)
172
167
  ]),
173
168
  _: 3
@@ -175,5 +170,5 @@ const ce = /* @__PURE__ */ D({
175
170
  }
176
171
  });
177
172
  export {
178
- ce as default
173
+ ve as default
179
174
  };
@@ -5,5 +5,6 @@ declare const _default: DefineComponent<ApTagProps, {}, {}, {}, {}, ComponentOpt
5
5
  type: "purely" | "border";
6
6
  color: string;
7
7
  disabled: boolean;
8
+ fixedWidth: boolean;
8
9
  }, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLSpanElement>;
9
10
  export default _default;
@@ -1,9 +1,10 @@
1
- import { defineComponent as $, computed as n, createElementBlock as S, openBlock as b, normalizeClass as i, normalizeStyle as w, createVNode as z, unref as B } from "vue";
1
+ import { defineComponent as b, computed as i, ref as S, watch as w, createElementBlock as W, openBlock as z, normalizeClass as l, normalizeStyle as v, createVNode as B, unref as h } from "vue";
2
2
  import "../config-provider/index.mjs";
3
- import { TypographyText as v } from "@aplus-frontend/antdv";
4
- import { useGlobalConfig as I } from "../config-provider/hooks/use-global-config.mjs";
3
+ import { TypographyText as I } from "@aplus-frontend/antdv";
4
+ import { getTextWidth as M } from "./utils.mjs";
5
+ import { useGlobalConfig as T } from "../config-provider/hooks/use-global-config.mjs";
5
6
  import { useNamespace as _ } from "../config-provider/hooks/use-namespace.mjs";
6
- const A = /* @__PURE__ */ $({
7
+ const H = /* @__PURE__ */ b({
7
8
  name: "ApTag",
8
9
  __name: "ap-tag",
9
10
  props: {
@@ -11,39 +12,53 @@ const A = /* @__PURE__ */ $({
11
12
  text: {},
12
13
  color: { default: "#34B77C" },
13
14
  size: { default: "middle" },
14
- disabled: { type: Boolean, default: !1 }
15
+ disabled: { type: Boolean, default: !1 },
16
+ fixedWidth: { type: Boolean, default: !1 }
15
17
  },
16
18
  setup(o) {
17
- const e = o, l = I("uiMode"), { b: r, bm: a } = _("tag");
18
- function p(t, s) {
19
- t.length === 4 && (t = `#${t[1]}${t[1]}${t[2]}${t[2]}${t[3]}${t[3]}`);
20
- const m = parseInt(t.slice(1, 3), 16), f = parseInt(t.slice(3, 5), 16), g = parseInt(t.slice(5, 7), 16), y = Math.round(s * 255).toString(16).padStart(2, "0");
21
- return `#${m.toString(16).padStart(2, "0")}${f.toString(16).padStart(2, "0")}${g.toString(16).padStart(2, "0")}${y}`;
19
+ const t = o, c = T("uiMode"), { b: n, bm: r } = _("tag");
20
+ function s(e, a) {
21
+ e.length === 4 && (e = `#${e[1]}${e[1]}${e[2]}${e[2]}${e[3]}${e[3]}`);
22
+ const f = parseInt(e.slice(1, 3), 16), g = parseInt(e.slice(3, 5), 16), y = parseInt(e.slice(5, 7), 16), $ = Math.round(a * 255).toString(16).padStart(2, "0");
23
+ return `#${f.toString(16).padStart(2, "0")}${g.toString(16).padStart(2, "0")}${y.toString(16).padStart(2, "0")}${$}`;
22
24
  }
23
- const c = n(() => ({
24
- "--tag-main-color": e.color,
25
- "--tag-main-color-opacity": p(e.color, 0.06),
26
- "--tag-main-color-background": p(e.color, 0.15)
27
- })), u = n(() => [
28
- r("wrapper"),
29
- r(`wrapper-${e.type}`),
30
- a("wrapper", e.size)
31
- ].filter(Boolean)), d = n(() => {
32
- const t = [r("inner-wrapper"), a("inner-wrapper", e.size)];
33
- return e.disabled && (l.value === "aplus" ? t.push(a("inner-wrapper", "disabled")) : t.push(a("inner-wrapper", "disabled-admin"))), t;
34
- });
35
- return (t, s) => (b(), S("span", {
36
- style: w(c.value),
37
- class: i(u.value)
25
+ const d = i(() => ({
26
+ maxWidth: `${p.value}px`,
27
+ "--tag-main-color": t.color,
28
+ "--tag-main-color-opacity": s(t.color, 0.06),
29
+ "--tag-main-color-background": s(t.color, 0.15)
30
+ })), u = i(() => [
31
+ n("wrapper"),
32
+ n(`wrapper-${t.type}`),
33
+ r("wrapper", t.size)
34
+ ].filter(Boolean)), m = i(() => {
35
+ const e = [n("inner-wrapper"), r("inner-wrapper", t.size)];
36
+ return t.disabled && (c.value === "aplus" ? e.push(r("inner-wrapper", "disabled")) : e.push(r("inner-wrapper", "disabled-admin"))), e;
37
+ }), p = S(0);
38
+ return w(
39
+ () => t.text,
40
+ () => {
41
+ const e = t.type === "border" ? 2 : 0;
42
+ let a = Math.ceil(
43
+ M(t.size === "large" ? 14 : 12, t.text)
44
+ );
45
+ t.size === "large" || t.size === "middle" ? a += 12 : a += 8, p.value = a + e;
46
+ },
47
+ {
48
+ immediate: !0
49
+ }
50
+ ), (e, a) => (z(), W("span", {
51
+ style: v(d.value),
52
+ class: l(u.value)
38
53
  }, [
39
- z(B(v), {
40
- class: i(d.value),
41
- ellipsis: { tooltip: t.text },
42
- content: t.text
54
+ B(h(I), {
55
+ class: l(m.value),
56
+ ellipsis: { tooltip: e.text },
57
+ content: e.text
43
58
  }, null, 8, ["class", "ellipsis", "content"])
44
59
  ], 6));
45
60
  }
46
61
  });
47
62
  export {
48
- A as default
63
+ H as default
49
64
  };
@@ -21,6 +21,12 @@ export interface ApTagProps {
21
21
  * @default false
22
22
  */
23
23
  disabled?: boolean;
24
+ /**
25
+ * 固定宽度为标签内容的宽度
26
+ * @description 主要用于标签组
27
+ * @default false
28
+ */
29
+ fixedWidth?: boolean;
24
30
  }
25
31
  export type EllipsisProps = {
26
32
  /**
@@ -0,0 +1 @@
1
+ export declare const getTextWidth: (fontSize: number, text: string) => number;
@@ -0,0 +1,12 @@
1
+ const o = (n, s) => {
2
+ let t = document.createElement("canvas");
3
+ const e = t.getContext("2d");
4
+ e.font = `${n}px system-ui`;
5
+ const c = e.measureText(s);
6
+ return setTimeout(() => {
7
+ t = null;
8
+ }, 0), c.width;
9
+ };
10
+ export {
11
+ o as getTextWidth
12
+ };
@@ -189,9 +189,9 @@ declare const _default: DefineComponent<{}, {
189
189
  multiple: boolean;
190
190
  disabled: boolean;
191
191
  method: "post" | "POST" | "PUT" | "PATCH" | "put" | "patch";
192
- remove: (file: UploadFile<any>) => boolean | void | Promise<boolean | void>;
193
192
  locale: UploadLocale;
194
193
  action: string | ((file: FileType) => string) | ((file: FileType) => PromiseLike<string>);
194
+ remove: (file: UploadFile<any>) => boolean | void | Promise<boolean | void>;
195
195
  capture: boolean | "user" | "environment";
196
196
  iconRender: (opt: {
197
197
  file: UploadFile<any>;
@@ -415,9 +415,9 @@ declare const _default: DefineComponent<{}, {
415
415
  multiple: boolean;
416
416
  disabled: boolean;
417
417
  method: "post" | "POST" | "PUT" | "PATCH" | "put" | "patch";
418
- remove: (file: UploadFile<any>) => boolean | void | Promise<boolean | void>;
419
418
  locale: UploadLocale;
420
419
  action: string | ((file: FileType) => string) | ((file: FileType) => PromiseLike<string>);
420
+ remove: (file: UploadFile<any>) => boolean | void | Promise<boolean | void>;
421
421
  capture: boolean | "user" | "environment";
422
422
  iconRender: (opt: {
423
423
  file: UploadFile<any>;
@@ -1,6 +1,7 @@
1
1
  import { CreateComponentPublicInstanceWithMixins, ExtractPropTypes, PropType, VNodeChild, CSSProperties, ComputedRef, ComponentOptionsMixin, PublicProps, GlobalComponents, GlobalDirectives, ComponentProvideOptions, ComponentOptionsBase, VNodeProps, AllowedComponentProps, ComponentCustomProps, Plugin } from 'vue';
2
- import { ButtonType, ButtonShape, ButtonSize } from '@aplus-frontend/antdv/es/button';
3
- import { ButtonHTMLType } from '@aplus-frontend/antdv/es/button/buttonTypes';
2
+ import { ButtonType, ButtonShape } from '@aplus-frontend/antdv/es/button';
3
+ import { ButtonHTMLType, ButtonIconPosition, ButtonVariantType } from '@aplus-frontend/antdv/es/button/buttonTypes';
4
+ import { SizeType } from '@aplus-frontend/antdv/es/config-provider';
4
5
  import { VueTypeValidableDef } from '../../../node_modules/vue-types';
5
6
  import { MouseEventHandler, FocusEventHandler } from '@aplus-frontend/antdv/es/_util/EventInterface';
6
7
  import { DropdownArrowOptions, Trigger, Align } from '@aplus-frontend/antdv/es/dropdown/props';
@@ -26,7 +27,7 @@ declare const ApBatchActionGroup: {
26
27
  type: PropType<ButtonShape>;
27
28
  };
28
29
  size: {
29
- type: PropType<ButtonSize>;
30
+ type: PropType<SizeType>;
30
31
  };
31
32
  loading: {
32
33
  type: PropType<boolean | {
@@ -62,6 +63,13 @@ declare const ApBatchActionGroup: {
62
63
  onMousedown: {
63
64
  type: PropType< MouseEventHandler | MouseEventHandler[]>;
64
65
  };
66
+ autoInsertSpace: BooleanConstructor;
67
+ iconPosition: {
68
+ type: PropType<ButtonIconPosition>;
69
+ default: string;
70
+ };
71
+ color: PropType<"default" | "blue" | "cyan" | "gold" | "green" | "lime" | "magenta" | "orange" | "pink" | "purple" | "red" | "yellow" | "volcano" | "geekblue" | "primary" | "danger">;
72
+ variant: PropType<ButtonVariantType>;
65
73
  }>>, "type" | "onClick"> & {
66
74
  type?: ( ButtonType | undefined) | "borderLink";
67
75
  borderLinkColor?: string;
@@ -264,7 +272,7 @@ declare const ApBatchActionGroup: {
264
272
  };
265
273
  getPopupContainer: PropType<(triggerNode: HTMLElement) => HTMLElement>;
266
274
  transitionName: StringConstructor;
267
- placement: PropType<"top" | "bottom" | "topLeft" | "topRight" | "bottomLeft" | "bottomRight" | "topCenter" | "bottomCenter">;
275
+ placement: PropType<"top" | "bottom" | "bottomLeft" | "bottomRight" | "topLeft" | "topRight" | "topCenter" | "bottomCenter">;
268
276
  overlayClassName: StringConstructor;
269
277
  overlayStyle: {
270
278
  type: PropType<CSSProperties>;
@@ -327,7 +335,7 @@ declare const ApBatchActionGroup: {
327
335
  type: PropType<ButtonShape>;
328
336
  };
329
337
  size: {
330
- type: PropType<ButtonSize>;
338
+ type: PropType<SizeType>;
331
339
  };
332
340
  loading: {
333
341
  type: PropType<boolean | {
@@ -363,6 +371,13 @@ declare const ApBatchActionGroup: {
363
371
  onMousedown: {
364
372
  type: PropType< MouseEventHandler | MouseEventHandler[]>;
365
373
  };
374
+ autoInsertSpace: BooleanConstructor;
375
+ iconPosition: {
376
+ type: PropType<ButtonIconPosition>;
377
+ default: string;
378
+ };
379
+ color: PropType<"default" | "blue" | "cyan" | "gold" | "green" | "lime" | "magenta" | "orange" | "pink" | "purple" | "red" | "yellow" | "volcano" | "geekblue" | "primary" | "danger">;
380
+ variant: PropType<ButtonVariantType>;
366
381
  }>>, "type" | "onClick"> & {
367
382
  type?: ( ButtonType | undefined) | "borderLink";
368
383
  borderLinkColor?: string;
@@ -565,7 +580,7 @@ declare const ApBatchActionGroup: {
565
580
  };
566
581
  getPopupContainer: PropType<(triggerNode: HTMLElement) => HTMLElement>;
567
582
  transitionName: StringConstructor;
568
- placement: PropType<"top" | "bottom" | "topLeft" | "topRight" | "bottomLeft" | "bottomRight" | "topCenter" | "bottomCenter">;
583
+ placement: PropType<"top" | "bottom" | "bottomLeft" | "bottomRight" | "topLeft" | "topRight" | "topCenter" | "bottomCenter">;
569
584
  overlayClassName: StringConstructor;
570
585
  overlayStyle: {
571
586
  type: PropType<CSSProperties>;
@@ -625,7 +640,7 @@ declare const ApBatchActionGroup: {
625
640
  type: PropType<ButtonShape>;
626
641
  };
627
642
  size: {
628
- type: PropType<ButtonSize>;
643
+ type: PropType<SizeType>;
629
644
  };
630
645
  loading: {
631
646
  type: PropType<boolean | {
@@ -661,6 +676,13 @@ declare const ApBatchActionGroup: {
661
676
  onMousedown: {
662
677
  type: PropType< MouseEventHandler | MouseEventHandler[]>;
663
678
  };
679
+ autoInsertSpace: BooleanConstructor;
680
+ iconPosition: {
681
+ type: PropType<ButtonIconPosition>;
682
+ default: string;
683
+ };
684
+ color: PropType<"default" | "blue" | "cyan" | "gold" | "green" | "lime" | "magenta" | "orange" | "pink" | "purple" | "red" | "yellow" | "volcano" | "geekblue" | "primary" | "danger">;
685
+ variant: PropType<ButtonVariantType>;
664
686
  }>>, "type" | "onClick"> & {
665
687
  type?: ButtonProps["type"] | "borderLink";
666
688
  borderLinkColor?: string;
@@ -863,7 +885,7 @@ declare const ApBatchActionGroup: {
863
885
  };
864
886
  getPopupContainer: PropType<(triggerNode: HTMLElement) => HTMLElement>;
865
887
  transitionName: StringConstructor;
866
- placement: PropType<"top" | "bottom" | "topLeft" | "topRight" | "bottomLeft" | "bottomRight" | "topCenter" | "bottomCenter">;
888
+ placement: PropType<"top" | "bottom" | "bottomLeft" | "bottomRight" | "topLeft" | "topRight" | "topCenter" | "bottomCenter">;
867
889
  overlayClassName: StringConstructor;
868
890
  overlayStyle: {
869
891
  type: PropType<CSSProperties>;
@@ -1,6 +1,6 @@
1
1
  import { ApFormProps, UpdateModelOptimizeFn, ApFormInternalInstance, WatchFunc } from '../../../ap-form';
2
2
  import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions, ComponentInternalInstance, ExtractPropTypes, PropType, HTMLAttributes, VNodeProps, AllowedComponentProps, ComponentCustomProps, CreateComponentPublicInstanceWithMixins, GlobalComponents, GlobalDirectives, Slot, ComponentPublicInstance, ComponentOptionsBase, DebuggerEvent, nextTick, WatchOptions, WatchStopHandle, ShallowUnwrapRef, ComponentCustomProperties } from 'vue';
3
- import { ButtonSize, SizeType } from '@aplus-frontend/antdv/es/button';
3
+ import { SizeType, ButtonSize } from '@aplus-frontend/antdv/es/config-provider';
4
4
  import { ColSize } from '@aplus-frontend/antdv/es/grid';
5
5
  import { FormLabelAlign, ValidateMessages, FieldData, ValidateErrorEntity, NamePath, ValidateOptions, InternalNamePath } from '@aplus-frontend/antdv/es/form/interface';
6
6
  import { RuleObject } from '@aplus-frontend/antdv/es/form';
@@ -18,7 +18,7 @@ declare const _default: DefineComponent<__VLS_Props, {}, {}, {}, {}, ComponentOp
18
18
  $: ComponentInternalInstance;
19
19
  $data: {};
20
20
  $props: {
21
- readonly size?: ButtonSize;
21
+ readonly size?: SizeType;
22
22
  readonly onSubmit?: ((e: Event) => void) | undefined;
23
23
  readonly layout?: string | undefined;
24
24
  readonly disabled?: boolean | undefined;
@@ -313,8 +313,8 @@ declare const _default: DefineComponent<__VLS_Props, {}, {}, {}, {}, ComponentOp
313
313
  default: string | string[];
314
314
  };
315
315
  size: {
316
- type: PropType<SizeType>;
317
- default: SizeType;
316
+ type: PropType<ButtonSize>;
317
+ default: ButtonSize;
318
318
  };
319
319
  disabled: {
320
320
  type: BooleanConstructor;
@@ -341,7 +341,7 @@ declare const _default: DefineComponent<__VLS_Props, {}, {}, {}, {}, ComponentOp
341
341
  default: (name: string | number | string[] | number[], status: boolean, errors: string[]) => void;
342
342
  };
343
343
  }>> & Readonly<{}>, () => VueNode, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, PublicProps, {
344
- size: SizeType;
344
+ size: ButtonSize;
345
345
  onSubmit: (e: Event) => void;
346
346
  disabled: boolean;
347
347
  validateTrigger: string | string[];
@@ -633,8 +633,8 @@ declare const _default: DefineComponent<__VLS_Props, {}, {}, {}, {}, ComponentOp
633
633
  default: string | string[];
634
634
  };
635
635
  size: {
636
- type: PropType<SizeType>;
637
- default: SizeType;
636
+ type: PropType<ButtonSize>;
637
+ default: ButtonSize;
638
638
  };
639
639
  disabled: {
640
640
  type: BooleanConstructor;
@@ -661,7 +661,7 @@ declare const _default: DefineComponent<__VLS_Props, {}, {}, {}, {}, ComponentOp
661
661
  default: (name: string | number | string[] | number[], status: boolean, errors: string[]) => void;
662
662
  };
663
663
  }>> & Readonly<{}>, () => VueNode, {}, {}, {}, {
664
- size: SizeType;
664
+ size: ButtonSize;
665
665
  onSubmit: (e: Event) => void;
666
666
  disabled: boolean;
667
667
  validateTrigger: string | string[];
@@ -1,6 +1,6 @@
1
1
  import { ViewListModel } from '../interface';
2
2
  import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions, ComponentInternalInstance, ExtractPropTypes, PropType, HTMLAttributes, VNodeProps, AllowedComponentProps, ComponentCustomProps, CreateComponentPublicInstanceWithMixins, GlobalComponents, GlobalDirectives, Slot, ComponentPublicInstance, ComponentOptionsBase, DebuggerEvent, nextTick, WatchOptions, WatchStopHandle, ShallowUnwrapRef, ComponentCustomProperties } from 'vue';
3
- import { ButtonSize, SizeType } from '@aplus-frontend/antdv/es/button';
3
+ import { SizeType, ButtonSize } from '@aplus-frontend/antdv/es/config-provider';
4
4
  import { ColSize } from '@aplus-frontend/antdv/es/grid';
5
5
  import { FormLabelAlign, ValidateMessages, FieldData, ValidateErrorEntity, NamePath, ValidateOptions, InternalNamePath } from '@aplus-frontend/antdv/es/form/interface';
6
6
  import { RuleObject } from '@aplus-frontend/antdv/es/form';
@@ -19,7 +19,7 @@ declare const _default: DefineComponent<__VLS_Props, {}, {}, {}, {}, ComponentOp
19
19
  $: ComponentInternalInstance;
20
20
  $data: {};
21
21
  $props: {
22
- readonly size?: ButtonSize;
22
+ readonly size?: SizeType;
23
23
  readonly onSubmit?: ((e: Event) => void) | undefined;
24
24
  readonly layout?: string | undefined;
25
25
  readonly disabled?: boolean | undefined;
@@ -314,8 +314,8 @@ declare const _default: DefineComponent<__VLS_Props, {}, {}, {}, {}, ComponentOp
314
314
  default: string | string[];
315
315
  };
316
316
  size: {
317
- type: PropType<SizeType>;
318
- default: SizeType;
317
+ type: PropType<ButtonSize>;
318
+ default: ButtonSize;
319
319
  };
320
320
  disabled: {
321
321
  type: BooleanConstructor;
@@ -342,7 +342,7 @@ declare const _default: DefineComponent<__VLS_Props, {}, {}, {}, {}, ComponentOp
342
342
  default: (name: string | number | string[] | number[], status: boolean, errors: string[]) => void;
343
343
  };
344
344
  }>> & Readonly<{}>, () => VueNode, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, PublicProps, {
345
- size: SizeType;
345
+ size: ButtonSize;
346
346
  onSubmit: (e: Event) => void;
347
347
  disabled: boolean;
348
348
  validateTrigger: string | string[];
@@ -634,8 +634,8 @@ declare const _default: DefineComponent<__VLS_Props, {}, {}, {}, {}, ComponentOp
634
634
  default: string | string[];
635
635
  };
636
636
  size: {
637
- type: PropType<SizeType>;
638
- default: SizeType;
637
+ type: PropType<ButtonSize>;
638
+ default: ButtonSize;
639
639
  };
640
640
  disabled: {
641
641
  type: BooleanConstructor;
@@ -662,7 +662,7 @@ declare const _default: DefineComponent<__VLS_Props, {}, {}, {}, {}, ComponentOp
662
662
  default: (name: string | number | string[] | number[], status: boolean, errors: string[]) => void;
663
663
  };
664
664
  }>> & Readonly<{}>, () => VueNode, {}, {}, {}, {
665
- size: SizeType;
665
+ size: ButtonSize;
666
666
  onSubmit: (e: Event) => void;
667
667
  disabled: boolean;
668
668
  validateTrigger: string | string[];
@@ -1,7 +1,7 @@
1
1
  import { BatchInputGroupProps } from './interface';
2
2
  import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions, ComponentInternalInstance, VNodeProps, AllowedComponentProps, ComponentCustomProps, Slot, ComponentPublicInstance, ComponentOptionsBase, GlobalComponents, GlobalDirectives, DebuggerEvent, nextTick, WatchOptions, WatchStopHandle, ShallowUnwrapRef, ComponentCustomProperties } from 'vue';
3
3
  import { FieldMode, ApFieldTextProps } from '../../ap-field';
4
- import { ButtonSize } from '@aplus-frontend/antdv/es/button';
4
+ import { SizeType } from '@aplus-frontend/antdv/es/config-provider';
5
5
  import { FocusEventHandler, ChangeEventHandler, CompositionEventHandler, KeyboardEventHandler, MouseEventHandler } from '@aplus-frontend/antdv/es/_util/EventInterface';
6
6
  import { ShowCountProps } from '@aplus-frontend/antdv/es/vc-input/inputProps';
7
7
  import { InputFocusOptions } from '@aplus-frontend/antdv/es/vc-input/utils/commonUtils';
@@ -31,7 +31,7 @@ declare const _default: DefineComponent<BatchInputGroupProps, {}, {}, {}, {}, Co
31
31
  readonly style?: unknown;
32
32
  readonly type?: "number" | "reset" | "submit" | "button" | "search" | "time" | "month" | "date" | "week" | "hidden" | "checkbox" | "radio" | "color" | "text" | "range" | "tel" | "url" | "email" | "image" | "datetime-local" | "file" | "password" | undefined;
33
33
  readonly lazy?: boolean | undefined;
34
- readonly size?: ButtonSize;
34
+ readonly size?: SizeType;
35
35
  readonly hidden?: boolean | undefined;
36
36
  readonly onBlur?: FocusEventHandler | undefined;
37
37
  readonly onChange?: ChangeEventHandler | undefined;