@aplus-frontend/ui 0.4.33 → 0.5.0-beta.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/index.mjs +121 -117
- package/es/src/ap-button/ap-confirm-button.vue.d.ts +20 -0
- package/es/src/ap-button/ap-confirm-button.vue.mjs +56 -0
- package/es/src/ap-button/ap-confirm-button.vue2.mjs +4 -0
- package/es/src/ap-button/index.d.ts +2 -1
- package/es/src/ap-button/index.mjs +1 -0
- package/es/src/ap-button/interface.d.ts +6 -1
- package/es/src/ap-button/utils/index.d.ts +2 -0
- package/es/src/ap-button/utils/index.mjs +36 -16
- package/es/src/ap-grid/constants.d.ts +9 -0
- package/es/src/ap-grid/constants.mjs +12 -0
- package/es/src/ap-grid/hooks/use-inner-params.d.ts +10 -0
- package/es/src/ap-grid/hooks/use-inner-params.mjs +41 -0
- package/es/src/ap-grid/hooks/use-render-columns.d.ts +6 -0
- package/es/src/ap-grid/hooks/use-render-columns.mjs +29 -0
- package/es/src/ap-grid/index.d.ts +3 -0
- package/es/src/ap-grid/index.mjs +2 -0
- package/es/src/ap-grid/index.vue.mjs +399 -0
- package/es/src/ap-grid/index.vue2.mjs +4 -0
- package/es/src/ap-grid/interface.d.ts +279 -0
- package/es/src/ap-grid/interface.mjs +1 -0
- package/es/src/ap-grid/style/css.d.ts +0 -0
- package/es/src/ap-grid/style/css.js +1 -0
- package/es/src/ap-grid/style/index.d.ts +0 -0
- package/es/src/ap-grid/style/index.js +1 -0
- package/es/src/ap-grid/utils/col.d.ts +20 -0
- package/es/src/ap-grid/utils/col.mjs +106 -0
- package/es/src/ap-grid/utils/renderer.d.ts +3 -0
- package/es/src/ap-grid/utils/renderer.mjs +21 -0
- package/es/src/ap-grid/utils/table.d.ts +13 -0
- package/es/src/ap-grid/utils/table.mjs +64 -0
- package/es/src/ap-modal/utils/createModal.mjs +28 -28
- package/es/src/ap-table/ap-table.vue.d.ts +2 -0
- package/es/src/ap-table/components/setting/select-group/index.vue2.mjs +38 -38
- package/es/src/ap-table/components/setting/sortable/item.vue2.mjs +9 -9
- package/es/src/ap-table/components/setting/tree-select/index.vue2.mjs +21 -21
- package/es/src/ap-table/components/setting/utils.d.ts +15 -3
- package/es/src/ap-table/components/setting/utils.mjs +49 -38
- package/es/src/ap-table/context.d.ts +2 -1
- package/es/src/ap-table/context.mjs +8 -7
- package/es/src/ap-table/hooks/use-table-column-state.mjs +79 -70
- package/es/src/ap-table/hooks/use-table-paging-ng.d.ts +8 -2
- package/es/src/ap-table/hooks/use-table-paging-ng.mjs +43 -40
- package/es/src/ap-table/hooks/use-table-row-selection.d.ts +12 -0
- package/es/src/ap-table/hooks/use-table-row-selection.mjs +41 -27
- package/es/src/ap-table/interface.d.ts +4 -0
- package/es/src/ap-table/utils.d.ts +1 -1
- package/es/src/business/ap-table-modal/hooks/use-create-table-modal.d.ts +2 -0
- package/es/src/business/ap-table-modal/hooks/use-table-modal.d.ts +2 -0
- package/es/src/business/ap-table-modal/hooks/use-table-select-modal.d.ts +2 -0
- package/es/src/business/ap-table-modal/index.d.ts +8 -0
- package/es/src/business/ap-table-modal/table-modal.vue.d.ts +4 -0
- package/es/src/business/hooks/usePageListApTable.d.ts +2 -0
- package/es/src/index.d.ts +1 -0
- package/es/src/index.mjs +242 -237
- package/es/src/path-map.mjs +2 -1
- package/lib/index.js +1 -1
- package/lib/src/ap-button/ap-confirm-button.vue.d.ts +20 -0
- package/lib/src/ap-button/ap-confirm-button.vue.js +1 -0
- package/lib/src/ap-button/ap-confirm-button.vue2.js +1 -0
- package/lib/src/ap-button/index.d.ts +2 -1
- package/lib/src/ap-button/index.js +1 -1
- package/lib/src/ap-button/interface.d.ts +6 -1
- package/lib/src/ap-button/utils/index.d.ts +2 -0
- package/lib/src/ap-button/utils/index.js +1 -1
- package/lib/src/ap-grid/constants.d.ts +9 -0
- package/lib/src/ap-grid/constants.js +1 -0
- package/lib/src/ap-grid/hooks/use-inner-params.d.ts +10 -0
- package/lib/src/ap-grid/hooks/use-inner-params.js +1 -0
- package/lib/src/ap-grid/hooks/use-render-columns.d.ts +6 -0
- package/lib/src/ap-grid/hooks/use-render-columns.js +1 -0
- package/lib/src/ap-grid/index.d.ts +3 -0
- package/lib/src/ap-grid/index.js +1 -0
- package/lib/src/ap-grid/index.vue.js +1 -0
- package/lib/src/ap-grid/index.vue2.js +1 -0
- package/lib/src/ap-grid/interface.d.ts +279 -0
- package/lib/src/ap-grid/interface.js +1 -0
- package/lib/src/ap-grid/style/css.cjs +1 -0
- package/lib/src/ap-grid/style/css.d.ts +0 -0
- package/lib/src/ap-grid/style/index.cjs +1 -0
- package/lib/src/ap-grid/style/index.d.ts +0 -0
- package/lib/src/ap-grid/utils/col.d.ts +20 -0
- package/lib/src/ap-grid/utils/col.js +1 -0
- package/lib/src/ap-grid/utils/renderer.d.ts +3 -0
- package/lib/src/ap-grid/utils/renderer.js +1 -0
- package/lib/src/ap-grid/utils/table.d.ts +13 -0
- package/lib/src/ap-grid/utils/table.js +1 -0
- package/lib/src/ap-modal/utils/createModal.js +1 -1
- package/lib/src/ap-table/ap-table.vue.d.ts +2 -0
- package/lib/src/ap-table/components/setting/select-group/index.vue2.js +1 -1
- package/lib/src/ap-table/components/setting/sortable/item.vue2.js +1 -1
- package/lib/src/ap-table/components/setting/tree-select/index.vue2.js +1 -1
- package/lib/src/ap-table/components/setting/utils.d.ts +15 -3
- package/lib/src/ap-table/components/setting/utils.js +1 -1
- package/lib/src/ap-table/context.d.ts +2 -1
- package/lib/src/ap-table/context.js +1 -1
- package/lib/src/ap-table/hooks/use-table-column-state.js +1 -1
- package/lib/src/ap-table/hooks/use-table-paging-ng.d.ts +8 -2
- package/lib/src/ap-table/hooks/use-table-paging-ng.js +1 -1
- package/lib/src/ap-table/hooks/use-table-row-selection.d.ts +12 -0
- package/lib/src/ap-table/hooks/use-table-row-selection.js +1 -1
- package/lib/src/ap-table/interface.d.ts +4 -0
- package/lib/src/ap-table/utils.d.ts +1 -1
- package/lib/src/business/ap-table-modal/hooks/use-create-table-modal.d.ts +2 -0
- package/lib/src/business/ap-table-modal/hooks/use-table-modal.d.ts +2 -0
- package/lib/src/business/ap-table-modal/hooks/use-table-select-modal.d.ts +2 -0
- package/lib/src/business/ap-table-modal/index.d.ts +8 -0
- package/lib/src/business/ap-table-modal/table-modal.vue.d.ts +4 -0
- package/lib/src/business/hooks/usePageListApTable.d.ts +2 -0
- package/lib/src/index.d.ts +1 -0
- package/lib/src/index.js +1 -1
- package/lib/src/path-map.js +1 -1
- package/package.json +3 -1
- package/theme/antd-global-overwrite/admin/index.css +8 -1
- package/theme/antd-global-overwrite/admin/modal.css +8 -1
- package/theme/antd-global-overwrite/admin/modal.less +10 -1
- package/theme/antd-global-overwrite/aplus/index.css +8 -1
- package/theme/antd-global-overwrite/aplus/modal.css +8 -1
- package/theme/antd-global-overwrite/aplus/modal.less +10 -1
- package/theme/ap-grid/index.css +302 -0
- package/theme/ap-grid/index.less +65 -0
- package/theme/index.css +51 -0
- package/theme/index.less +1 -0
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { ApGridColumnType, ColConfigType } from '../interface';
|
|
2
|
+
import { ValueTypeRenderConfig } from '../../config-provider';
|
|
3
|
+
/**
|
|
4
|
+
* 转换分组页
|
|
5
|
+
* @param columnConfig
|
|
6
|
+
* @returns
|
|
7
|
+
*/
|
|
8
|
+
export declare function transformToColGroup<RecordType>(columnConfig: ApGridColumnType<RecordType>, color: string, className: string): ColConfigType;
|
|
9
|
+
/**
|
|
10
|
+
* 转换渲染列
|
|
11
|
+
* @param columnConfig
|
|
12
|
+
* @returns
|
|
13
|
+
*/
|
|
14
|
+
export declare function transformToColumn<RecordType>(columnConfig: ApGridColumnType<RecordType>, color: string, className: string, extraValueType?: Record<string, ValueTypeRenderConfig>): ColConfigType;
|
|
15
|
+
/**
|
|
16
|
+
* 将ApColumn风格的列配置转换成适合VxeTable渲染的数据结构
|
|
17
|
+
* @param rawColumn
|
|
18
|
+
* @returns
|
|
19
|
+
*/
|
|
20
|
+
export declare function transformCol<RecordType>(rawColumn: ApGridColumnType<RecordType>, color: string, className: string, extraValueType?: Record<string, ValueTypeRenderConfig>): ColConfigType;
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
import { createVNode as E, Fragment as M } from "vue";
|
|
2
|
+
import { isUndefined as S, isArray as B, isString as v, isBoolean as F, pick as w } from "lodash-unified";
|
|
3
|
+
import { valueEnumToArray as W, getTableTitle as A, getTableRenderType as j, getTableRenderProps as k, getTableCellRenderNode as z } from "../../ap-table/utils.mjs";
|
|
4
|
+
function O(e) {
|
|
5
|
+
if (!S(e))
|
|
6
|
+
return B(e) ? e.reduce((r, i) => v(i) ? `${r}.${i}` : `${r}[${i}]`, "") : String(e);
|
|
7
|
+
}
|
|
8
|
+
function R(e) {
|
|
9
|
+
if (e)
|
|
10
|
+
return e === !0 ? "left" : e;
|
|
11
|
+
}
|
|
12
|
+
function G(e) {
|
|
13
|
+
return F(e) ? {
|
|
14
|
+
sortable: e
|
|
15
|
+
} : e ? {
|
|
16
|
+
sortable: !0,
|
|
17
|
+
sortType: e == null ? void 0 : e.type,
|
|
18
|
+
sortBy: e == null ? void 0 : e.by
|
|
19
|
+
} : {
|
|
20
|
+
sortable: !1
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
function H(e) {
|
|
24
|
+
let r;
|
|
25
|
+
return F(e.filters) && e.valueEnum ? r = W(e.valueEnum) : r = e.filters, r == null ? void 0 : r.map((i) => ({
|
|
26
|
+
label: v(i.text) ? i.text : "",
|
|
27
|
+
value: i.value
|
|
28
|
+
}));
|
|
29
|
+
}
|
|
30
|
+
function N(e) {
|
|
31
|
+
if (e)
|
|
32
|
+
return (r) => e(r.value, r.row);
|
|
33
|
+
}
|
|
34
|
+
function u(e, r, i) {
|
|
35
|
+
const d = w(e, ["width", "minWidth", "align"]);
|
|
36
|
+
return d.field = O(e.dataIndex), d.fixed = R(e.fixed), d.title = e.title, d.slots = {
|
|
37
|
+
header: () => A(e, i, void 0, r)
|
|
38
|
+
}, d.headerAlign = e.align, d.showOverflow = e.ellipsis, d.showHeaderOverflow = e.ellipsis, d;
|
|
39
|
+
}
|
|
40
|
+
function y(e, r, i, d) {
|
|
41
|
+
const t = w(e, ["width", "minWidth", "align", "resizable"]);
|
|
42
|
+
t.field = O(e.dataIndex), t.fixed = R(e.fixed), t.headerAlign = e.align, t.footerAlign = e.align, t.showOverflow = e.ellipsis, t.showFooterOverflow = e.ellipsis, Object.assign(t, G(e.sorter)), t.filters = H(e), t.filterMultiple = e.filterMultiple, t.filterMethod = N(e.onFilter), t.title = e.title;
|
|
43
|
+
const h = ({
|
|
44
|
+
value: s,
|
|
45
|
+
...n
|
|
46
|
+
}) => {
|
|
47
|
+
var p, x;
|
|
48
|
+
const l = j(e), a = k({
|
|
49
|
+
...e,
|
|
50
|
+
valueType: l
|
|
51
|
+
}, {
|
|
52
|
+
value: s,
|
|
53
|
+
...n
|
|
54
|
+
}), f = z(l, a, n.record, d), $ = ((p = e.renderText) == null ? void 0 : p.call(e, {
|
|
55
|
+
value: s,
|
|
56
|
+
...n
|
|
57
|
+
})) || s;
|
|
58
|
+
let T = e.renderText ? E(M, null, [(x = e.renderText) == null ? void 0 : x.call(e, {
|
|
59
|
+
value: s,
|
|
60
|
+
...n
|
|
61
|
+
})]) : f;
|
|
62
|
+
return e.customRender && (T = e.customRender({
|
|
63
|
+
value: s,
|
|
64
|
+
...n,
|
|
65
|
+
column: e,
|
|
66
|
+
originalNode: T,
|
|
67
|
+
originalText: $
|
|
68
|
+
})), T;
|
|
69
|
+
};
|
|
70
|
+
return t.slots = {
|
|
71
|
+
header: () => A(e, i, void 0, r),
|
|
72
|
+
default: ({
|
|
73
|
+
row: s,
|
|
74
|
+
rowIndex: n
|
|
75
|
+
}) => h({
|
|
76
|
+
value: s[t.field],
|
|
77
|
+
text: s[t.field],
|
|
78
|
+
record: s,
|
|
79
|
+
index: n,
|
|
80
|
+
renderIndex: n,
|
|
81
|
+
column: e
|
|
82
|
+
})
|
|
83
|
+
}, t;
|
|
84
|
+
}
|
|
85
|
+
function I(e, r, i, d) {
|
|
86
|
+
var s;
|
|
87
|
+
if (!((s = e.children) != null && s.length))
|
|
88
|
+
return y(e, r, i, d);
|
|
89
|
+
function t(n) {
|
|
90
|
+
return n.map((l) => {
|
|
91
|
+
var a;
|
|
92
|
+
if ((a = l.children) != null && a.length) {
|
|
93
|
+
const f = u(l, r, i);
|
|
94
|
+
return f.children = t(l.children), f;
|
|
95
|
+
}
|
|
96
|
+
return y(l, r, i, d);
|
|
97
|
+
});
|
|
98
|
+
}
|
|
99
|
+
const h = u(e, r, i);
|
|
100
|
+
return h.children = t(e.children), h;
|
|
101
|
+
}
|
|
102
|
+
export {
|
|
103
|
+
I as transformCol,
|
|
104
|
+
u as transformToColGroup,
|
|
105
|
+
y as transformToColumn
|
|
106
|
+
};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { ApGridColumnType } from '../interface';
|
|
2
|
+
import { ValueTypeRenderConfig } from '../../config-provider';
|
|
3
|
+
export declare function renderWithColumns<RecordType>(columns: ApGridColumnType<RecordType>[], color: string, className: string, extraValueType?: Record<string, ValueTypeRenderConfig>): import("vue/jsx-runtime").JSX.Element[];
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { createVNode as m } from "vue";
|
|
2
|
+
import { VxeColumn as u, VxeColgroup as p } from "vxe-table";
|
|
3
|
+
import { transformCol as d } from "./col.mjs";
|
|
4
|
+
function n(r) {
|
|
5
|
+
var e;
|
|
6
|
+
return (e = r.children) != null && e.length ? m(p, r, {
|
|
7
|
+
...r.slots || {},
|
|
8
|
+
default: () => {
|
|
9
|
+
var t;
|
|
10
|
+
return (t = r.children) == null ? void 0 : t.map((o) => n(o));
|
|
11
|
+
}
|
|
12
|
+
}) : m(u, r, {
|
|
13
|
+
...r.slots || {}
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
function C(r, e, t, o) {
|
|
17
|
+
return r.map((l) => n(d(l, e, t, o)));
|
|
18
|
+
}
|
|
19
|
+
export {
|
|
20
|
+
C as renderWithColumns
|
|
21
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { VxeTableEventProps, VxeTableProps } from 'vxe-table';
|
|
2
|
+
import { ApGridProps, ApGridRowSelection } from '../interface';
|
|
3
|
+
import { RowSelectionType } from '@aplus-frontend/antdv/es/table/interface';
|
|
4
|
+
export declare function toVxeProps<RecordType>(props: any): VxeTableProps<RecordType> & VxeTableEventProps<RecordType>;
|
|
5
|
+
export declare function getRowSelectionProps(rowSelection: ApGridRowSelection<any> | true): {
|
|
6
|
+
type: RowSelectionType;
|
|
7
|
+
width: string | number;
|
|
8
|
+
};
|
|
9
|
+
export declare function getRowExpandProps(config: ApGridProps['expandable']): {
|
|
10
|
+
readonly type: "expand";
|
|
11
|
+
readonly title: string | undefined;
|
|
12
|
+
readonly width: string | number;
|
|
13
|
+
};
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { isUndefined as d, omit as a, isFunction as c, isNumber as f } from "lodash-unified";
|
|
2
|
+
const h = 30, b = 50;
|
|
3
|
+
function y(e) {
|
|
4
|
+
var i, l, n;
|
|
5
|
+
const t = {
|
|
6
|
+
...e
|
|
7
|
+
};
|
|
8
|
+
if (e.columnResizable && (t.columnConfig ? t.columnConfig.resizable = !0 : t.columnConfig = {
|
|
9
|
+
resizable: !0
|
|
10
|
+
}), e.rowSelection) {
|
|
11
|
+
const o = e.rowSelection === !0 ? {} : e.rowSelection;
|
|
12
|
+
o.type === "radio" ? t.radioConfig = {
|
|
13
|
+
highlight: !0,
|
|
14
|
+
checkMethod({ row: r }) {
|
|
15
|
+
return o.disabled ? !o.disabled(r) : !0;
|
|
16
|
+
},
|
|
17
|
+
checkRowKey: (i = o.defaultSelectedRowKeys) == null ? void 0 : i[0],
|
|
18
|
+
reserve: d(o.preserveSelectedRowKeys) ? !0 : o.preserveSelectedRowKeys
|
|
19
|
+
} : t.checkboxConfig = {
|
|
20
|
+
highlight: !0,
|
|
21
|
+
checkMethod({ row: r }) {
|
|
22
|
+
return o.disabled ? !o.disabled(r) : !0;
|
|
23
|
+
},
|
|
24
|
+
checkRowKeys: o.defaultSelectedRowKeys,
|
|
25
|
+
reserve: d(o.preserveSelectedRowKeys) ? !0 : o.preserveSelectedRowKeys
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
return t.border = e.bordered, e.expandable && (t.expandConfig = a(e.expandable, [
|
|
29
|
+
"renderContent",
|
|
30
|
+
"width",
|
|
31
|
+
"title"
|
|
32
|
+
])), e.footer && (t.showFooter = !0, c(e.footer) ? t.footerMethod = e.footer : t.footerData = e.footer), e.virtual === !1 ? (t.virtualXConfig = {
|
|
33
|
+
enabled: !1
|
|
34
|
+
}, t.virtualYConfig = {
|
|
35
|
+
enabled: !1
|
|
36
|
+
}) : (u(t, "X", (l = e.virtual) == null ? void 0 : l.x), u(t, "Y", (n = e.virtual) == null ? void 0 : n.y)), t;
|
|
37
|
+
}
|
|
38
|
+
function u(e, t, i) {
|
|
39
|
+
const l = t === "X", n = l ? "virtualXConfig" : "virtualYConfig", o = i !== !1, r = l ? h : b, s = f(i) && i >= 0 ? i : r;
|
|
40
|
+
e[n] = {
|
|
41
|
+
enabled: o,
|
|
42
|
+
gt: s
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
function C(e) {
|
|
46
|
+
const t = e === !0 || !e.type ? "checkbox" : e.type, i = e === !0 ? 60 : e.columnWidth || 60;
|
|
47
|
+
return {
|
|
48
|
+
type: t,
|
|
49
|
+
width: i
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
function R(e) {
|
|
53
|
+
const t = (e == null ? void 0 : e.width) || "auto";
|
|
54
|
+
return {
|
|
55
|
+
type: "expand",
|
|
56
|
+
title: e == null ? void 0 : e.title,
|
|
57
|
+
width: t
|
|
58
|
+
};
|
|
59
|
+
}
|
|
60
|
+
export {
|
|
61
|
+
R as getRowExpandProps,
|
|
62
|
+
C as getRowSelectionProps,
|
|
63
|
+
y as toVxeProps
|
|
64
|
+
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { render as u, defineComponent as
|
|
1
|
+
import { render as u, defineComponent as x, createVNode as h, mergeProps as k, h as v } from "vue";
|
|
2
2
|
import { Modal as b } from "@aplus-frontend/antdv";
|
|
3
3
|
import { ConfigProvider as P, globalConfigCached as N } from "../../config-provider/config-provider.mjs";
|
|
4
4
|
import { omit as L } from "lodash-unified";
|
|
@@ -11,9 +11,9 @@ const z = (d) => {
|
|
|
11
11
|
destroyOnClose: c = !0,
|
|
12
12
|
wrapperOffset: r = !1
|
|
13
13
|
} = d, {
|
|
14
|
-
b:
|
|
14
|
+
b: l
|
|
15
15
|
} = H("ap-modal");
|
|
16
|
-
function
|
|
16
|
+
function m() {
|
|
17
17
|
n && n(!1), setTimeout(() => {
|
|
18
18
|
var e;
|
|
19
19
|
u(null, s), (e = s.parentElement) == null || e.removeChild(s);
|
|
@@ -22,13 +22,13 @@ const z = (d) => {
|
|
|
22
22
|
function C() {
|
|
23
23
|
n && n(!0);
|
|
24
24
|
}
|
|
25
|
-
function
|
|
25
|
+
function f() {
|
|
26
26
|
n && n(!1);
|
|
27
27
|
}
|
|
28
28
|
function g(e) {
|
|
29
29
|
t && t(e);
|
|
30
30
|
}
|
|
31
|
-
const O = /* @__PURE__ */
|
|
31
|
+
const O = /* @__PURE__ */ x({
|
|
32
32
|
data() {
|
|
33
33
|
return {
|
|
34
34
|
open: c,
|
|
@@ -47,25 +47,25 @@ const z = (d) => {
|
|
|
47
47
|
},
|
|
48
48
|
methods: {
|
|
49
49
|
async handleCancel() {
|
|
50
|
-
var e, o, a,
|
|
50
|
+
var e, o, a, p, i;
|
|
51
51
|
if ((e = this.props) != null && e.onCancel) {
|
|
52
|
-
const
|
|
53
|
-
await ((
|
|
52
|
+
const w = ((p = (a = (o = this.props) == null ? void 0 : o.content) == null ? void 0 : a.component) == null ? void 0 : p.exposed) ?? void 0;
|
|
53
|
+
await ((i = this.props) == null ? void 0 : i.onCancel(w));
|
|
54
54
|
}
|
|
55
|
-
c ?
|
|
55
|
+
c ? m() : f();
|
|
56
56
|
},
|
|
57
57
|
async handleOk() {
|
|
58
|
-
var e, o, a,
|
|
58
|
+
var e, o, a, p;
|
|
59
59
|
try {
|
|
60
60
|
if (t({
|
|
61
61
|
confirmLoading: !0
|
|
62
62
|
}), (e = this.props) != null && e.onOk) {
|
|
63
|
-
const
|
|
64
|
-
await this.props.onOk(
|
|
63
|
+
const i = ((p = (a = (o = this.props) == null ? void 0 : o.content) == null ? void 0 : a.component) == null ? void 0 : p.exposed) ?? void 0;
|
|
64
|
+
await this.props.onOk(i);
|
|
65
65
|
}
|
|
66
66
|
t({
|
|
67
67
|
confirmLoading: !1
|
|
68
|
-
}), c ?
|
|
68
|
+
}), c ? m() : f();
|
|
69
69
|
} catch {
|
|
70
70
|
t({
|
|
71
71
|
confirmLoading: !1
|
|
@@ -75,11 +75,11 @@ const z = (d) => {
|
|
|
75
75
|
},
|
|
76
76
|
render() {
|
|
77
77
|
const e = L(this.props, ["onCancel", "onOk", "open", "onUpdate:open", "getContainer", "icon"]);
|
|
78
|
-
return
|
|
79
|
-
default: () => [
|
|
78
|
+
return h(P, N.value, {
|
|
79
|
+
default: () => [h(b, k({
|
|
80
80
|
class: {
|
|
81
|
-
[
|
|
82
|
-
[
|
|
81
|
+
[l()]: !0,
|
|
82
|
+
[l("wrapper")]: r
|
|
83
83
|
},
|
|
84
84
|
open: this.open,
|
|
85
85
|
onCancel: this.handleCancel,
|
|
@@ -87,24 +87,24 @@ const z = (d) => {
|
|
|
87
87
|
}, e), {
|
|
88
88
|
default: () => {
|
|
89
89
|
var o;
|
|
90
|
-
return [
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
},
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
}
|
|
90
|
+
return [h("div", {
|
|
91
|
+
class: {
|
|
92
|
+
[l("body-wrapper")]: r
|
|
93
|
+
},
|
|
94
|
+
style: r === !1 ? {} : {
|
|
95
|
+
maxHeight: `${window.innerHeight - (r === !0 ? 100 : E(r) ? Number(r) : 100) * 2}px`
|
|
96
|
+
}
|
|
97
97
|
}, [(o = this.props) == null ? void 0 : o.content])];
|
|
98
98
|
}
|
|
99
99
|
})]
|
|
100
100
|
});
|
|
101
101
|
}
|
|
102
|
-
}),
|
|
103
|
-
return
|
|
104
|
-
destroy:
|
|
102
|
+
}), y = d.getContainer || document.body, s = document.createElement("div");
|
|
103
|
+
return y.appendChild(s), u(v(O), s), {
|
|
104
|
+
destroy: m,
|
|
105
105
|
update: g,
|
|
106
106
|
open: C,
|
|
107
|
-
close:
|
|
107
|
+
close: f
|
|
108
108
|
};
|
|
109
109
|
};
|
|
110
110
|
export {
|
|
@@ -20,6 +20,8 @@ declare const _default: <RecordType>(__VLS_props: NonNullable<Awaited<typeof __V
|
|
|
20
20
|
unSelectAll: () => void;
|
|
21
21
|
clearAll: () => void;
|
|
22
22
|
toggleSelect: (item: RecordType) => void;
|
|
23
|
+
selectMulti: (items: RecordType[]) => void;
|
|
24
|
+
unSelectMulti: (items: RecordType[]) => void;
|
|
23
25
|
selectedRows: ComputedRef<RecordType[]>;
|
|
24
26
|
};
|
|
25
27
|
scrollBar: {
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { Checkbox as
|
|
1
|
+
import { defineComponent as P, ref as U, computed as p, unref as l, watch as x, createElementBlock as v, openBlock as s, createElementVNode as k, normalizeClass as D, createVNode as u, withCtx as i, createBlock as h, resolveDynamicComponent as w, Fragment as L, renderList as j, mergeProps as z } from "vue";
|
|
2
|
+
import { Checkbox as b, Row as F, Col as I } from "@aplus-frontend/antdv";
|
|
3
3
|
import "../../../../config-provider/index.mjs";
|
|
4
|
-
import { useInjectApTable as
|
|
5
|
-
import {
|
|
6
|
-
import { useNamespace as
|
|
7
|
-
const
|
|
4
|
+
import { useInjectApTable as R } from "../../../context.mjs";
|
|
5
|
+
import { getLabelNode as C } from "../utils.mjs";
|
|
6
|
+
import { useNamespace as T } from "../../../../config-provider/hooks/use-namespace.mjs";
|
|
7
|
+
const M = /* @__PURE__ */ P({
|
|
8
8
|
__name: "index",
|
|
9
9
|
props: {
|
|
10
10
|
value: {}
|
|
11
11
|
},
|
|
12
12
|
setup(y) {
|
|
13
|
-
const t = y, { b:
|
|
13
|
+
const t = y, { b: _ } = T("select-group"), d = U(!1), { columnsBackup: g, renderConfig: m } = R(), f = p(() => {
|
|
14
14
|
var e;
|
|
15
|
-
return (e =
|
|
15
|
+
return (e = l(g)) == null ? void 0 : e.find(
|
|
16
16
|
(n) => {
|
|
17
|
-
var
|
|
18
|
-
return n.key === ((
|
|
17
|
+
var r;
|
|
18
|
+
return n.key === ((r = t.value) == null ? void 0 : r.key);
|
|
19
19
|
}
|
|
20
20
|
);
|
|
21
21
|
});
|
|
@@ -26,24 +26,24 @@ const K = /* @__PURE__ */ E({
|
|
|
26
26
|
disabled: t.value.disabled || (e == null ? void 0 : e.disabled)
|
|
27
27
|
};
|
|
28
28
|
}
|
|
29
|
-
function
|
|
29
|
+
function A(o) {
|
|
30
30
|
const e = t.value;
|
|
31
|
-
e.children.forEach((n) => n.show = o), e.show = o,
|
|
31
|
+
e.children.forEach((n) => n.show = o), e.show = o, d.value = !1;
|
|
32
32
|
}
|
|
33
|
-
function
|
|
34
|
-
const n = t.value,
|
|
35
|
-
if (!
|
|
33
|
+
function B(o, e) {
|
|
34
|
+
const n = t.value, r = n.children.find((a) => a.key === o);
|
|
35
|
+
if (!r)
|
|
36
36
|
return;
|
|
37
|
-
|
|
38
|
-
const
|
|
39
|
-
n.show =
|
|
37
|
+
r.show = e;
|
|
38
|
+
const c = n.children.every((a) => a.show), E = n.children.some((a) => a.show);
|
|
39
|
+
n.show = c, d.value = E && !c;
|
|
40
40
|
}
|
|
41
|
-
const
|
|
42
|
-
return
|
|
41
|
+
const N = p(() => t.value.disabled || t.value.children.every((o) => o.disabled));
|
|
42
|
+
return x(
|
|
43
43
|
() => t.value,
|
|
44
44
|
(o) => {
|
|
45
|
-
const e = o.children.every((
|
|
46
|
-
|
|
45
|
+
const e = o.children.every((r) => r.show), n = o.children.some((r) => r.show);
|
|
46
|
+
d.value = n && !e, o.show !== e && (o.show = e);
|
|
47
47
|
},
|
|
48
48
|
{
|
|
49
49
|
deep: !0,
|
|
@@ -51,35 +51,35 @@ const K = /* @__PURE__ */ E({
|
|
|
51
51
|
}
|
|
52
52
|
), (o, e) => {
|
|
53
53
|
var n;
|
|
54
|
-
return s(),
|
|
55
|
-
|
|
56
|
-
class:
|
|
54
|
+
return s(), v("div", null, [
|
|
55
|
+
k("div", {
|
|
56
|
+
class: D(l(_)("header"))
|
|
57
57
|
}, [
|
|
58
|
-
u(
|
|
59
|
-
indeterminate:
|
|
58
|
+
u(l(b), {
|
|
59
|
+
indeterminate: d.value,
|
|
60
60
|
checked: (n = o.value) == null ? void 0 : n.show,
|
|
61
|
-
disabled:
|
|
62
|
-
"onUpdate:checked":
|
|
61
|
+
disabled: N.value,
|
|
62
|
+
"onUpdate:checked": A
|
|
63
63
|
}, {
|
|
64
64
|
default: i(() => [
|
|
65
|
-
(s(), h(
|
|
65
|
+
(s(), h(w(l(C)(f.value, l(m)))))
|
|
66
66
|
]),
|
|
67
67
|
_: 1
|
|
68
68
|
}, 8, ["indeterminate", "checked", "disabled"])
|
|
69
69
|
], 2),
|
|
70
|
-
|
|
71
|
-
u(
|
|
70
|
+
k("div", null, [
|
|
71
|
+
u(l(F), { align: "middle" }, {
|
|
72
72
|
default: i(() => [
|
|
73
|
-
(s(!0),
|
|
74
|
-
key:
|
|
73
|
+
(s(!0), v(L, null, j(f.value.children, (r) => (s(), h(l(I), {
|
|
74
|
+
key: r.key,
|
|
75
75
|
span: 8
|
|
76
76
|
}, {
|
|
77
77
|
default: i(() => [
|
|
78
|
-
u(
|
|
79
|
-
"onUpdate:checked": (
|
|
78
|
+
u(l(b), z({ ref_for: !0 }, S(r), {
|
|
79
|
+
"onUpdate:checked": (c) => B(r.key, c)
|
|
80
80
|
}), {
|
|
81
81
|
default: i(() => [
|
|
82
|
-
(s(), h(
|
|
82
|
+
(s(), h(w(l(C)(r, l(m)))))
|
|
83
83
|
]),
|
|
84
84
|
_: 2
|
|
85
85
|
}, 1040, ["onUpdate:checked"])
|
|
@@ -95,5 +95,5 @@ const K = /* @__PURE__ */ E({
|
|
|
95
95
|
}
|
|
96
96
|
});
|
|
97
97
|
export {
|
|
98
|
-
|
|
98
|
+
M as default
|
|
99
99
|
};
|
|
@@ -5,7 +5,7 @@ import "../../../../config-provider/index.mjs";
|
|
|
5
5
|
import { useInjectSorterMethods as M } from "../sorter/context.mjs";
|
|
6
6
|
import S from "../images/icon_carst_down.svg.mjs";
|
|
7
7
|
import U from "../images/icon_fill_right.svg.mjs";
|
|
8
|
-
import {
|
|
8
|
+
import { getLabelRenderNode as j } from "../utils.mjs";
|
|
9
9
|
import { useNamespace as H } from "../../../../config-provider/hooks/use-namespace.mjs";
|
|
10
10
|
import { useLocale as q } from "../../../../config-provider/hooks/use-locale.mjs";
|
|
11
11
|
const G = ["src"], le = /* @__PURE__ */ E({
|
|
@@ -28,18 +28,18 @@ const G = ["src"], le = /* @__PURE__ */ E({
|
|
|
28
28
|
const l = v("left");
|
|
29
29
|
w(l);
|
|
30
30
|
}
|
|
31
|
-
function
|
|
31
|
+
function R() {
|
|
32
32
|
const l = v("right");
|
|
33
33
|
V(l);
|
|
34
34
|
}
|
|
35
|
-
function
|
|
35
|
+
function F() {
|
|
36
36
|
const l = v(void 0);
|
|
37
37
|
y(l);
|
|
38
38
|
}
|
|
39
|
-
function
|
|
39
|
+
function L() {
|
|
40
40
|
C("update:open", !o.open);
|
|
41
41
|
}
|
|
42
|
-
function
|
|
42
|
+
function N() {
|
|
43
43
|
var n;
|
|
44
44
|
const l = o.value;
|
|
45
45
|
l.show = !1, (n = l.children) == null || n.forEach((i) => i.show = !1);
|
|
@@ -58,7 +58,7 @@ const G = ["src"], le = /* @__PURE__ */ E({
|
|
|
58
58
|
}, null, 8, ["class"]),
|
|
59
59
|
p("span", {
|
|
60
60
|
class: t(e(h)("left", "indicator")),
|
|
61
|
-
onClick:
|
|
61
|
+
onClick: L
|
|
62
62
|
}, [
|
|
63
63
|
(i = l.value.children) != null && i.length ? (s(), g("img", {
|
|
64
64
|
key: 0,
|
|
@@ -96,7 +96,7 @@ const G = ["src"], le = /* @__PURE__ */ E({
|
|
|
96
96
|
default: d(() => [
|
|
97
97
|
c(e(z), {
|
|
98
98
|
class: t(e(a)("action-icon")),
|
|
99
|
-
onClick:
|
|
99
|
+
onClick: F
|
|
100
100
|
}, null, 8, ["class"])
|
|
101
101
|
]),
|
|
102
102
|
_: 1
|
|
@@ -109,7 +109,7 @@ const G = ["src"], le = /* @__PURE__ */ E({
|
|
|
109
109
|
c(e(k), {
|
|
110
110
|
rotate: 90,
|
|
111
111
|
class: t(e(a)("action-icon")),
|
|
112
|
-
onClick:
|
|
112
|
+
onClick: R
|
|
113
113
|
}, null, 8, ["class"])
|
|
114
114
|
]),
|
|
115
115
|
_: 1
|
|
@@ -121,7 +121,7 @@ const G = ["src"], le = /* @__PURE__ */ E({
|
|
|
121
121
|
default: d(() => [
|
|
122
122
|
c(e(A), {
|
|
123
123
|
class: t(e(a)("action-icon")),
|
|
124
|
-
onClick:
|
|
124
|
+
onClick: N
|
|
125
125
|
}, null, 8, ["class"])
|
|
126
126
|
]),
|
|
127
127
|
_: 1
|
|
@@ -1,64 +1,64 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { Row as
|
|
1
|
+
import { defineComponent as x, computed as w, unref as o, createElementBlock as i, openBlock as c, createVNode as s, withCtx as d, Fragment as m, renderList as B, createBlock as u, mergeProps as I, resolveDynamicComponent as L } from "vue";
|
|
2
|
+
import { Row as N, Col as k, Checkbox as P } from "@aplus-frontend/antdv";
|
|
3
3
|
import "../select-group/index.vue.mjs";
|
|
4
|
-
import { useInjectApTable as
|
|
5
|
-
import {
|
|
6
|
-
import
|
|
7
|
-
const
|
|
4
|
+
import { useInjectApTable as U } from "../../../context.mjs";
|
|
5
|
+
import { getLabelNode as j } from "../utils.mjs";
|
|
6
|
+
import A from "../select-group/index.vue2.mjs";
|
|
7
|
+
const q = /* @__PURE__ */ x({
|
|
8
8
|
__name: "index",
|
|
9
9
|
props: {
|
|
10
10
|
value: {}
|
|
11
11
|
},
|
|
12
12
|
setup(_) {
|
|
13
|
-
const a = _, { columnsBackup: g } =
|
|
14
|
-
var t,
|
|
15
|
-
return (t = e.children) != null && t.length && !((
|
|
13
|
+
const a = _, { columnsBackup: g, renderConfig: y } = U(), C = w(() => [...o(g) || []].sort((e, n) => {
|
|
14
|
+
var t, l, p, h;
|
|
15
|
+
return (t = e.children) != null && t.length && !((l = n.children) != null && l.length) ? 1 : !((p = e.children) != null && p.length) && ((h = n.children) != null && h.length) ? -1 : 0;
|
|
16
16
|
}));
|
|
17
17
|
function f(r) {
|
|
18
18
|
return a.value.find((e) => e.key === r.key);
|
|
19
19
|
}
|
|
20
|
-
function
|
|
20
|
+
function v(r) {
|
|
21
21
|
const e = f(r);
|
|
22
22
|
return {
|
|
23
23
|
checked: e == null ? void 0 : e.show,
|
|
24
24
|
disabled: e == null ? void 0 : e.disabled
|
|
25
25
|
};
|
|
26
26
|
}
|
|
27
|
-
function
|
|
28
|
-
const n = a.value, t = n == null ? void 0 : n.find((
|
|
27
|
+
function b(r, e) {
|
|
28
|
+
const n = a.value, t = n == null ? void 0 : n.find((l) => l.key === r);
|
|
29
29
|
t && (t.show = e);
|
|
30
30
|
}
|
|
31
31
|
return (r, e) => (c(), i("div", null, [
|
|
32
|
-
s(
|
|
32
|
+
s(o(N), {
|
|
33
33
|
gutter: [24, 16],
|
|
34
34
|
align: "middle"
|
|
35
35
|
}, {
|
|
36
36
|
default: d(() => [
|
|
37
|
-
(c(!0), i(m, null,
|
|
37
|
+
(c(!0), i(m, null, B(C.value, (n) => {
|
|
38
38
|
var t;
|
|
39
39
|
return c(), i(m, {
|
|
40
40
|
key: n.key
|
|
41
41
|
}, [
|
|
42
|
-
(t = n.children) != null && t.length ? (c(), u(
|
|
42
|
+
(t = n.children) != null && t.length ? (c(), u(o(k), {
|
|
43
43
|
key: 1,
|
|
44
44
|
span: 24
|
|
45
45
|
}, {
|
|
46
46
|
default: d(() => [
|
|
47
|
-
s(
|
|
47
|
+
s(A, {
|
|
48
48
|
value: f(n)
|
|
49
49
|
}, null, 8, ["value"])
|
|
50
50
|
]),
|
|
51
51
|
_: 2
|
|
52
|
-
}, 1024)) : (c(), u(
|
|
52
|
+
}, 1024)) : (c(), u(o(k), {
|
|
53
53
|
key: 0,
|
|
54
54
|
span: 8
|
|
55
55
|
}, {
|
|
56
56
|
default: d(() => [
|
|
57
|
-
s(
|
|
58
|
-
"onUpdate:checked": (
|
|
57
|
+
s(o(P), I({ ref_for: !0 }, v(n), {
|
|
58
|
+
"onUpdate:checked": (l) => b(n.key, l)
|
|
59
59
|
}), {
|
|
60
60
|
default: d(() => [
|
|
61
|
-
(c(), u(
|
|
61
|
+
(c(), u(L(o(j)(n, o(y)))))
|
|
62
62
|
]),
|
|
63
63
|
_: 2
|
|
64
64
|
}, 1040, ["onUpdate:checked"])
|
|
@@ -74,5 +74,5 @@ const $ = /* @__PURE__ */ b({
|
|
|
74
74
|
}
|
|
75
75
|
});
|
|
76
76
|
export {
|
|
77
|
-
|
|
77
|
+
q as default
|
|
78
78
|
};
|