@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.
- package/es/src/ap-grid/index.vue.mjs +1 -1
- package/es/src/ap-tag/ap-tag.vue.mjs +30 -46
- package/es/src/business/ap-draggable-grid/ApDraggableGrid.vue.d.ts +3 -2
- package/es/src/business/ap-draggable-grid/ApDraggableGrid.vue2.mjs +212 -398
- package/es/src/business/ap-draggable-grid/constans.mjs +1 -1
- package/es/src/business/ap-draggable-grid/index.d.ts +5 -2
- package/es/src/business/ap-draggable-grid/interface.d.ts +3 -2
- package/es/src/business/ap-draggable-grid/utils/sortItemsByRowAndCol.d.ts +2 -0
- package/es/src/business/ap-draggable-grid/utils/sortItemsByRowAndCol.mjs +14 -0
- package/es/src/version.d.ts +1 -1
- package/es/src/version.mjs +1 -1
- package/lib/src/ap-grid/index.vue.js +1 -1
- package/lib/src/ap-tag/ap-tag.vue.js +1 -1
- package/lib/src/business/ap-draggable-grid/ApDraggableGrid.vue.d.ts +3 -2
- package/lib/src/business/ap-draggable-grid/ApDraggableGrid.vue2.js +1 -1
- package/lib/src/business/ap-draggable-grid/constans.js +1 -1
- package/lib/src/business/ap-draggable-grid/index.d.ts +5 -2
- package/lib/src/business/ap-draggable-grid/interface.d.ts +3 -2
- package/lib/src/business/ap-draggable-grid/utils/sortItemsByRowAndCol.d.ts +2 -0
- package/lib/src/business/ap-draggable-grid/utils/sortItemsByRowAndCol.js +1 -0
- package/lib/src/version.d.ts +1 -1
- package/lib/src/version.js +1 -1
- package/package.json +4 -4
- package/theme/ap-draggable-grid/ap-draggable-grid.css +3 -3
- package/theme/ap-draggable-grid/ap-draggable-grid.less +3 -4
- package/theme/ap-tag/ap-tag.css +4 -3
- package/theme/ap-tag/ap-tag.less +4 -3
- package/theme/index.css +7 -6
|
@@ -1,10 +1,8 @@
|
|
|
1
|
-
import { defineComponent as
|
|
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 {
|
|
4
|
-
import {
|
|
5
|
-
|
|
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
|
|
20
|
-
function
|
|
21
|
-
|
|
22
|
-
const
|
|
23
|
-
return `#${
|
|
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
|
|
26
|
-
|
|
27
|
-
"--tag-main-color":
|
|
28
|
-
"--tag-main-color-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
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(
|
|
55
|
-
class:
|
|
56
|
-
|
|
57
|
-
|
|
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
|
-
|
|
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
|
|
14
|
-
height
|
|
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;
|