@aplus-frontend/ui 0.1.17 → 0.1.19
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-download/ap-download.vue.mjs +33 -30
- package/es/src/ap-download/style/ap-download.css +1 -4
- package/es/src/ap-field/select/index.vue.mjs +5 -5
- package/es/src/ap-form/ap-form-item.vue.mjs +18 -17
- package/es/src/ap-table/ap-table.vue.d.ts +10 -3
- package/es/src/ap-table/ap-table.vue.mjs +135 -134
- package/es/src/ap-table/constants.d.ts +8 -31
- package/es/src/ap-table/constants.mjs +51 -41
- package/es/src/ap-table/interface.d.ts +5 -1
- package/es/src/ap-table/style/ap-table.css +0 -3
- package/es/src/ap-table/utils.d.ts +7 -1
- package/es/src/ap-table/utils.mjs +113 -86
- package/es/src/business/ap-batch-action-group/interface.d.ts +1 -1
- package/es/src/business/ap-image/ApImage.vue.d.ts +31 -29
- package/es/src/business/ap-image/ApImage.vue2.mjs +32 -29
- package/es/src/business/ap-label/ApLabel.d.ts +141 -0
- package/es/src/business/ap-label/ApLabel.mjs +49 -0
- package/es/src/business/ap-label/ApLabelGroup.mjs +11 -12
- package/es/src/business/ap-label/constans.d.ts +65 -1
- package/es/src/business/ap-label/constans.mjs +33 -2
- package/es/src/business/ap-label/index.d.ts +1 -1
- package/es/src/business/ap-label/interface.d.ts +2 -1
- package/es/src/business/index.d.ts +195 -201
- package/es/src/business/index.mjs +18 -19
- package/es/src/pro-form/hooks/use-label-width.d.ts +1 -1
- package/es/src/theme/ap-download/ap-download.css +1 -4
- package/es/src/theme/ap-table/ap-table.css +0 -3
- package/lib/src/ap-download/ap-download.vue.js +1 -1
- package/lib/src/ap-download/style/ap-download.css +1 -4
- package/lib/src/ap-field/select/index.vue.js +1 -1
- package/lib/src/ap-form/ap-form-item.vue.js +1 -1
- package/lib/src/ap-table/ap-table.vue.d.ts +10 -3
- package/lib/src/ap-table/ap-table.vue.js +1 -1
- package/lib/src/ap-table/constants.d.ts +8 -31
- package/lib/src/ap-table/constants.js +1 -1
- package/lib/src/ap-table/interface.d.ts +5 -1
- package/lib/src/ap-table/style/ap-table.css +0 -3
- package/lib/src/ap-table/utils.d.ts +7 -1
- package/lib/src/ap-table/utils.js +1 -1
- package/lib/src/business/ap-batch-action-group/interface.d.ts +1 -1
- package/lib/src/business/ap-image/ApImage.vue.d.ts +31 -29
- package/lib/src/business/ap-image/ApImage.vue2.js +1 -1
- package/lib/src/business/ap-label/ApLabel.d.ts +141 -0
- package/lib/src/business/ap-label/ApLabel.js +1 -0
- package/lib/src/business/ap-label/ApLabelGroup.js +1 -1
- package/lib/src/business/ap-label/constans.d.ts +65 -1
- package/lib/src/business/ap-label/constans.js +1 -1
- package/lib/src/business/ap-label/index.d.ts +1 -1
- package/lib/src/business/ap-label/interface.d.ts +2 -1
- package/lib/src/business/index.d.ts +195 -201
- package/lib/src/business/index.js +1 -1
- package/lib/src/pro-form/hooks/use-label-width.d.ts +1 -1
- package/lib/src/theme/ap-download/ap-download.css +1 -4
- package/lib/src/theme/ap-table/ap-table.css +0 -3
- package/package.json +1 -1
- package/es/src/business/ap-label/ApLabel.vue.d.ts +0 -56
- package/es/src/business/ap-label/ApLabel.vue.mjs +0 -4
- package/es/src/business/ap-label/ApLabel.vue2.mjs +0 -85
- package/lib/src/business/ap-label/ApLabel.vue.d.ts +0 -56
- package/lib/src/business/ap-label/ApLabel.vue.js +0 -1
- package/lib/src/business/ap-label/ApLabel.vue2.js +0 -1
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { defineComponent as c, useSlots as r, computed as m, createVNode as e, mergeProps as d } from "vue";
|
|
2
|
+
import { Tooltip as f, Badge as p } from "ant-design-vue";
|
|
3
|
+
import { IconApAdLineAnnotation as A, IconApAdFillWarn as y, IconApAdFillExecution as v, IconApAdFillSuccessful as b } from "@aplus-frontend/icon";
|
|
4
|
+
import "../../config-provider/index.mjs";
|
|
5
|
+
import { ApLabelProps as g } from "./constans.mjs";
|
|
6
|
+
import { omit as T } from "lodash-unified";
|
|
7
|
+
import "./style.css";
|
|
8
|
+
import { useNamespace as x } from "../../config-provider/hooks/use-namespace.mjs";
|
|
9
|
+
const B = /* @__PURE__ */ c({
|
|
10
|
+
name: "ApLabel",
|
|
11
|
+
props: g(),
|
|
12
|
+
setup(l) {
|
|
13
|
+
const {
|
|
14
|
+
b: s,
|
|
15
|
+
e: i
|
|
16
|
+
} = x("ap-label"), o = r(), n = m(() => ({
|
|
17
|
+
color: l.iconColor,
|
|
18
|
+
"font-size": l.iconSize + "px",
|
|
19
|
+
"margin-left": "4px",
|
|
20
|
+
display: "inline-flex"
|
|
21
|
+
})), a = (u, t) => u ? e(f, {
|
|
22
|
+
title: u,
|
|
23
|
+
placement: t.placement || "top",
|
|
24
|
+
color: t.toolTipBgColor
|
|
25
|
+
}, {
|
|
26
|
+
default: () => [t.iconType === "question" && e(A, {
|
|
27
|
+
style: n.value
|
|
28
|
+
}, null), t.iconType === "warning" && e(y, {
|
|
29
|
+
style: n.value
|
|
30
|
+
}, null), t.iconType === "ellipsis" && e(v, {
|
|
31
|
+
style: n.value
|
|
32
|
+
}, null), t.iconType === "success" && e(b, {
|
|
33
|
+
style: n.value
|
|
34
|
+
}, null)]
|
|
35
|
+
}) : null;
|
|
36
|
+
return () => e("div", null, [l.show ? e("div", {
|
|
37
|
+
class: [s()]
|
|
38
|
+
}, [e("div", {
|
|
39
|
+
class: [i("content")]
|
|
40
|
+
}, [e(p, d(T(l, ["helpMessage", "placement", "iconColor"]), {
|
|
41
|
+
status: l.status ? l.status : "default"
|
|
42
|
+
}), null), o.default ? o.default() : a(l.helpMessage, l)]), o.custom ? e("div", {
|
|
43
|
+
class: [i("custom")]
|
|
44
|
+
}, [o.custom()]) : null]) : null]);
|
|
45
|
+
}
|
|
46
|
+
});
|
|
47
|
+
export {
|
|
48
|
+
B as default
|
|
49
|
+
};
|
|
@@ -1,23 +1,22 @@
|
|
|
1
1
|
import { defineComponent as n, createVNode as o, mergeProps as l, createTextVNode as m } from "vue";
|
|
2
2
|
import "../../config-provider/index.mjs";
|
|
3
|
-
import "./ApLabel.
|
|
3
|
+
import f from "./ApLabel.mjs";
|
|
4
4
|
import { omit as t } from "lodash-unified";
|
|
5
|
-
import { ApLabelGroupProps as
|
|
6
|
-
import { Tag as
|
|
7
|
-
import { useNamespace as
|
|
8
|
-
import i from "./ApLabel.vue2.mjs";
|
|
5
|
+
import { ApLabelGroupProps as s } from "./constans.mjs";
|
|
6
|
+
import { Tag as c } from "ant-design-vue";
|
|
7
|
+
import { useNamespace as g } from "../../config-provider/hooks/use-namespace.mjs";
|
|
9
8
|
const {
|
|
10
|
-
b:
|
|
11
|
-
} =
|
|
9
|
+
b: p
|
|
10
|
+
} = g("ap-label-group"), x = /* @__PURE__ */ n({
|
|
12
11
|
name: "ApLabelGroup",
|
|
13
|
-
props:
|
|
12
|
+
props: s(),
|
|
14
13
|
setup(r) {
|
|
15
|
-
const a = (e) => (r.tagValue || r.tagValue === 0) && e.tagConfig && e.tagConfig.length > 0 ? () => e.tagConfig.filter((u) => r.tagValue === u.value).map((u) => o(
|
|
14
|
+
const a = (e) => (r.tagValue || r.tagValue === 0) && e.tagConfig && e.tagConfig.length > 0 ? () => e.tagConfig.filter((u) => r.tagValue === u.value).map((u) => o(c, t(u, ["text"]), {
|
|
16
15
|
default: () => [u.text]
|
|
17
16
|
})) : e.customRender ? () => o("div", null, [e.customRender(r.record)]) : null;
|
|
18
17
|
return () => o("div", {
|
|
19
|
-
class:
|
|
20
|
-
}, [r.columns ? r.columns.map((e, u) => o(
|
|
18
|
+
class: p()
|
|
19
|
+
}, [r.columns ? r.columns.map((e, u) => o(f, l({
|
|
21
20
|
key: u,
|
|
22
21
|
show: r.value === e.value
|
|
23
22
|
}, t(e, ["value", "tagConfig", "customRender"])), {
|
|
@@ -26,5 +25,5 @@ const {
|
|
|
26
25
|
}
|
|
27
26
|
});
|
|
28
27
|
export {
|
|
29
|
-
|
|
28
|
+
x as default
|
|
30
29
|
};
|
|
@@ -1,5 +1,8 @@
|
|
|
1
|
-
import { PropType } from 'vue';
|
|
1
|
+
import { PropType, VNode, CSSProperties } from 'vue';
|
|
2
2
|
import { ApLabelGroupItemProps } from './interface';
|
|
3
|
+
import { TooltipPlacement } from 'ant-design-vue/es/Tooltip';
|
|
4
|
+
import { VueTypeValidableDef } from '../../../node_modules/vue-types';
|
|
5
|
+
import { LiteralUnion } from 'ant-design-vue/es/_util/type';
|
|
3
6
|
export declare const ApLabelGroupProps: () => {
|
|
4
7
|
value: {
|
|
5
8
|
type: PropType<string | number | undefined>;
|
|
@@ -18,3 +21,64 @@ export declare const ApLabelGroupProps: () => {
|
|
|
18
21
|
default: null;
|
|
19
22
|
};
|
|
20
23
|
};
|
|
24
|
+
export declare const ApLabelProps: () => {
|
|
25
|
+
helpMessage: {
|
|
26
|
+
type: PropType<VNode | string | undefined>;
|
|
27
|
+
default: undefined;
|
|
28
|
+
};
|
|
29
|
+
placement: {
|
|
30
|
+
type: PropType<TooltipPlacement>;
|
|
31
|
+
default: string;
|
|
32
|
+
};
|
|
33
|
+
iconColor: {
|
|
34
|
+
type: PropType<string>;
|
|
35
|
+
default: string;
|
|
36
|
+
};
|
|
37
|
+
iconType: {
|
|
38
|
+
type: PropType<"question" | "warning" | "ellipsis" | "success">;
|
|
39
|
+
default: string;
|
|
40
|
+
};
|
|
41
|
+
iconSize: {
|
|
42
|
+
type: PropType<number>;
|
|
43
|
+
default: number;
|
|
44
|
+
};
|
|
45
|
+
show: {
|
|
46
|
+
type: BooleanConstructor;
|
|
47
|
+
default: boolean;
|
|
48
|
+
};
|
|
49
|
+
toolTipBgColor: {
|
|
50
|
+
type: PropType<string>;
|
|
51
|
+
};
|
|
52
|
+
count: VueTypeValidableDef<any> & {
|
|
53
|
+
default: any;
|
|
54
|
+
};
|
|
55
|
+
showZero: {
|
|
56
|
+
type: BooleanConstructor;
|
|
57
|
+
default: any;
|
|
58
|
+
};
|
|
59
|
+
overflowCount: {
|
|
60
|
+
type: NumberConstructor;
|
|
61
|
+
default: number;
|
|
62
|
+
};
|
|
63
|
+
dot: {
|
|
64
|
+
type: BooleanConstructor;
|
|
65
|
+
default: any;
|
|
66
|
+
};
|
|
67
|
+
prefixCls: StringConstructor;
|
|
68
|
+
scrollNumberPrefixCls: StringConstructor;
|
|
69
|
+
status: {
|
|
70
|
+
type: PropType<"error" | "default" | "success" | "processing" | "warning">;
|
|
71
|
+
};
|
|
72
|
+
size: {
|
|
73
|
+
type: PropType<"default" | "small">;
|
|
74
|
+
default: string;
|
|
75
|
+
};
|
|
76
|
+
color: PropType< LiteralUnion<"blue" | "cyan" | "gold" | "green" | "lime" | "magenta" | "orange" | "pink" | "purple" | "red" | "yellow" | "volcano" | "geekblue">>;
|
|
77
|
+
text: VueTypeValidableDef<any>;
|
|
78
|
+
offset: PropType<[string | number, string | number]>;
|
|
79
|
+
numberStyle: {
|
|
80
|
+
type: PropType< CSSProperties>;
|
|
81
|
+
default: CSSProperties;
|
|
82
|
+
};
|
|
83
|
+
title: StringConstructor;
|
|
84
|
+
};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
import { badgeProps as e } from "ant-design-vue/es/badge/Badge";
|
|
2
|
+
const o = () => ({
|
|
2
3
|
value: {
|
|
3
4
|
type: String,
|
|
4
5
|
default: void 0
|
|
@@ -15,7 +16,37 @@ const e = () => ({
|
|
|
15
16
|
type: Object,
|
|
16
17
|
default: null
|
|
17
18
|
}
|
|
19
|
+
}), l = () => ({
|
|
20
|
+
...e(),
|
|
21
|
+
helpMessage: {
|
|
22
|
+
type: String,
|
|
23
|
+
default: void 0
|
|
24
|
+
},
|
|
25
|
+
placement: {
|
|
26
|
+
type: String,
|
|
27
|
+
default: "top"
|
|
28
|
+
},
|
|
29
|
+
iconColor: {
|
|
30
|
+
type: String,
|
|
31
|
+
default: "#FF4D4F"
|
|
32
|
+
},
|
|
33
|
+
iconType: {
|
|
34
|
+
type: String,
|
|
35
|
+
default: "question"
|
|
36
|
+
},
|
|
37
|
+
iconSize: {
|
|
38
|
+
type: Number,
|
|
39
|
+
default: 16
|
|
40
|
+
},
|
|
41
|
+
show: {
|
|
42
|
+
type: Boolean,
|
|
43
|
+
default: !0
|
|
44
|
+
},
|
|
45
|
+
toolTipBgColor: {
|
|
46
|
+
type: String
|
|
47
|
+
}
|
|
18
48
|
});
|
|
19
49
|
export {
|
|
20
|
-
|
|
50
|
+
o as ApLabelGroupProps,
|
|
51
|
+
l as ApLabelProps
|
|
21
52
|
};
|
|
@@ -4,12 +4,13 @@ import { TagProps } from 'ant-design-vue/es/Tag';
|
|
|
4
4
|
import { VNode, VNodeChild } from 'vue';
|
|
5
5
|
type Recordable = Record<string, any>;
|
|
6
6
|
export type ApLabelProps = BadgeProps & Partial<{
|
|
7
|
-
helpMessage: string;
|
|
7
|
+
helpMessage: VNode | string | undefined;
|
|
8
8
|
placement: TooltipPlacement;
|
|
9
9
|
iconColor: string;
|
|
10
10
|
iconType: 'question' | 'warning' | 'ellipsis' | 'success';
|
|
11
11
|
iconSize: number;
|
|
12
12
|
show: boolean;
|
|
13
|
+
toolTipBgColor: string;
|
|
13
14
|
}>;
|
|
14
15
|
export type tagConfigKey = TagProps & {
|
|
15
16
|
value: number | string | undefined | null;
|