@aplus-frontend/ui 6.36.0 → 6.37.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/ag-grid/index.vue.d.ts +2 -30
- package/es/src/ag-grid/index.vue.mjs +1 -1
- package/es/src/ag-grid/interface.d.ts +15 -0
- package/es/src/ap-action/group/index.vue.mjs +41 -34
- package/es/src/ap-action/interface.d.ts +17 -0
- package/es/src/ap-action/item/index.vue2.mjs +34 -25
- package/es/src/ap-action/item-dropdown/index.vue.mjs +22 -20
- package/es/src/ap-action/item-modal/index.vue.mjs +14 -12
- package/es/src/ap-action/item-popconfirm/index.vue.mjs +13 -11
- package/es/src/version.d.ts +1 -1
- package/es/src/version.mjs +1 -1
- package/lib/src/ag-grid/index.vue.d.ts +2 -30
- package/lib/src/ag-grid/index.vue.js +1 -1
- package/lib/src/ag-grid/interface.d.ts +15 -0
- package/lib/src/ap-action/group/index.vue.js +1 -1
- package/lib/src/ap-action/interface.d.ts +17 -0
- package/lib/src/ap-action/item/index.vue2.js +1 -1
- package/lib/src/ap-action/item-dropdown/index.vue.js +1 -1
- package/lib/src/ap-action/item-modal/index.vue.js +1 -1
- package/lib/src/ap-action/item-popconfirm/index.vue.js +1 -1
- package/lib/src/version.d.ts +1 -1
- package/lib/src/version.js +1 -1
- package/package.json +3 -3
- package/theme/ag-grid/index.css +6 -0
- package/theme/ap-action/item.css +6 -0
- package/theme/ap-action/item.less +9 -0
- package/theme/ap-grid/index.css +6 -0
- package/theme/ap-table/ap-table.css +6 -0
- package/theme/ap-table-modal/index.css +6 -0
- package/theme/editable-table/index.css +6 -0
- package/theme/index.css +6 -0
|
@@ -1,38 +1,10 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { AgGridExpose, AgGridProps, AgGridSlots } from './interface';
|
|
2
2
|
import { VNodeProps, AllowedComponentProps, ComponentCustomProps, PublicProps, ShallowUnwrapRef, VNode } from 'vue';
|
|
3
3
|
declare const _default: <RecordType>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
4
4
|
props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{} & VNodeProps & AllowedComponentProps & ComponentCustomProps, never>, never> & AgGridProps<RecordType> & Partial<{}>> & PublicProps;
|
|
5
5
|
expose(exposed: ShallowUnwrapRef<AgGridExpose>): void;
|
|
6
6
|
attrs: any;
|
|
7
|
-
slots: Readonly<
|
|
8
|
-
/**
|
|
9
|
-
* 自定义查询表单额外的区域
|
|
10
|
-
*/
|
|
11
|
-
searchFormExtra?: any;
|
|
12
|
-
/**
|
|
13
|
-
* 自定义表格上部查询表单下部分区域的渲染
|
|
14
|
-
*/
|
|
15
|
-
title?: (params: {
|
|
16
|
-
selectedRows: RecordType[];
|
|
17
|
-
selectedRowKeys: (string | number)[];
|
|
18
|
-
shownColumns: AgGridColumnType<RecordType>[];
|
|
19
|
-
clearAll: () => void;
|
|
20
|
-
}) => any;
|
|
21
|
-
}> & {
|
|
22
|
-
/**
|
|
23
|
-
* 自定义查询表单额外的区域
|
|
24
|
-
*/
|
|
25
|
-
searchFormExtra?: any;
|
|
26
|
-
/**
|
|
27
|
-
* 自定义表格上部查询表单下部分区域的渲染
|
|
28
|
-
*/
|
|
29
|
-
title?: (params: {
|
|
30
|
-
selectedRows: RecordType[];
|
|
31
|
-
selectedRowKeys: (string | number)[];
|
|
32
|
-
shownColumns: AgGridColumnType<RecordType>[];
|
|
33
|
-
clearAll: () => void;
|
|
34
|
-
}) => any;
|
|
35
|
-
};
|
|
7
|
+
slots: Readonly<AgGridSlots<RecordType>> & AgGridSlots<RecordType>;
|
|
36
8
|
emit: {};
|
|
37
9
|
}>) => VNode & {
|
|
38
10
|
__ctx?: Awaited<typeof __VLS_setup>;
|
|
@@ -392,3 +392,18 @@ export type AgGridExpose<SearchParamsType = Recordable, RecordType = any> = {
|
|
|
392
392
|
*/
|
|
393
393
|
_internalGridApi?: GridApi | undefined;
|
|
394
394
|
};
|
|
395
|
+
export type AgGridSlots<RecordType> = {
|
|
396
|
+
/**
|
|
397
|
+
* 自定义查询表单额外的区域
|
|
398
|
+
*/
|
|
399
|
+
searchFormExtra?: any;
|
|
400
|
+
/**
|
|
401
|
+
* 自定义表格上部查询表单下部分区域的渲染
|
|
402
|
+
*/
|
|
403
|
+
title?: (params: {
|
|
404
|
+
selectedRows: RecordType[];
|
|
405
|
+
selectedRowKeys: (string | number)[];
|
|
406
|
+
shownColumns: AgGridColumnType<RecordType>[];
|
|
407
|
+
clearAll: () => void;
|
|
408
|
+
}) => any;
|
|
409
|
+
};
|
|
@@ -1,67 +1,74 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { Space as
|
|
1
|
+
import { defineComponent as k, computed as m, unref as c, createBlock as n, openBlock as o, withCtx as A, createElementBlock as a, createCommentVNode as y, Fragment as p, renderList as v, mergeProps as s } from "vue";
|
|
2
|
+
import { Space as w } from "@aplus-frontend/antdv";
|
|
3
3
|
import "../item/index.vue.mjs";
|
|
4
4
|
import "../item-modal/index.vue2.mjs";
|
|
5
5
|
import "../item-popconfirm/index.vue2.mjs";
|
|
6
6
|
import "../item-dropdown/index.vue2.mjs";
|
|
7
7
|
import "../../config-provider/index.mjs";
|
|
8
|
-
import { isUndefined as
|
|
9
|
-
import { useLocale as
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
import
|
|
14
|
-
const q = /* @__PURE__ */
|
|
8
|
+
import { isUndefined as x } from "lodash-unified";
|
|
9
|
+
import { useLocale as B } from "../../config-provider/hooks/use-locale.mjs";
|
|
10
|
+
import f from "../item-dropdown/index.vue.mjs";
|
|
11
|
+
import F from "../item-modal/index.vue.mjs";
|
|
12
|
+
import $ from "../item-popconfirm/index.vue.mjs";
|
|
13
|
+
import b from "../item/index.vue2.mjs";
|
|
14
|
+
const q = /* @__PURE__ */ k({
|
|
15
15
|
name: "ApActionGroup",
|
|
16
16
|
__name: "index",
|
|
17
17
|
props: {
|
|
18
18
|
count: { default: 3 },
|
|
19
19
|
trigger: { default: () => ["hover"] },
|
|
20
20
|
placement: { default: "bottomRight" },
|
|
21
|
-
actions: { default: () => [] }
|
|
21
|
+
actions: { default: () => [] },
|
|
22
|
+
iconFirst: { type: Boolean }
|
|
22
23
|
},
|
|
23
|
-
setup(
|
|
24
|
-
const
|
|
25
|
-
() =>
|
|
26
|
-
(e) => e.visible ||
|
|
24
|
+
setup(_) {
|
|
25
|
+
const r = _, { t: g } = B(), l = m(
|
|
26
|
+
() => r.actions.filter(
|
|
27
|
+
(e) => e.visible || x(e.visible)
|
|
27
28
|
)
|
|
28
|
-
),
|
|
29
|
-
const e = c(
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
29
|
+
), d = m(() => c(l).length > r.count), u = m(() => {
|
|
30
|
+
const e = c(l);
|
|
31
|
+
if (e.length <= r.count)
|
|
32
|
+
return {
|
|
33
|
+
showActions: e,
|
|
34
|
+
menuActions: []
|
|
35
|
+
};
|
|
36
|
+
let i = e.slice(0, r.count - 1);
|
|
37
|
+
return r.iconFirst && (i = i.map((t) => ({
|
|
38
|
+
...t,
|
|
39
|
+
iconFirst: !0
|
|
40
|
+
}))), {
|
|
41
|
+
showActions: i,
|
|
42
|
+
menuActions: e.slice(r.count - 1)
|
|
36
43
|
};
|
|
37
44
|
});
|
|
38
|
-
return (e,
|
|
45
|
+
return (e, i) => (o(), n(c(w), {
|
|
39
46
|
size: 16,
|
|
40
47
|
align: "center"
|
|
41
48
|
}, {
|
|
42
|
-
default:
|
|
43
|
-
(
|
|
44
|
-
|
|
49
|
+
default: A(() => [
|
|
50
|
+
(o(!0), a(p, null, v(u.value.showActions, (t, h) => (o(), a(p, { key: h }, [
|
|
51
|
+
t.actions ? (o(), n(f, s({
|
|
45
52
|
key: 0,
|
|
46
53
|
ref_for: !0
|
|
47
|
-
},
|
|
54
|
+
}, t), null, 16)) : t.modalProps ? (o(), n(F, s({
|
|
48
55
|
key: 1,
|
|
49
56
|
ref_for: !0
|
|
50
|
-
},
|
|
57
|
+
}, t), null, 16)) : t.popconfirmProps ? (o(), n($, s({
|
|
51
58
|
key: 2,
|
|
52
59
|
ref_for: !0
|
|
53
|
-
},
|
|
60
|
+
}, t), null, 16)) : (o(), n(b, s({
|
|
54
61
|
key: 3,
|
|
55
62
|
ref_for: !0
|
|
56
|
-
},
|
|
63
|
+
}, t), null, 16))
|
|
57
64
|
], 64))), 128)),
|
|
58
|
-
|
|
65
|
+
d.value ? (o(), n(f, {
|
|
59
66
|
key: 0,
|
|
60
|
-
actions:
|
|
67
|
+
actions: u.value.menuActions,
|
|
61
68
|
placement: e.placement,
|
|
62
69
|
trigger: e.trigger,
|
|
63
|
-
text: c(
|
|
64
|
-
}, null, 8, ["actions", "placement", "trigger", "text"])) :
|
|
70
|
+
text: c(g)("ap.common.more")
|
|
71
|
+
}, null, 8, ["actions", "placement", "trigger", "text"])) : y("", !0)
|
|
65
72
|
]),
|
|
66
73
|
_: 1
|
|
67
74
|
}));
|
|
@@ -34,6 +34,15 @@ export type ApActionItemProps = {
|
|
|
34
34
|
* 是否显示loading效果
|
|
35
35
|
*/
|
|
36
36
|
loading?: boolean;
|
|
37
|
+
/**
|
|
38
|
+
* 配置左侧显示的图标
|
|
39
|
+
* @since 6.37.0
|
|
40
|
+
*/
|
|
41
|
+
icon?: any;
|
|
42
|
+
/**
|
|
43
|
+
* 是否优先显示图标
|
|
44
|
+
*/
|
|
45
|
+
iconFirst?: boolean;
|
|
37
46
|
};
|
|
38
47
|
export type MixedActionTypes = ApActionItemProps | ApActionItemModalProps | ApActionItemPopconfirmProps;
|
|
39
48
|
export type GroupActionTypes = MixedActionTypes | ApActionItemDropdownProps;
|
|
@@ -69,6 +78,10 @@ export type ApActionGroupProps = {
|
|
|
69
78
|
* 菜单项配置
|
|
70
79
|
*/
|
|
71
80
|
actions?: GroupActionTypes[];
|
|
81
|
+
/**
|
|
82
|
+
* 对于平铺Action,优先显示图标
|
|
83
|
+
*/
|
|
84
|
+
iconFirst?: boolean;
|
|
72
85
|
};
|
|
73
86
|
export type ApActionItemModalProps = ApActionItemProps & {
|
|
74
87
|
/**
|
|
@@ -89,4 +102,8 @@ export type ApActionItemSlots = {
|
|
|
89
102
|
disabled: boolean;
|
|
90
103
|
onClick: (e: MouseEvent) => void;
|
|
91
104
|
}) => any;
|
|
105
|
+
/**
|
|
106
|
+
* 自定义左侧图标
|
|
107
|
+
*/
|
|
108
|
+
icon?: any;
|
|
92
109
|
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as C, useSlots as B, createPropsRestProxy as A, ref as F, computed as d, unref as l, renderSlot as y, createElementBlock as u, createCommentVNode as a, openBlock as n, mergeProps as h, createBlock as f, normalizeClass as L, resolveDynamicComponent as g, isVNode as N, toDisplayString as P } from "vue";
|
|
2
2
|
import "../../config-provider/index.mjs";
|
|
3
|
-
import
|
|
4
|
-
import { useNamespace as
|
|
5
|
-
const
|
|
3
|
+
import S from "@aplus-frontend/antdv/es/button/LoadingIcon";
|
|
4
|
+
import { useNamespace as $ } from "../../config-provider/hooks/use-namespace.mjs";
|
|
5
|
+
const D = { key: 1 }, E = /* @__PURE__ */ C({
|
|
6
6
|
name: "ApActionItem",
|
|
7
7
|
__name: "index",
|
|
8
8
|
props: {
|
|
@@ -12,41 +12,50 @@ const N = { key: 1 }, I = /* @__PURE__ */ y({
|
|
|
12
12
|
visible: { type: Boolean, default: !0 },
|
|
13
13
|
onAction: { type: Function },
|
|
14
14
|
onClick: { type: Function },
|
|
15
|
-
loading: { type: Boolean, default: !1 }
|
|
15
|
+
loading: { type: Boolean, default: !1 },
|
|
16
|
+
icon: {},
|
|
17
|
+
iconFirst: { type: Boolean, default: !1 }
|
|
16
18
|
},
|
|
17
19
|
setup(o) {
|
|
18
|
-
const
|
|
19
|
-
function
|
|
20
|
-
|
|
20
|
+
const s = B(), r = A(o, ["color", "disabled", "visible", "loading", "iconFirst", "icon"]), { b: k, m: t, e: b } = $("action-item"), c = F(!1), m = d(() => o.iconFirst && (o.icon || s.icon));
|
|
21
|
+
function p(e) {
|
|
22
|
+
l(i) || o.disabled || (r.onClick?.(e), r.onAction && (c.value = !0, r.onAction(e).finally(() => c.value = !1)));
|
|
21
23
|
}
|
|
22
|
-
const
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
24
|
+
const i = d(() => o.loading || l(c)), v = d(() => [
|
|
25
|
+
k(),
|
|
26
|
+
t(o.color),
|
|
27
|
+
m.value ? t("icon-first") : null,
|
|
28
|
+
o.disabled ? t("disabled") : null,
|
|
29
|
+
i.value ? t("loading") : null
|
|
27
30
|
].filter(Boolean));
|
|
28
|
-
return (e,
|
|
29
|
-
loading:
|
|
31
|
+
return (e, I) => y(e.$slots, "trigger", {
|
|
32
|
+
loading: i.value,
|
|
30
33
|
disabled: e.disabled,
|
|
31
|
-
onClick:
|
|
34
|
+
onClick: p
|
|
32
35
|
}, () => [
|
|
33
|
-
e.visible ? (n(), u("span",
|
|
34
|
-
class:
|
|
35
|
-
onClick:
|
|
36
|
+
e.visible ? (n(), u("span", h({ key: 0 }, e.$attrs, {
|
|
37
|
+
class: v.value,
|
|
38
|
+
onClick: p
|
|
36
39
|
}), [
|
|
37
|
-
|
|
40
|
+
i.value ? (n(), f(l(S), {
|
|
38
41
|
key: 0,
|
|
39
42
|
"prefix-cls": "btn",
|
|
40
43
|
"exist-icon": !1,
|
|
41
44
|
loading: ""
|
|
42
|
-
})) :
|
|
43
|
-
|
|
44
|
-
|
|
45
|
+
})) : a("", !0),
|
|
46
|
+
e.icon || s.icon ? (n(), u("span", {
|
|
47
|
+
key: 1,
|
|
48
|
+
class: L(l(b)("icon-wrapper"))
|
|
49
|
+
}, [
|
|
50
|
+
(n(), f(g(e.icon || s.icon)))
|
|
51
|
+
], 2)) : a("", !0),
|
|
52
|
+
m.value ? a("", !0) : y(e.$slots, "default", { key: 2 }, () => [
|
|
53
|
+
N(e.text) ? (n(), f(g(e.text), { key: 0 })) : (n(), u("span", D, P(e.text || ""), 1))
|
|
45
54
|
])
|
|
46
|
-
], 16)) :
|
|
55
|
+
], 16)) : a("", !0)
|
|
47
56
|
]);
|
|
48
57
|
}
|
|
49
58
|
});
|
|
50
59
|
export {
|
|
51
|
-
|
|
60
|
+
E as default
|
|
52
61
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as _, ref as v, computed as k, createBlock as n, openBlock as
|
|
1
|
+
import { defineComponent as _, ref as v, computed as k, createBlock as n, openBlock as r, unref as o, withCtx as l, createElementVNode as w, normalizeClass as s, createVNode as u, createCommentVNode as B, normalizeProps as A, guardReactiveProps as b, renderSlot as C, createElementBlock as I, Fragment as P, renderList as D, mergeProps as m } from "vue";
|
|
2
2
|
import { Dropdown as N, Menu as $, MenuItem as h } from "@aplus-frontend/antdv";
|
|
3
3
|
import "../item/index.vue.mjs";
|
|
4
4
|
import "../item-modal/index.vue2.mjs";
|
|
@@ -8,8 +8,8 @@ import "../../config-provider/index.mjs";
|
|
|
8
8
|
import { isUndefined as V, omit as z } from "lodash-unified";
|
|
9
9
|
import { useNamespace as E } from "../../config-provider/hooks/use-namespace.mjs";
|
|
10
10
|
import c from "../item/index.vue2.mjs";
|
|
11
|
-
import
|
|
12
|
-
import
|
|
11
|
+
import F from "../item-modal/index.vue.mjs";
|
|
12
|
+
import M from "../item-popconfirm/index.vue.mjs";
|
|
13
13
|
const T = /* @__PURE__ */ _({
|
|
14
14
|
name: "ApActionItemDropDown",
|
|
15
15
|
__name: "index",
|
|
@@ -23,43 +23,45 @@ const T = /* @__PURE__ */ _({
|
|
|
23
23
|
disabled: { type: Boolean, default: !1 },
|
|
24
24
|
visible: { type: Boolean, default: !0 },
|
|
25
25
|
onClick: {},
|
|
26
|
-
loading: { type: Boolean, default: !1 }
|
|
26
|
+
loading: { type: Boolean, default: !1 },
|
|
27
|
+
icon: {},
|
|
28
|
+
iconFirst: { type: Boolean }
|
|
27
29
|
},
|
|
28
30
|
setup(d) {
|
|
29
|
-
const f = d,
|
|
31
|
+
const f = d, i = v(!1), { e: p } = E("action-item-dropdown"), g = k(() => f.actions.filter((e) => e.visible || V(e.visible)).map((e) => ({
|
|
30
32
|
...e,
|
|
31
33
|
onAction: async (a) => {
|
|
32
34
|
try {
|
|
33
35
|
await e.onAction?.(a);
|
|
34
36
|
} finally {
|
|
35
|
-
|
|
37
|
+
i.value = !1;
|
|
36
38
|
}
|
|
37
39
|
}
|
|
38
40
|
})));
|
|
39
|
-
return (e, a) => (
|
|
40
|
-
open:
|
|
41
|
-
"onUpdate:open": a[0] || (a[0] = (
|
|
41
|
+
return (e, a) => (r(), n(o(N), {
|
|
42
|
+
open: i.value,
|
|
43
|
+
"onUpdate:open": a[0] || (a[0] = (t) => i.value = t),
|
|
42
44
|
trigger: e.trigger,
|
|
43
45
|
placement: e.placement
|
|
44
46
|
}, {
|
|
45
47
|
overlay: l(() => [
|
|
46
48
|
u(o($), null, {
|
|
47
49
|
default: l(() => [
|
|
48
|
-
(
|
|
50
|
+
(r(!0), I(P, null, D(g.value, (t, y) => (r(), n(o(h), {
|
|
49
51
|
key: y,
|
|
50
|
-
class:
|
|
52
|
+
class: s(o(p)("item"))
|
|
51
53
|
}, {
|
|
52
54
|
default: l(() => [
|
|
53
|
-
|
|
55
|
+
t.modalProps ? (r(), n(F, m({
|
|
54
56
|
key: 0,
|
|
55
57
|
ref_for: !0
|
|
56
|
-
},
|
|
58
|
+
}, t), null, 16)) : t.popconfirmProps ? (r(), n(M, m({
|
|
57
59
|
key: 1,
|
|
58
60
|
ref_for: !0
|
|
59
|
-
},
|
|
61
|
+
}, t), null, 16)) : (r(), n(c, m({
|
|
60
62
|
key: 2,
|
|
61
63
|
ref_for: !0
|
|
62
|
-
},
|
|
64
|
+
}, t), null, 16))
|
|
63
65
|
]),
|
|
64
66
|
_: 2
|
|
65
67
|
}, 1032, ["class"]))), 128))
|
|
@@ -69,18 +71,18 @@ const T = /* @__PURE__ */ _({
|
|
|
69
71
|
]),
|
|
70
72
|
default: l(() => [
|
|
71
73
|
w("span", {
|
|
72
|
-
class:
|
|
74
|
+
class: s(o(p)("wrapper"))
|
|
73
75
|
}, [
|
|
74
|
-
u(c,
|
|
76
|
+
u(c, A(b(o(z)(f, ["actions", "trigger", "placement"]))), {
|
|
75
77
|
default: l(() => [
|
|
76
78
|
C(e.$slots, "default")
|
|
77
79
|
]),
|
|
78
80
|
_: 3
|
|
79
81
|
}, 16),
|
|
80
|
-
e.showIcon ? (
|
|
82
|
+
e.showIcon ? (r(), n(o(L), {
|
|
81
83
|
key: 0,
|
|
82
|
-
class:
|
|
83
|
-
}, null, 8, ["class"])) :
|
|
84
|
+
class: s(o(p)("icon"))
|
|
85
|
+
}, null, 8, ["class"])) : B("", !0)
|
|
84
86
|
], 2)
|
|
85
87
|
]),
|
|
86
88
|
_: 3
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { Modal as
|
|
1
|
+
import { defineComponent as i, useSlots as s, createBlock as c, openBlock as p, mergeProps as m, unref as d, createSlots as f, renderList as u, withCtx as _, renderSlot as y, normalizeProps as A, guardReactiveProps as P } from "vue";
|
|
2
|
+
import { Modal as B } from "@aplus-frontend/antdv";
|
|
3
3
|
import "../item/index.vue.mjs";
|
|
4
|
-
import { omit as
|
|
5
|
-
import
|
|
6
|
-
const z = /* @__PURE__ */
|
|
4
|
+
import { omit as k } from "lodash-unified";
|
|
5
|
+
import x from "../item/index.vue2.mjs";
|
|
6
|
+
const z = /* @__PURE__ */ i({
|
|
7
7
|
name: "ApActionItemModal",
|
|
8
8
|
__name: "index",
|
|
9
9
|
props: {
|
|
@@ -14,12 +14,14 @@ const z = /* @__PURE__ */ s({
|
|
|
14
14
|
onAction: {},
|
|
15
15
|
onClick: {},
|
|
16
16
|
loading: { type: Boolean, default: !1 },
|
|
17
|
+
icon: {},
|
|
18
|
+
iconFirst: { type: Boolean },
|
|
17
19
|
modalProps: { default: () => ({}) }
|
|
18
20
|
},
|
|
19
|
-
setup(
|
|
20
|
-
const r =
|
|
21
|
+
setup(t) {
|
|
22
|
+
const r = s(), o = t;
|
|
21
23
|
async function a(e) {
|
|
22
|
-
|
|
24
|
+
B.confirm({
|
|
23
25
|
...o.modalProps,
|
|
24
26
|
zIndex: 1060,
|
|
25
27
|
onOk: async () => {
|
|
@@ -27,11 +29,11 @@ const z = /* @__PURE__ */ s({
|
|
|
27
29
|
}
|
|
28
30
|
});
|
|
29
31
|
}
|
|
30
|
-
return (e, g) => (
|
|
31
|
-
u(r, (h,
|
|
32
|
-
name:
|
|
32
|
+
return (e, g) => (p(), c(x, m(d(k)(o, ["modalProps", "onAction"]), { onAction: a }), f({ _: 2 }, [
|
|
33
|
+
u(r, (h, n) => ({
|
|
34
|
+
name: n,
|
|
33
35
|
fn: _((l) => [
|
|
34
|
-
|
|
36
|
+
y(e.$slots, n, A(P(l || {})))
|
|
35
37
|
])
|
|
36
38
|
}))
|
|
37
39
|
]), 1040));
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { Popconfirm as
|
|
1
|
+
import { defineComponent as f, useSlots as m, createBlock as d, openBlock as u, unref as r, mergeProps as P, withCtx as t, createVNode as _, normalizeProps as i, guardReactiveProps as p, createSlots as y, renderList as B, renderSlot as C } from "vue";
|
|
2
|
+
import { Popconfirm as x } from "@aplus-frontend/antdv";
|
|
3
3
|
import "../item/index.vue.mjs";
|
|
4
|
-
import { omit as
|
|
4
|
+
import { omit as A } from "lodash-unified";
|
|
5
5
|
import b from "../item/index.vue2.mjs";
|
|
6
|
-
const I = /* @__PURE__ */
|
|
6
|
+
const I = /* @__PURE__ */ f({
|
|
7
7
|
name: "ApActionItemPopconfirm",
|
|
8
8
|
__name: "index",
|
|
9
9
|
props: {
|
|
@@ -14,24 +14,26 @@ const I = /* @__PURE__ */ m({
|
|
|
14
14
|
onAction: {},
|
|
15
15
|
onClick: {},
|
|
16
16
|
loading: { type: Boolean, default: !1 },
|
|
17
|
+
icon: {},
|
|
18
|
+
iconFirst: { type: Boolean },
|
|
17
19
|
popconfirmProps: { default: () => ({}) }
|
|
18
20
|
},
|
|
19
21
|
setup(a) {
|
|
20
|
-
const s =
|
|
22
|
+
const s = m(), o = a;
|
|
21
23
|
async function l(e) {
|
|
22
24
|
o.popconfirmProps.onConfirm?.(e), await o.onAction?.(e);
|
|
23
25
|
}
|
|
24
|
-
return (e, g) => (u(), d(
|
|
26
|
+
return (e, g) => (u(), d(r(x), P(o.popconfirmProps, {
|
|
25
27
|
disabled: !o.popconfirmProps,
|
|
26
28
|
"overlay-style": { zIndex: 1060 },
|
|
27
29
|
onConfirm: l
|
|
28
30
|
}), {
|
|
29
31
|
default: t(() => [
|
|
30
|
-
_(b, p(
|
|
31
|
-
|
|
32
|
-
name:
|
|
33
|
-
fn: t((
|
|
34
|
-
|
|
32
|
+
_(b, i(p(r(A)(o, ["popconfirmProps", "onAction"]))), y({ _: 2 }, [
|
|
33
|
+
B(s, (h, n) => ({
|
|
34
|
+
name: n,
|
|
35
|
+
fn: t((c) => [
|
|
36
|
+
C(e.$slots, n, i(p(c || {})))
|
|
35
37
|
])
|
|
36
38
|
}))
|
|
37
39
|
]), 1040)
|
package/es/src/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default: "6.
|
|
1
|
+
declare const _default: "6.37.0";
|
|
2
2
|
export default _default;
|
package/es/src/version.mjs
CHANGED
|
@@ -1,38 +1,10 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { AgGridExpose, AgGridProps, AgGridSlots } from './interface';
|
|
2
2
|
import { VNodeProps, AllowedComponentProps, ComponentCustomProps, PublicProps, ShallowUnwrapRef, VNode } from 'vue';
|
|
3
3
|
declare const _default: <RecordType>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
4
4
|
props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{} & VNodeProps & AllowedComponentProps & ComponentCustomProps, never>, never> & AgGridProps<RecordType> & Partial<{}>> & PublicProps;
|
|
5
5
|
expose(exposed: ShallowUnwrapRef<AgGridExpose>): void;
|
|
6
6
|
attrs: any;
|
|
7
|
-
slots: Readonly<
|
|
8
|
-
/**
|
|
9
|
-
* 自定义查询表单额外的区域
|
|
10
|
-
*/
|
|
11
|
-
searchFormExtra?: any;
|
|
12
|
-
/**
|
|
13
|
-
* 自定义表格上部查询表单下部分区域的渲染
|
|
14
|
-
*/
|
|
15
|
-
title?: (params: {
|
|
16
|
-
selectedRows: RecordType[];
|
|
17
|
-
selectedRowKeys: (string | number)[];
|
|
18
|
-
shownColumns: AgGridColumnType<RecordType>[];
|
|
19
|
-
clearAll: () => void;
|
|
20
|
-
}) => any;
|
|
21
|
-
}> & {
|
|
22
|
-
/**
|
|
23
|
-
* 自定义查询表单额外的区域
|
|
24
|
-
*/
|
|
25
|
-
searchFormExtra?: any;
|
|
26
|
-
/**
|
|
27
|
-
* 自定义表格上部查询表单下部分区域的渲染
|
|
28
|
-
*/
|
|
29
|
-
title?: (params: {
|
|
30
|
-
selectedRows: RecordType[];
|
|
31
|
-
selectedRowKeys: (string | number)[];
|
|
32
|
-
shownColumns: AgGridColumnType<RecordType>[];
|
|
33
|
-
clearAll: () => void;
|
|
34
|
-
}) => any;
|
|
35
|
-
};
|
|
7
|
+
slots: Readonly<AgGridSlots<RecordType>> & AgGridSlots<RecordType>;
|
|
36
8
|
emit: {};
|
|
37
9
|
}>) => VNode & {
|
|
38
10
|
__ctx?: Awaited<typeof __VLS_setup>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),Ue=require("ag-grid-vue3"),j=require("ag-grid-community"),Ge=require("./utils.js"),$=require("@aplus-frontend/antdv"),d=require("lodash-unified");require("../config-provider/index.js");const We=require("../ap-form/index.js"),Le=require("../ap-table/utils.js"),_e=require("../ap-table/hooks/use-table-paging-ng.js"),He=require("./hooks/use-row-selection.js"),je=require("./context.js"),$e=require("../ap-table/context.js"),B=require("../ap-grid/constants.js"),Je=require("@aplus-frontend/antdv/es/theme/internal"),Qe=require("./theme.js"),Xe=require("./hooks/use-columns.js"),Ye=require("./hooks/use-columns-def.js"),Ze=require("../utils/index.js"),eo=require("../utils/slot.js"),oo=require("./hooks/use-search-form.js");require("./components/empty/index.vue.js");const to=require("./hooks/use-virtual-config.js"),ro=require("./hooks/use-pinned-row.js"),no=require("./hooks/use-selection-col-def.js"),ao=require("../config-provider/hooks/use-namespace.js"),lo=require("../config-provider/hooks/use-global-config.js"),so=require("./components/empty/index.vue2.js"),uo=e.defineComponent({name:"AgGrid",__name:"index",props:{dropdownPrefixCls:{},bordered:{type:Boolean},locale:{},onChange:{},onResizeColumn:{},getPopupContainer:{},scroll:{},sortDirections:{},showSorterTooltip:{type:[Boolean,Object]},prefixCls:{},rowKey:{type:[String,Function],default:"key"},tableLayout:{},title:{},id:{},showHeader:{type:Boolean},components:{},customRow:{},customHeaderRow:{},direction:{},expandFixed:{type:[String,Boolean]},expandColumnWidth:{},expandedRowKeys:{},defaultExpandedRowKeys:{},expandedRowRender:{},expandRowByClick:{type:Boolean},expandIcon:{},onExpand:{},onExpandedRowsChange:{},defaultExpandAllRows:{type:Boolean},indentSize:{},expandIconColumnIndex:{},showExpandColumn:{type:Boolean},expandedRowClassName:{},childrenColumnName:{},rowExpandable:{},transformCellText:{},columns:{},rowSelection:{type:Boolean},card:{type:Boolean},params:{},request:{},defaultData:{},dataSource:{},onLoadingChange:{},onShownColumnsChange:{},searchForm:{type:[Boolean,Object],default:void 0},beforeSearchSubmit:{},pagination:{type:[Boolean,Object],default:void 0},searchFormWrapperStyle:{},tableWrapperStyle:{},wrapperStyle:{},tableStyle:{},manual:{type:Boolean,default:void 0},size:{default:"mini"},adaptive:{type:Boolean},columnResizable:{type:Boolean,default:!1},loading:{type:Boolean,default:void 0},summary:{},rowHeight:{},advanceRenderer:{type:Boolean},browserTooltips:{type:Boolean},virtual:{type:[Boolean,Object],default:void 0},onRowClicked:{},onScrollEnd:{},rowClassName:{},rowClassRules:{},autoHeight:{type:Boolean},onUpdate:{}},setup(J,{expose:Q}){j.ModuleRegistry.registerModules([j.AllCommunityModule]);const t=J,I=e.useSlots(),{e:R,b:i,be:X}=ao.useNamespace("ag-grid"),y=e.ref(t.size),Y=Qe.useTheme(y,e.toRef(t,"rowHeight")),Z=to.default(e.toRef(t,"virtual")),{rowPinnedGridConfig:E,getRowPinnedCellClass:ee}=ro.usePinnedRow(e.toRef(t,"summary")),oe=lo.useGlobalConfig("apGrid"),l=e.ref(),[,te]=Je.useToken();let f=!!t.dataSource;const T=oo.useSearchForm(t),{shownColumns:p,columns:D,columnKeys:re,getTargetColumnByKey:ne}=Xe.useColumns(t),{defaultColDef:ae,columnDefs:le,gridWrapperRef:se}=Ye.useColumnsDef(D,t,ee),b=e.ref({});je.useProvideSorter({sorter:b,setSorter(o){b.value=o}});const ue={asc:"ascend",desc:"descend"};function ie(){const o=l.value.getColumns()?.filter(c=>c.getSort()!==void 0),r=e.unref(b)||{};let n=o?.[0];const u=Object.keys(r);if(u.length&&u.every(c=>r[c]===null)){const c=Object.keys(r)[0];c&&(n=l.value?.getColumn(c))}if(!n)return;const s=n.getColDef(),S=n.getSort(),h=ne(s.colId);V(void 0,void 0,{column:s,field:h?.field??s.field??s.colId,order:S?ue[S]:null})}const ce=e.computed(()=>Le.recursionApColumns(e.unref(p),o=>{if(o.sorter===!0)return o.field??o.dataIndex??o.key}).filter(Boolean)),de=()=>{b.value={};const o=l.value;if(!o)return;const r=o.getColumnState()?.map(n=>({...n,sort:null}));o.applyColumnState({state:r})},fe=e.computed(()=>Ze.isDef(t.manual)?t.manual:eo.getValidVNodeList(I.searchFormExtra?.()||[]).some(r=>r.type?.name==="ApView")),{formRef:m,submit:k,reset:F,data:g,tableProps:z,handleTableChangeOptional:V,submitWith:P,refresh:K,getPaging:pe,setPaging:me,setDataSource:ge}=_e.useTablePaging({async request(o){if(f=!1,w.value&&!w.value.preserveSelectedRowKeys&&d.isUndefined(t.dataSource)&&q(),!d.isUndefined(t.dataSource)){const n=o.pageSize*(o.current-1);return{data:(t.pagination===!1?t.dataSource:t.dataSource.slice(n,n+o.pageSize))||[],total:t.dataSource.length||0}}const r=await t.request?.(o);return{data:r?.data||[],total:r?.total||0}},namespace:"ap-grid",filterFields:e.ref([]),params:e.toRef(t,"params"),defaultData:t.defaultData,manual:e.unref(fe),formatParams:t.beforeSearchSubmit,pagination:t.pagination,sortFields:ce,onClickReset:de}),w=e.computed(()=>{const o=t.rowSelection||oe.value?.rowSelection;if(o)return o===!0?B.DEFAULT_ROW_SELECTION_CONFIG:{...B.DEFAULT_ROW_SELECTION_CONFIG,...o}}),we=no.default(t,p),Se=e.computed(()=>d.isUndefined(t.dataSource)?g.records:t.dataSource),{select:ye,unSelect:Ce,selectedRows:x,selectedRowKeys:he,clearAll:ve,selectMultiByKeys:Re}=He.default({...w,dataSource:Se,rowKey:t.rowKey}),be={checkbox:"multiRow",radio:"singleRow"},Be=e.computed(()=>{const o=w.value;if(!o)return;const{type:r="checkbox",disabled:n}=o;return{mode:be[r],isRowSelectable:u=>n?!n(u.data):!0,hideDisabledCheckboxes:o.hideDisabled??!1}});function N(o){return d.isFunction(t.rowKey)?t.rowKey(o):o[t.rowKey]}const A=({api:o=l.value})=>{if(t.onUpdate?.(),!w.value)return;const r=x.value;if(!r.length){setTimeout(()=>{f=!0},0);return}f=!1;const n=[];o.forEachNode(u=>{const C=u.data,s=N(C);r.find(S=>N(S)===s)&&n.push(u)}),o.setNodesSelected({nodes:n,newValue:!0}),setTimeout(()=>{f=!0},0)},ke=o=>{f&&(o.node.isSelected()?ye(o.data):Ce(o.data),d.isFunction(w.value?.tooltip)&&o.api.refreshCells({rowNodes:[o.node],columns:["ag-Grid-SelectionColumn"],force:!0}))},Fe=()=>{f=!0},q=()=>{ve(),l.value?.deselectAll()};function xe(o){Re(o),e.nextTick(()=>{A({})})}function O(o=!1){const r=o?"getFieldsValueTransformed":"getFieldsValue";return m.value?.apForm?.[r]?.(!0)}function M(o){m.value?.apForm?.setFieldsValue?.(o)}function U(){return m.value?.getSorterItems()||[]}function G(o){m.value?.setSorterItems(o)}function W(){m.value?.resetSorterItems()}function L(o){return o&&String(o)}function Ne(o){const r=l.value;if(!r)return;const n=r.getColumnState()||[],u=o.map(a=>a.key?String(a.key):a.key).filter(Boolean),C=n.map(a=>{if(!re.value.includes(a.colId))return a;const v=!u.includes(a.colId),_={...a,hide:v},H=o.find(Me=>L(Me.key)===a.colId);return H&&(_.pinned=H.fixed||null),_}),s=new Map(o.map((a,v)=>[L(a.key),v])),S=C.filter(a=>s.has(a.colId)).sort((a,v)=>s.get(a.colId)-s.get(v.colId)),h=[];let c=0;for(const a of C)s.has(a.colId)?h.push(S[c++]):h.push(a);r.applyColumnState({state:h,applyOrder:!0})}$e.useProvideApTable({columns:e.computed(()=>p.value),columnsBackup:e.computed(()=>D.value),size:e.computed(()=>B.sizeMap[y.value]),updateColumns(o){p.value=o,t.onShownColumnsChange?.(o),Ne(o)},updateSize(o){y.value=B.sizeReverseMap[o]},renderConfig:e.computed(()=>({className:X("table-header","title"),color:te.value.colorTextTertiary})),dataSource:e.computed(()=>e.unref(g).records),getSearchFormValues:O,setSearchFormValues:M,submit:k,submitWith:P,reset:F,refresh:K,getSearchFormSorterItems:U,setSearchFormSorterItems:G,resetSearchFormSorterItems:W});const qe=e.computed(()=>d.isUndefined(t.loading)?g.loading:t.loading),Ie=e.computed(()=>[i(),t.card?null:i("wrapper"),i("adaptive"),i(`size-${y.value}`)].filter(Boolean)),Ee=e.computed(()=>({height:"100%",...t.tableStyle||{}})),Te=(o,r)=>{V({current:o,pageSize:r})};function De(o){const r=o.data;return N(r)}function ze(o,r){l.value?.ensureIndexVisible(o,r)}function Ve(o){t.onRowClicked?.(o.data,o.event)}function Pe(o){t.onScrollEnd?.(o.direction)}function Ke(o){return l.value?.refreshCells(o)}function Ae(o){return l.value?.redrawRows(o)}const Oe=o=>{const r=[E.value.getRowClass?.(o)];if(!o.node.rowPinned){const n=d.isFunction(t.rowClassName)?t.rowClassName(o.data,o.rowIndex):t.rowClassName;r.push(n)}return r.flat().filter(Boolean)};return e.watch(()=>t.dataSource,o=>{ge(o)},{immediate:!0,deep:!0}),e.watch(()=>t.size,o=>{y.value=o}),e.watch(()=>e.unref(g).loading,o=>{t.onLoadingChange?.(o)}),Q({submit:k,reset:F,refresh:K,submitWith:P,setSearchFormValues:M,getSearchFormValues:O,getShowColumns:()=>e.unref(p),rowSelection:{selectedRows:e.computed(()=>x.value),setSelectedRowKeys:xe,clearAll:q},scrollToRow:ze,getDataSource:()=>e.unref(g.records),getPaging:pe,setPaging:me,getSearchFormSorterItems:U,setSearchFormSorterItems:G,resetSearchFormSorterItems:W,refreshCells:Ke,redrawRows:Ae,_internalGridApi:e.computed(()=>l.value)}),(o,r)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(Ie.value),style:e.normalizeStyle(o.wrapperStyle)},[e.unref(d.isUndefined)(o.dataSource)&&o.searchForm!==!1&&e.unref(T).length>0?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(o.card?e.unref(R)("search-wrapper"):null),style:e.normalizeStyle(o.searchFormWrapperStyle)},[e.createVNode(e.unref(We.ApForm).SearchForm,e.mergeProps(o.searchForm||{},{ref_key:"formRef",ref:m,"custom-reset":"","submit-loading":e.unref(z).loading,onSubmit:e.unref(k),onReset:e.unref(F)}),e.createSlots({default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(T),n=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(n.renderNode),{key:n.dataIndex}))),128))]),_:2},[I.searchFormExtra?{name:"extra",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"searchFormExtra")]),key:"0"}:void 0]),1040,["submit-loading","onSubmit","onReset"])],6)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass([e.unref(R)("table-wrapper"),o.card?e.unref(R)("table-wrapper-card"):null]),style:e.normalizeStyle(o.tableWrapperStyle)},[e.createElementVNode("div",{class:e.normalizeClass(e.unref(i)("header-wrapper"))},[e.renderSlot(o.$slots,"title",{selectedRows:e.unref(x),selectedRowKeys:e.unref(he),shownColumns:e.unref(p),clearAll:q})],2),e.createElementVNode("div",{ref_key:"gridWrapperRef",ref:se,class:e.normalizeClass(e.unref(i)("grid-wrapper"))},[e.createVNode(e.unref(Ue.AgGridVue),e.mergeProps(e.unref(Ge.mergeProps)(e.unref(Z),e.unref(E)),{"get-row-class":Oe,style:Ee.value,"row-data":e.unref(g).records,"column-defs":e.unref(le),"default-col-def":e.unref(ae),"suppress-loading-overlay":"","row-selection":Be.value,"selection-column-def":e.unref(we),"get-row-id":De,theme:e.unref(Y),"tooltip-show-delay":500,"enable-browser-tooltips":o.browserTooltips,"tooltip-interaction":"","row-class-rules":o.rowClassRules,"no-rows-overlay-component":so.default,"suppress-cell-focus":"","dom-layout":o.autoHeight?"autoHeight":"normal",onSortChanged:ie,onGridReady:r[0]||(r[0]=n=>l.value=n.api),onRowDataUpdated:A,onRowSelected:ke,onFirstDataRendered:Fe,onRowClicked:Ve,onBodyScrollEnd:Pe}),null,16,["style","row-data","column-defs","default-col-def","row-selection","selection-column-def","theme","enable-browser-tooltips","row-class-rules","dom-layout"]),e.withDirectives(e.createElementVNode("div",{class:e.normalizeClass(e.unref(R)("table-loading-wrapper"))},[e.createVNode(e.unref($.Spin),{delay:300})],2),[[e.vShow,qe.value]])],2),e.createElementVNode("div",{class:e.normalizeClass(e.unref(i)("pagination-wrapper"))},[o.pagination!==!1?(e.openBlock(),e.createBlock(e.unref($.Pagination),e.mergeProps({key:0,class:e.unref(i)("pagination")},e.unref(z).pagination,{onChange:Te}),null,16,["class"])):e.createCommentVNode("",!0)],2)],6)],6))}});exports.default=uo;
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),Ue=require("ag-grid-vue3"),j=require("ag-grid-community"),Ge=require("./utils.js"),$=require("@aplus-frontend/antdv"),d=require("lodash-unified");require("../config-provider/index.js");const We=require("../ap-form/index.js"),Le=require("../ap-table/utils.js"),_e=require("../ap-table/hooks/use-table-paging-ng.js"),He=require("./hooks/use-row-selection.js"),je=require("./context.js"),$e=require("../ap-table/context.js"),B=require("../ap-grid/constants.js"),Je=require("@aplus-frontend/antdv/es/theme/internal"),Qe=require("./theme.js"),Xe=require("./hooks/use-columns.js"),Ye=require("./hooks/use-columns-def.js"),Ze=require("../utils/index.js"),eo=require("../utils/slot.js"),oo=require("./hooks/use-search-form.js");require("./components/empty/index.vue.js");const to=require("./hooks/use-virtual-config.js"),ro=require("./hooks/use-pinned-row.js"),no=require("./hooks/use-selection-col-def.js"),ao=require("../config-provider/hooks/use-namespace.js"),lo=require("../config-provider/hooks/use-global-config.js"),so=require("./components/empty/index.vue2.js"),uo=e.defineComponent({name:"AgGrid",__name:"index",props:{dropdownPrefixCls:{},bordered:{type:Boolean},locale:{},onChange:{},onResizeColumn:{},getPopupContainer:{},scroll:{},sortDirections:{},showSorterTooltip:{type:[Boolean,Object]},prefixCls:{},rowKey:{type:[String,Function],default:"key"},tableLayout:{},title:{},id:{},showHeader:{type:Boolean},components:{},customRow:{},customHeaderRow:{},direction:{},expandFixed:{type:[String,Boolean]},expandColumnWidth:{},expandedRowKeys:{},defaultExpandedRowKeys:{},expandedRowRender:{},expandRowByClick:{type:Boolean},expandIcon:{},onExpand:{},onExpandedRowsChange:{},defaultExpandAllRows:{type:Boolean},indentSize:{},expandIconColumnIndex:{},showExpandColumn:{type:Boolean},expandedRowClassName:{},childrenColumnName:{},rowExpandable:{},transformCellText:{},columns:{},rowSelection:{type:Boolean},card:{type:Boolean},params:{},request:{},defaultData:{},dataSource:{},onLoadingChange:{},onShownColumnsChange:{},searchForm:{type:[Boolean,Object],default:void 0},beforeSearchSubmit:{},pagination:{type:[Boolean,Object],default:void 0},searchFormWrapperStyle:{},tableWrapperStyle:{},wrapperStyle:{},tableStyle:{},manual:{type:Boolean,default:void 0},size:{default:"mini"},adaptive:{type:Boolean},columnResizable:{type:Boolean,default:!1},loading:{type:Boolean,default:void 0},summary:{},rowHeight:{},advanceRenderer:{type:Boolean},browserTooltips:{type:Boolean},virtual:{type:[Boolean,Object],default:void 0},onRowClicked:{},onScrollEnd:{},rowClassName:{},rowClassRules:{},autoHeight:{type:Boolean},onUpdate:{}},setup(J,{expose:Q}){j.ModuleRegistry.registerModules([j.AllCommunityModule]);const t=J,I=e.useSlots(),{e:R,b:i,be:X}=ao.useNamespace("ag-grid"),y=e.ref(t.size),Y=Qe.useTheme(y,e.toRef(t,"rowHeight")),Z=to.default(e.toRef(t,"virtual")),{rowPinnedGridConfig:E,getRowPinnedCellClass:ee}=ro.usePinnedRow(e.toRef(t,"summary")),oe=lo.useGlobalConfig("apGrid"),l=e.ref(),[,te]=Je.useToken();let f=!!t.dataSource;const T=oo.useSearchForm(t),{shownColumns:p,columns:D,columnKeys:re,getTargetColumnByKey:ne}=Xe.useColumns(t),{defaultColDef:ae,columnDefs:le,gridWrapperRef:se}=Ye.useColumnsDef(D,t,ee),b=e.ref({});je.useProvideSorter({sorter:b,setSorter(o){b.value=o}});const ue={asc:"ascend",desc:"descend"};function ie(){const o=l.value.getColumns()?.filter(c=>c.getSort()!==void 0),r=e.unref(b)||{};let n=o?.[0];const u=Object.keys(r);if(u.length&&u.every(c=>r[c]===null)){const c=Object.keys(r)[0];c&&(n=l.value?.getColumn(c))}if(!n)return;const s=n.getColDef(),S=n.getSort(),h=ne(s.colId);V(void 0,void 0,{column:s,field:h?.field??s.field??s.colId,order:S?ue[S]:null})}const ce=e.computed(()=>Le.recursionApColumns(e.unref(p),o=>{if(o.sorter===!0)return o.field??o.dataIndex??o.key}).filter(Boolean)),de=()=>{b.value={};const o=l.value;if(!o)return;const r=o.getColumnState()?.map(n=>({...n,sort:null}));o.applyColumnState({state:r})},fe=e.computed(()=>Ze.isDef(t.manual)?t.manual:eo.getValidVNodeList(I.searchFormExtra?.()||[]).some(r=>r.type?.name==="ApView")),{formRef:m,submit:k,reset:F,data:g,tableProps:z,handleTableChangeOptional:V,submitWith:P,refresh:K,getPaging:pe,setPaging:me,setDataSource:ge}=_e.useTablePaging({async request(o){if(f=!1,w.value&&!w.value.preserveSelectedRowKeys&&d.isUndefined(t.dataSource)&&q(),!d.isUndefined(t.dataSource)){const n=o.pageSize*(o.current-1);return{data:(t.pagination===!1?t.dataSource:t.dataSource.slice(n,n+o.pageSize))||[],total:t.dataSource.length||0}}const r=await t.request?.(o);return{data:r?.data||[],total:r?.total||0}},namespace:"ap-grid",filterFields:e.ref([]),params:e.toRef(t,"params"),defaultData:t.defaultData,manual:e.unref(fe),formatParams:t.beforeSearchSubmit,pagination:t.pagination,sortFields:ce,onClickReset:de}),w=e.computed(()=>{const o=t.rowSelection||oe.value?.rowSelection;if(o)return o===!0?B.DEFAULT_ROW_SELECTION_CONFIG:{...B.DEFAULT_ROW_SELECTION_CONFIG,...o}}),we=no.default(t,p),Se=e.computed(()=>d.isUndefined(t.dataSource)?g.records:t.dataSource),{select:ye,unSelect:Ce,selectedRows:x,selectedRowKeys:he,clearAll:ve,selectMultiByKeys:Re}=He.default({...w.value,dataSource:Se,rowKey:t.rowKey}),be={checkbox:"multiRow",radio:"singleRow"},Be=e.computed(()=>{const o=w.value;if(!o)return;const{type:r="checkbox",disabled:n}=o;return{mode:be[r],isRowSelectable:u=>n?!n(u.data):!0,hideDisabledCheckboxes:o.hideDisabled??!1}});function N(o){return d.isFunction(t.rowKey)?t.rowKey(o):o[t.rowKey]}const A=({api:o=l.value})=>{if(t.onUpdate?.(),!w.value)return;const r=x.value;if(!r.length){setTimeout(()=>{f=!0},0);return}f=!1;const n=[];o.forEachNode(u=>{const C=u.data,s=N(C);r.find(S=>N(S)===s)&&n.push(u)}),o.setNodesSelected({nodes:n,newValue:!0}),setTimeout(()=>{f=!0},0)},ke=o=>{f&&(o.node.isSelected()?ye(o.data):Ce(o.data),d.isFunction(w.value?.tooltip)&&o.api.refreshCells({rowNodes:[o.node],columns:["ag-Grid-SelectionColumn"],force:!0}))},Fe=()=>{f=!0},q=()=>{ve(),l.value?.deselectAll()};function xe(o){Re(o),e.nextTick(()=>{A({})})}function O(o=!1){const r=o?"getFieldsValueTransformed":"getFieldsValue";return m.value?.apForm?.[r]?.(!0)}function M(o){m.value?.apForm?.setFieldsValue?.(o)}function U(){return m.value?.getSorterItems()||[]}function G(o){m.value?.setSorterItems(o)}function W(){m.value?.resetSorterItems()}function L(o){return o&&String(o)}function Ne(o){const r=l.value;if(!r)return;const n=r.getColumnState()||[],u=o.map(a=>a.key?String(a.key):a.key).filter(Boolean),C=n.map(a=>{if(!re.value.includes(a.colId))return a;const v=!u.includes(a.colId),_={...a,hide:v},H=o.find(Me=>L(Me.key)===a.colId);return H&&(_.pinned=H.fixed||null),_}),s=new Map(o.map((a,v)=>[L(a.key),v])),S=C.filter(a=>s.has(a.colId)).sort((a,v)=>s.get(a.colId)-s.get(v.colId)),h=[];let c=0;for(const a of C)s.has(a.colId)?h.push(S[c++]):h.push(a);r.applyColumnState({state:h,applyOrder:!0})}$e.useProvideApTable({columns:e.computed(()=>p.value),columnsBackup:e.computed(()=>D.value),size:e.computed(()=>B.sizeMap[y.value]),updateColumns(o){p.value=o,t.onShownColumnsChange?.(o),Ne(o)},updateSize(o){y.value=B.sizeReverseMap[o]},renderConfig:e.computed(()=>({className:X("table-header","title"),color:te.value.colorTextTertiary})),dataSource:e.computed(()=>e.unref(g).records),getSearchFormValues:O,setSearchFormValues:M,submit:k,submitWith:P,reset:F,refresh:K,getSearchFormSorterItems:U,setSearchFormSorterItems:G,resetSearchFormSorterItems:W});const qe=e.computed(()=>d.isUndefined(t.loading)?g.loading:t.loading),Ie=e.computed(()=>[i(),t.card?null:i("wrapper"),i("adaptive"),i(`size-${y.value}`)].filter(Boolean)),Ee=e.computed(()=>({height:"100%",...t.tableStyle||{}})),Te=(o,r)=>{V({current:o,pageSize:r})};function De(o){const r=o.data;return N(r)}function ze(o,r){l.value?.ensureIndexVisible(o,r)}function Ve(o){t.onRowClicked?.(o.data,o.event)}function Pe(o){t.onScrollEnd?.(o.direction)}function Ke(o){return l.value?.refreshCells(o)}function Ae(o){return l.value?.redrawRows(o)}const Oe=o=>{const r=[E.value.getRowClass?.(o)];if(!o.node.rowPinned){const n=d.isFunction(t.rowClassName)?t.rowClassName(o.data,o.rowIndex):t.rowClassName;r.push(n)}return r.flat().filter(Boolean)};return e.watch(()=>t.dataSource,o=>{ge(o)},{immediate:!0,deep:!0}),e.watch(()=>t.size,o=>{y.value=o}),e.watch(()=>e.unref(g).loading,o=>{t.onLoadingChange?.(o)}),Q({submit:k,reset:F,refresh:K,submitWith:P,setSearchFormValues:M,getSearchFormValues:O,getShowColumns:()=>e.unref(p),rowSelection:{selectedRows:e.computed(()=>x.value),setSelectedRowKeys:xe,clearAll:q},scrollToRow:ze,getDataSource:()=>e.unref(g.records),getPaging:pe,setPaging:me,getSearchFormSorterItems:U,setSearchFormSorterItems:G,resetSearchFormSorterItems:W,refreshCells:Ke,redrawRows:Ae,_internalGridApi:e.computed(()=>l.value)}),(o,r)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(Ie.value),style:e.normalizeStyle(o.wrapperStyle)},[e.unref(d.isUndefined)(o.dataSource)&&o.searchForm!==!1&&e.unref(T).length>0?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(o.card?e.unref(R)("search-wrapper"):null),style:e.normalizeStyle(o.searchFormWrapperStyle)},[e.createVNode(e.unref(We.ApForm).SearchForm,e.mergeProps(o.searchForm||{},{ref_key:"formRef",ref:m,"custom-reset":"","submit-loading":e.unref(z).loading,onSubmit:e.unref(k),onReset:e.unref(F)}),e.createSlots({default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(T),n=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(n.renderNode),{key:n.dataIndex}))),128))]),_:2},[I.searchFormExtra?{name:"extra",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"searchFormExtra")]),key:"0"}:void 0]),1040,["submit-loading","onSubmit","onReset"])],6)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass([e.unref(R)("table-wrapper"),o.card?e.unref(R)("table-wrapper-card"):null]),style:e.normalizeStyle(o.tableWrapperStyle)},[e.createElementVNode("div",{class:e.normalizeClass(e.unref(i)("header-wrapper"))},[e.renderSlot(o.$slots,"title",{selectedRows:e.unref(x),selectedRowKeys:e.unref(he),shownColumns:e.unref(p),clearAll:q})],2),e.createElementVNode("div",{ref_key:"gridWrapperRef",ref:se,class:e.normalizeClass(e.unref(i)("grid-wrapper"))},[e.createVNode(e.unref(Ue.AgGridVue),e.mergeProps(e.unref(Ge.mergeProps)(e.unref(Z),e.unref(E)),{"get-row-class":Oe,style:Ee.value,"row-data":e.unref(g).records,"column-defs":e.unref(le),"default-col-def":e.unref(ae),"suppress-loading-overlay":"","row-selection":Be.value,"selection-column-def":e.unref(we),"get-row-id":De,theme:e.unref(Y),"tooltip-show-delay":500,"enable-browser-tooltips":o.browserTooltips,"tooltip-interaction":"","row-class-rules":o.rowClassRules,"no-rows-overlay-component":so.default,"suppress-cell-focus":"","dom-layout":o.autoHeight?"autoHeight":"normal",onSortChanged:ie,onGridReady:r[0]||(r[0]=n=>l.value=n.api),onRowDataUpdated:A,onRowSelected:ke,onFirstDataRendered:Fe,onRowClicked:Ve,onBodyScrollEnd:Pe}),null,16,["style","row-data","column-defs","default-col-def","row-selection","selection-column-def","theme","enable-browser-tooltips","row-class-rules","dom-layout"]),e.withDirectives(e.createElementVNode("div",{class:e.normalizeClass(e.unref(R)("table-loading-wrapper"))},[e.createVNode(e.unref($.Spin),{delay:300})],2),[[e.vShow,qe.value]])],2),e.createElementVNode("div",{class:e.normalizeClass(e.unref(i)("pagination-wrapper"))},[o.pagination!==!1?(e.openBlock(),e.createBlock(e.unref($.Pagination),e.mergeProps({key:0,class:e.unref(i)("pagination")},e.unref(z).pagination,{onChange:Te}),null,16,["class"])):e.createCommentVNode("",!0)],2)],6)],6))}});exports.default=uo;
|
|
@@ -392,3 +392,18 @@ export type AgGridExpose<SearchParamsType = Recordable, RecordType = any> = {
|
|
|
392
392
|
*/
|
|
393
393
|
_internalGridApi?: GridApi | undefined;
|
|
394
394
|
};
|
|
395
|
+
export type AgGridSlots<RecordType> = {
|
|
396
|
+
/**
|
|
397
|
+
* 自定义查询表单额外的区域
|
|
398
|
+
*/
|
|
399
|
+
searchFormExtra?: any;
|
|
400
|
+
/**
|
|
401
|
+
* 自定义表格上部查询表单下部分区域的渲染
|
|
402
|
+
*/
|
|
403
|
+
title?: (params: {
|
|
404
|
+
selectedRows: RecordType[];
|
|
405
|
+
selectedRowKeys: (string | number)[];
|
|
406
|
+
shownColumns: AgGridColumnType<RecordType>[];
|
|
407
|
+
clearAll: () => void;
|
|
408
|
+
}) => any;
|
|
409
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),_=require("@aplus-frontend/antdv");require("../item/index.vue.js");require("../item-modal/index.vue2.js");require("../item-popconfirm/index.vue2.js");require("../item-dropdown/index.vue2.js");require("../../config-provider/index.js");const f=require("lodash-unified"),d=require("../../config-provider/hooks/use-locale.js"),l=require("../item-dropdown/index.vue.js"),g=require("../item-modal/index.vue.js"),m=require("../item-popconfirm/index.vue.js"),k=require("../item/index.vue2.js"),v=e.defineComponent({name:"ApActionGroup",__name:"index",props:{count:{default:3},trigger:{default:()=>["hover"]},placement:{default:"bottomRight"},actions:{default:()=>[]},iconFirst:{type:Boolean}},setup(s){const o=s,{t:i}=d.useLocale(),u=e.computed(()=>o.actions.filter(t=>t.visible||f.isUndefined(t.visible))),a=e.computed(()=>e.unref(u).length>o.count),c=e.computed(()=>{const t=e.unref(u);if(t.length<=o.count)return{showActions:t,menuActions:[]};let n=t.slice(0,o.count-1);return o.iconFirst&&(n=n.map(r=>({...r,iconFirst:!0}))),{showActions:n,menuActions:t.slice(o.count-1)}});return(t,n)=>(e.openBlock(),e.createBlock(e.unref(_.Space),{size:16,align:"center"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value.showActions,(r,p)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:p},[r.actions?(e.openBlock(),e.createBlock(l.default,e.mergeProps({key:0,ref_for:!0},r),null,16)):r.modalProps?(e.openBlock(),e.createBlock(g.default,e.mergeProps({key:1,ref_for:!0},r),null,16)):r.popconfirmProps?(e.openBlock(),e.createBlock(m.default,e.mergeProps({key:2,ref_for:!0},r),null,16)):(e.openBlock(),e.createBlock(k.default,e.mergeProps({key:3,ref_for:!0},r),null,16))],64))),128)),a.value?(e.openBlock(),e.createBlock(l.default,{key:0,actions:c.value.menuActions,placement:t.placement,trigger:t.trigger,text:e.unref(i)("ap.common.more")},null,8,["actions","placement","trigger","text"])):e.createCommentVNode("",!0)]),_:1}))}});exports.default=v;
|
|
@@ -34,6 +34,15 @@ export type ApActionItemProps = {
|
|
|
34
34
|
* 是否显示loading效果
|
|
35
35
|
*/
|
|
36
36
|
loading?: boolean;
|
|
37
|
+
/**
|
|
38
|
+
* 配置左侧显示的图标
|
|
39
|
+
* @since 6.37.0
|
|
40
|
+
*/
|
|
41
|
+
icon?: any;
|
|
42
|
+
/**
|
|
43
|
+
* 是否优先显示图标
|
|
44
|
+
*/
|
|
45
|
+
iconFirst?: boolean;
|
|
37
46
|
};
|
|
38
47
|
export type MixedActionTypes = ApActionItemProps | ApActionItemModalProps | ApActionItemPopconfirmProps;
|
|
39
48
|
export type GroupActionTypes = MixedActionTypes | ApActionItemDropdownProps;
|
|
@@ -69,6 +78,10 @@ export type ApActionGroupProps = {
|
|
|
69
78
|
* 菜单项配置
|
|
70
79
|
*/
|
|
71
80
|
actions?: GroupActionTypes[];
|
|
81
|
+
/**
|
|
82
|
+
* 对于平铺Action,优先显示图标
|
|
83
|
+
*/
|
|
84
|
+
iconFirst?: boolean;
|
|
72
85
|
};
|
|
73
86
|
export type ApActionItemModalProps = ApActionItemProps & {
|
|
74
87
|
/**
|
|
@@ -89,4 +102,8 @@ export type ApActionItemSlots = {
|
|
|
89
102
|
disabled: boolean;
|
|
90
103
|
onClick: (e: MouseEvent) => void;
|
|
91
104
|
}) => any;
|
|
105
|
+
/**
|
|
106
|
+
* 自定义左侧图标
|
|
107
|
+
*/
|
|
108
|
+
icon?: any;
|
|
92
109
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");require("../../config-provider/index.js");const
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");require("../../config-provider/index.js");const f=require("@aplus-frontend/antdv/es/button/LoadingIcon"),k=require("../../config-provider/hooks/use-namespace.js"),p={key:1},y=e.defineComponent({name:"ApActionItem",__name:"index",props:{text:{},color:{default:"primary"},disabled:{type:Boolean,default:!1},visible:{type:Boolean,default:!0},onAction:{type:Function},onClick:{type:Function},loading:{type:Boolean,default:!1},icon:{},iconFirst:{type:Boolean,default:!1}},setup(n){const a=e.useSlots(),i=e.createPropsRestProxy(n,["color","disabled","visible","loading","iconFirst","icon"]),{b:u,m:t,e:d}=k.useNamespace("action-item"),c=e.ref(!1),r=e.computed(()=>n.iconFirst&&(n.icon||a.icon));function s(o){e.unref(l)||n.disabled||(i.onClick?.(o),i.onAction&&(c.value=!0,i.onAction(o).finally(()=>c.value=!1)))}const l=e.computed(()=>n.loading||e.unref(c)),m=e.computed(()=>[u(),t(n.color),r.value?t("icon-first"):null,n.disabled?t("disabled"):null,l.value?t("loading"):null].filter(Boolean));return(o,g)=>e.renderSlot(o.$slots,"trigger",{loading:l.value,disabled:o.disabled,onClick:s},()=>[o.visible?(e.openBlock(),e.createElementBlock("span",e.mergeProps({key:0},o.$attrs,{class:m.value,onClick:s}),[l.value?(e.openBlock(),e.createBlock(e.unref(f),{key:0,"prefix-cls":"btn","exist-icon":!1,loading:""})):e.createCommentVNode("",!0),o.icon||a.icon?(e.openBlock(),e.createElementBlock("span",{key:1,class:e.normalizeClass(e.unref(d)("icon-wrapper"))},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(o.icon||a.icon)))],2)):e.createCommentVNode("",!0),r.value?e.createCommentVNode("",!0):e.renderSlot(o.$slots,"default",{key:2},()=>[e.isVNode(o.text)?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(o.text),{key:0})):(e.openBlock(),e.createElementBlock("span",p,e.toDisplayString(o.text||""),1))])],16)):e.createCommentVNode("",!0)])}});exports.default=y;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),a=require("@aplus-frontend/antdv");require("../item/index.vue.js");require("../item-modal/index.vue2.js");require("../item-popconfirm/index.vue2.js");const f=require("@aplus-frontend/icon");require("../../config-provider/index.js");const s=require("lodash-unified"),m=require("../../config-provider/hooks/use-namespace.js"),i=require("../item/index.vue2.js"),_=require("../item-modal/index.vue.js"),g=require("../item-popconfirm/index.vue.js"),k=e.defineComponent({name:"ApActionItemDropDown",__name:"index",props:{trigger:{default:()=>["hover"]},placement:{default:"bottomLeft"},actions:{default:()=>[]},showIcon:{type:Boolean,default:!0},text:{},color:{default:"primary"},disabled:{type:Boolean,default:!1},visible:{type:Boolean,default:!0},onClick:{},loading:{type:Boolean,default:!1}},setup(c){const u=c,n=e.ref(!1),{e:l}=m.useNamespace("action-item-dropdown"),p=e.computed(()=>u.actions.filter(
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),a=require("@aplus-frontend/antdv");require("../item/index.vue.js");require("../item-modal/index.vue2.js");require("../item-popconfirm/index.vue2.js");const f=require("@aplus-frontend/icon");require("../../config-provider/index.js");const s=require("lodash-unified"),m=require("../../config-provider/hooks/use-namespace.js"),i=require("../item/index.vue2.js"),_=require("../item-modal/index.vue.js"),g=require("../item-popconfirm/index.vue.js"),k=e.defineComponent({name:"ApActionItemDropDown",__name:"index",props:{trigger:{default:()=>["hover"]},placement:{default:"bottomLeft"},actions:{default:()=>[]},showIcon:{type:Boolean,default:!0},text:{},color:{default:"primary"},disabled:{type:Boolean,default:!1},visible:{type:Boolean,default:!0},onClick:{},loading:{type:Boolean,default:!1},icon:{},iconFirst:{type:Boolean}},setup(c){const u=c,n=e.ref(!1),{e:l}=m.useNamespace("action-item-dropdown"),p=e.computed(()=>u.actions.filter(t=>t.visible||s.isUndefined(t.visible)).map(t=>({...t,onAction:async o=>{try{await t.onAction?.(o)}finally{n.value=!1}}})));return(t,o)=>(e.openBlock(),e.createBlock(e.unref(a.Dropdown),{open:n.value,"onUpdate:open":o[0]||(o[0]=r=>n.value=r),trigger:t.trigger,placement:t.placement},{overlay:e.withCtx(()=>[e.createVNode(e.unref(a.Menu),null,{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(p.value,(r,d)=>(e.openBlock(),e.createBlock(e.unref(a.MenuItem),{key:d,class:e.normalizeClass(e.unref(l)("item"))},{default:e.withCtx(()=>[r.modalProps?(e.openBlock(),e.createBlock(_.default,e.mergeProps({key:0,ref_for:!0},r),null,16)):r.popconfirmProps?(e.openBlock(),e.createBlock(g.default,e.mergeProps({key:1,ref_for:!0},r),null,16)):(e.openBlock(),e.createBlock(i.default,e.mergeProps({key:2,ref_for:!0},r),null,16))]),_:2},1032,["class"]))),128))]),_:1})]),default:e.withCtx(()=>[e.createElementVNode("span",{class:e.normalizeClass(e.unref(l)("wrapper"))},[e.createVNode(i.default,e.normalizeProps(e.guardReactiveProps(e.unref(s.omit)(u,["actions","trigger","placement"]))),{default:e.withCtx(()=>[e.renderSlot(t.$slots,"default")]),_:3},16),t.showIcon?(e.openBlock(),e.createBlock(e.unref(f.IconApAdLineDown),{key:0,class:e.normalizeClass(e.unref(l)("icon"))},null,8,["class"])):e.createCommentVNode("",!0)],2)]),_:3},8,["open","trigger","placement"]))}});exports.default=k;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),i=require("@aplus-frontend/antdv");require("../item/index.vue.js");const
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),i=require("@aplus-frontend/antdv");require("../item/index.vue.js");const c=require("lodash-unified"),u=require("../item/index.vue2.js"),d=e.defineComponent({name:"ApActionItemModal",__name:"index",props:{text:{},color:{default:"primary"},disabled:{type:Boolean,default:!1},visible:{type:Boolean,default:!0},onAction:{},onClick:{},loading:{type:Boolean,default:!1},icon:{},iconFirst:{type:Boolean},modalProps:{default:()=>({})}},setup(r){const a=e.useSlots(),o=r;async function l(t){i.Modal.confirm({...o.modalProps,zIndex:1060,onOk:async()=>{o.modalProps.onOk?.(),await o.onAction?.(t)}})}return(t,p)=>(e.openBlock(),e.createBlock(u.default,e.mergeProps(e.unref(c.omit)(o,["modalProps","onAction"]),{onAction:l}),e.createSlots({_:2},[e.renderList(a,(f,n)=>({name:n,fn:e.withCtx(s=>[e.renderSlot(t.$slots,n,e.normalizeProps(e.guardReactiveProps(s||{})))])}))]),1040))}});exports.default=d;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),l=require("@aplus-frontend/antdv");require("../item/index.vue.js");const p=require("lodash-unified"),c=require("../item/index.vue2.js"),u=e.defineComponent({name:"ApActionItemPopconfirm",__name:"index",props:{text:{},color:{default:"primary"},disabled:{type:Boolean,default:!1},visible:{type:Boolean,default:!0},onAction:{},onClick:{},loading:{type:Boolean,default:!1},popconfirmProps:{default:()=>({})}},setup(t){const i=e.useSlots(),o=t;async function s(r){o.popconfirmProps.onConfirm?.(r),await o.onAction?.(r)}return(r,d)=>(e.openBlock(),e.createBlock(e.unref(l.Popconfirm),e.mergeProps(o.popconfirmProps,{disabled:!o.popconfirmProps,"overlay-style":{zIndex:1060},onConfirm:s}),{default:e.withCtx(()=>[e.createVNode(c.default,e.normalizeProps(e.guardReactiveProps(e.unref(p.omit)(o,["popconfirmProps","onAction"]))),e.createSlots({_:2},[e.renderList(i,(f,n)=>({name:n,fn:e.withCtx(a=>[e.renderSlot(r.$slots,n,e.normalizeProps(e.guardReactiveProps(a||{})))])}))]),1040)]),_:3},16,["disabled"]))}});exports.default=u;
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),l=require("@aplus-frontend/antdv");require("../item/index.vue.js");const p=require("lodash-unified"),c=require("../item/index.vue2.js"),u=e.defineComponent({name:"ApActionItemPopconfirm",__name:"index",props:{text:{},color:{default:"primary"},disabled:{type:Boolean,default:!1},visible:{type:Boolean,default:!0},onAction:{},onClick:{},loading:{type:Boolean,default:!1},icon:{},iconFirst:{type:Boolean},popconfirmProps:{default:()=>({})}},setup(t){const i=e.useSlots(),o=t;async function s(r){o.popconfirmProps.onConfirm?.(r),await o.onAction?.(r)}return(r,d)=>(e.openBlock(),e.createBlock(e.unref(l.Popconfirm),e.mergeProps(o.popconfirmProps,{disabled:!o.popconfirmProps,"overlay-style":{zIndex:1060},onConfirm:s}),{default:e.withCtx(()=>[e.createVNode(c.default,e.normalizeProps(e.guardReactiveProps(e.unref(p.omit)(o,["popconfirmProps","onAction"]))),e.createSlots({_:2},[e.renderList(i,(f,n)=>({name:n,fn:e.withCtx(a=>[e.renderSlot(r.$slots,n,e.normalizeProps(e.guardReactiveProps(a||{})))])}))]),1040)]),_:3},16,["disabled"]))}});exports.default=u;
|
package/lib/src/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default: "6.
|
|
1
|
+
declare const _default: "6.37.0";
|
|
2
2
|
export default _default;
|
package/lib/src/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e="6.
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e="6.37.0";exports.default=e;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aplus-frontend/ui",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.37.0",
|
|
4
4
|
"main": "./lib/index.js",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"files": [
|
|
@@ -41,14 +41,14 @@
|
|
|
41
41
|
"@aplus-frontend/hooks": "1.0.7"
|
|
42
42
|
},
|
|
43
43
|
"peerDependencies": {
|
|
44
|
-
"@aplus-frontend/antdv": "^1.2.
|
|
44
|
+
"@aplus-frontend/antdv": "^1.2.13",
|
|
45
45
|
"@aplus-frontend/icon": "^1.2.6",
|
|
46
46
|
"@aplus-frontend/oss": "^1.1.2",
|
|
47
47
|
"vue": "^3.5.17",
|
|
48
48
|
"vxe-table": "^4.13.37"
|
|
49
49
|
},
|
|
50
50
|
"devDependencies": {
|
|
51
|
-
"@aplus-frontend/antdv": "^1.2.
|
|
51
|
+
"@aplus-frontend/antdv": "^1.2.13",
|
|
52
52
|
"@aplus-frontend/icon": "^1.2.6",
|
|
53
53
|
"@aplus-frontend/oss": "^1.1.2",
|
|
54
54
|
"@types/sortablejs": "^1.15.8",
|
package/theme/ag-grid/index.css
CHANGED
|
@@ -532,6 +532,12 @@
|
|
|
532
532
|
.aplus-action-item--warn.aplus-action-item--disabled {
|
|
533
533
|
color: var(--ap-color-warn-disabled);
|
|
534
534
|
}
|
|
535
|
+
.aplus-action-item__icon-wrapper {
|
|
536
|
+
padding-right: 4px;
|
|
537
|
+
}
|
|
538
|
+
.aplus-action-item--icon-first .aplus-action-item__icon-wrapper {
|
|
539
|
+
padding-right: 0;
|
|
540
|
+
}
|
|
535
541
|
.aplus-action-item-dropdown__item .aplus-action-item {
|
|
536
542
|
width: 100%;
|
|
537
543
|
}
|
package/theme/ap-action/item.css
CHANGED
|
@@ -94,3 +94,9 @@
|
|
|
94
94
|
.aplus-action-item--warn.aplus-action-item--disabled {
|
|
95
95
|
color: var(--ap-color-warn-disabled);
|
|
96
96
|
}
|
|
97
|
+
.aplus-action-item__icon-wrapper {
|
|
98
|
+
padding-right: 4px;
|
|
99
|
+
}
|
|
100
|
+
.aplus-action-item--icon-first .aplus-action-item__icon-wrapper {
|
|
101
|
+
padding-right: 0;
|
|
102
|
+
}
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
@import '../mixins/config.less';
|
|
3
3
|
|
|
4
4
|
@aid: ~'@{ns}-action-item--disabled';
|
|
5
|
+
@aiiw: ~'@{ns}-action-item__icon-wrapper';
|
|
5
6
|
|
|
6
7
|
.b(action-item, {
|
|
7
8
|
.reset-component();
|
|
@@ -52,4 +53,12 @@
|
|
|
52
53
|
&--warn&--disabled {
|
|
53
54
|
color: var(--ap-color-warn-disabled);
|
|
54
55
|
}
|
|
56
|
+
&__icon-wrapper {
|
|
57
|
+
padding-right: @spacing-xs;
|
|
58
|
+
}
|
|
59
|
+
&--icon-first {
|
|
60
|
+
.@{aiiw} {
|
|
61
|
+
padding-right: 0;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
55
64
|
});
|
package/theme/ap-grid/index.css
CHANGED
|
@@ -496,6 +496,12 @@
|
|
|
496
496
|
.aplus-action-item--warn.aplus-action-item--disabled {
|
|
497
497
|
color: var(--ap-color-warn-disabled);
|
|
498
498
|
}
|
|
499
|
+
.aplus-action-item__icon-wrapper {
|
|
500
|
+
padding-right: 4px;
|
|
501
|
+
}
|
|
502
|
+
.aplus-action-item--icon-first .aplus-action-item__icon-wrapper {
|
|
503
|
+
padding-right: 0;
|
|
504
|
+
}
|
|
499
505
|
.aplus-action-item-dropdown__item .aplus-action-item {
|
|
500
506
|
width: 100%;
|
|
501
507
|
}
|
|
@@ -689,6 +689,12 @@
|
|
|
689
689
|
.aplus-action-item--warn.aplus-action-item--disabled {
|
|
690
690
|
color: var(--ap-color-warn-disabled);
|
|
691
691
|
}
|
|
692
|
+
.aplus-action-item__icon-wrapper {
|
|
693
|
+
padding-right: 4px;
|
|
694
|
+
}
|
|
695
|
+
.aplus-action-item--icon-first .aplus-action-item__icon-wrapper {
|
|
696
|
+
padding-right: 0;
|
|
697
|
+
}
|
|
692
698
|
.aplus-action-item-dropdown__item .aplus-action-item {
|
|
693
699
|
width: 100%;
|
|
694
700
|
}
|
|
@@ -689,6 +689,12 @@
|
|
|
689
689
|
.aplus-action-item--warn.aplus-action-item--disabled {
|
|
690
690
|
color: var(--ap-color-warn-disabled);
|
|
691
691
|
}
|
|
692
|
+
.aplus-action-item__icon-wrapper {
|
|
693
|
+
padding-right: 4px;
|
|
694
|
+
}
|
|
695
|
+
.aplus-action-item--icon-first .aplus-action-item__icon-wrapper {
|
|
696
|
+
padding-right: 0;
|
|
697
|
+
}
|
|
692
698
|
.aplus-action-item-dropdown__item .aplus-action-item {
|
|
693
699
|
width: 100%;
|
|
694
700
|
}
|
|
@@ -496,6 +496,12 @@
|
|
|
496
496
|
.aplus-action-item--warn.aplus-action-item--disabled {
|
|
497
497
|
color: var(--ap-color-warn-disabled);
|
|
498
498
|
}
|
|
499
|
+
.aplus-action-item__icon-wrapper {
|
|
500
|
+
padding-right: 4px;
|
|
501
|
+
}
|
|
502
|
+
.aplus-action-item--icon-first .aplus-action-item__icon-wrapper {
|
|
503
|
+
padding-right: 0;
|
|
504
|
+
}
|
|
499
505
|
.aplus-action-item-dropdown__item .aplus-action-item {
|
|
500
506
|
width: 100%;
|
|
501
507
|
}
|
package/theme/index.css
CHANGED
|
@@ -741,6 +741,12 @@
|
|
|
741
741
|
.aplus-action-item--warn.aplus-action-item--disabled {
|
|
742
742
|
color: var(--ap-color-warn-disabled);
|
|
743
743
|
}
|
|
744
|
+
.aplus-action-item__icon-wrapper {
|
|
745
|
+
padding-right: 4px;
|
|
746
|
+
}
|
|
747
|
+
.aplus-action-item--icon-first .aplus-action-item__icon-wrapper {
|
|
748
|
+
padding-right: 0;
|
|
749
|
+
}
|
|
744
750
|
.aplus-action-item-dropdown__item .aplus-action-item {
|
|
745
751
|
width: 100%;
|
|
746
752
|
}
|