@aplus-frontend/ui 6.19.0 → 6.20.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 (28) hide show
  1. package/es/src/ap-grid/index.vue.mjs +1 -1
  2. package/es/src/ap-tag/ap-tag.vue.mjs +30 -46
  3. package/es/src/business/ap-draggable-grid/ApDraggableGrid.vue.d.ts +3 -2
  4. package/es/src/business/ap-draggable-grid/ApDraggableGrid.vue2.mjs +212 -398
  5. package/es/src/business/ap-draggable-grid/constans.mjs +1 -1
  6. package/es/src/business/ap-draggable-grid/index.d.ts +5 -2
  7. package/es/src/business/ap-draggable-grid/interface.d.ts +3 -2
  8. package/es/src/business/ap-draggable-grid/utils/sortItemsByRowAndCol.d.ts +2 -0
  9. package/es/src/business/ap-draggable-grid/utils/sortItemsByRowAndCol.mjs +14 -0
  10. package/es/src/version.d.ts +1 -1
  11. package/es/src/version.mjs +1 -1
  12. package/lib/src/ap-grid/index.vue.js +1 -1
  13. package/lib/src/ap-tag/ap-tag.vue.js +1 -1
  14. package/lib/src/business/ap-draggable-grid/ApDraggableGrid.vue.d.ts +3 -2
  15. package/lib/src/business/ap-draggable-grid/ApDraggableGrid.vue2.js +1 -1
  16. package/lib/src/business/ap-draggable-grid/constans.js +1 -1
  17. package/lib/src/business/ap-draggable-grid/index.d.ts +5 -2
  18. package/lib/src/business/ap-draggable-grid/interface.d.ts +3 -2
  19. package/lib/src/business/ap-draggable-grid/utils/sortItemsByRowAndCol.d.ts +2 -0
  20. package/lib/src/business/ap-draggable-grid/utils/sortItemsByRowAndCol.js +1 -0
  21. package/lib/src/version.d.ts +1 -1
  22. package/lib/src/version.js +1 -1
  23. package/package.json +4 -4
  24. package/theme/ap-draggable-grid/ap-draggable-grid.css +3 -3
  25. package/theme/ap-draggable-grid/ap-draggable-grid.less +3 -4
  26. package/theme/ap-tag/ap-tag.css +4 -3
  27. package/theme/ap-tag/ap-tag.less +4 -3
  28. package/theme/index.css +7 -6
@@ -462,7 +462,7 @@ const Gt = /* @__PURE__ */ $e({
462
462
  onCheckboxRangeChange: ze,
463
463
  onCheckboxAll: Ne,
464
464
  onRadioChange: Ae,
465
- onCurrentChange: Ve
465
+ onCurrentRowChange: Ve
466
466
  }), te({
467
467
  empty: h(() => [
468
468
  _(a(ie), {
@@ -1,10 +1,8 @@
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";
1
+ import { defineComponent as S, computed as n, createElementBlock as $, openBlock as b, normalizeClass as i, normalizeStyle as w, createElementVNode as B, toDisplayString as _ } from "vue";
2
2
  import "../config-provider/index.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";
6
- import { useNamespace as _ } from "../config-provider/hooks/use-namespace.mjs";
7
- const H = /* @__PURE__ */ b({
3
+ import { useGlobalConfig as z } from "../config-provider/hooks/use-global-config.mjs";
4
+ import { useNamespace as v } from "../config-provider/hooks/use-namespace.mjs";
5
+ const I = ["title"], N = /* @__PURE__ */ S({
8
6
  name: "ApTag",
9
7
  __name: "ap-tag",
10
8
  props: {
@@ -16,49 +14,35 @@ const H = /* @__PURE__ */ b({
16
14
  fixedWidth: { type: Boolean, default: !1 }
17
15
  },
18
16
  setup(o) {
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")}${$}`;
17
+ const e = o, l = z("uiMode"), { b: r, bm: a } = v("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}`;
24
22
  }
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)
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
+ })), d = n(() => [
28
+ r("wrapper"),
29
+ r(`wrapper-${e.type}`),
30
+ a("wrapper", e.size)
31
+ ].filter(Boolean)), u = 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(), $("span", {
36
+ style: w(c.value),
37
+ title: t.text,
38
+ class: i(d.value)
53
39
  }, [
54
- B(h(I), {
55
- class: l(m.value),
56
- ellipsis: { tooltip: e.text },
57
- content: e.text
58
- }, null, 8, ["class", "ellipsis", "content"])
59
- ], 6));
40
+ B("span", {
41
+ class: i(u.value)
42
+ }, _(t.text), 3)
43
+ ], 14, I));
60
44
  }
61
45
  });
62
46
  export {
63
- H as default
47
+ N as default
64
48
  };
@@ -10,8 +10,8 @@ declare function __VLS_template(): {
10
10
  span: number;
11
11
  row: number;
12
12
  col: number;
13
- showHeight: number | string;
14
- height?: number | string | undefined;
13
+ showHeight?: number | string | undefined;
14
+ height: number | string;
15
15
  module: string;
16
16
  };
17
17
  index: number;
@@ -58,6 +58,7 @@ declare const __VLS_component: DefineComponent<ExtractPropTypes<{
58
58
  };
59
59
  }>, {
60
60
  setGridItems: (items: ApDraggableGridItemBase[]) => void;
61
+ getGridItems: () => ApDraggableGridItemBase[];
61
62
  refreshGrid: () => void;
62
63
  }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
63
64
  onGridListChange: (args_0: ApDraggableGridItemBase[]) => any;