@aplus-frontend/ui 6.17.1 → 6.18.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/src/ap-grid/index.vue.mjs +8 -1
- package/es/src/ap-grid/utils/table.d.ts +1 -1
- package/es/src/ap-grid/utils/table.mjs +31 -31
- package/es/src/business/ap-draggable-grid/ApDraggableGrid.vue.d.ts +11 -18
- package/es/src/business/ap-draggable-grid/ApDraggableGrid.vue2.mjs +394 -142
- package/es/src/business/ap-draggable-grid/constans.d.ts +4 -8
- package/es/src/business/ap-draggable-grid/constans.mjs +4 -8
- package/es/src/business/ap-draggable-grid/index.d.ts +17 -30
- package/es/src/business/ap-draggable-grid/interface.d.ts +2 -0
- package/es/src/version.d.ts +1 -1
- package/es/src/version.mjs +1 -1
- package/lib/src/ap-grid/index.vue.js +1 -1
- package/lib/src/ap-grid/utils/table.d.ts +1 -1
- package/lib/src/ap-grid/utils/table.js +1 -1
- package/lib/src/business/ap-draggable-grid/ApDraggableGrid.vue.d.ts +11 -18
- package/lib/src/business/ap-draggable-grid/ApDraggableGrid.vue2.js +1 -1
- package/lib/src/business/ap-draggable-grid/constans.d.ts +4 -8
- package/lib/src/business/ap-draggable-grid/constans.js +1 -1
- package/lib/src/business/ap-draggable-grid/index.d.ts +17 -30
- package/lib/src/business/ap-draggable-grid/interface.d.ts +2 -0
- package/lib/src/version.d.ts +1 -1
- package/lib/src/version.js +1 -1
- package/package.json +3 -3
- package/theme/ap-descriptions/ap-descriptions.css +1 -1
- package/theme/ap-descriptions/ap-descriptions.less +1 -1
- package/theme/ap-draggable-grid/ap-draggable-grid.css +8 -5
- package/theme/ap-draggable-grid/ap-draggable-grid.less +10 -4
- package/theme/index.css +9 -6
|
@@ -483,7 +483,14 @@ const Gt = /* @__PURE__ */ $e({
|
|
|
483
483
|
]),
|
|
484
484
|
_: 1
|
|
485
485
|
}, 16, ["fixed"])) : w("", !0),
|
|
486
|
-
o.rowSelection && i.value.length ? (d(), f(a(re), R(
|
|
486
|
+
o.rowSelection && i.value.length ? (d(), f(a(re), R(
|
|
487
|
+
{ key: 1 },
|
|
488
|
+
a(st)(a(m), i.value, o.size),
|
|
489
|
+
{
|
|
490
|
+
resizable: !1,
|
|
491
|
+
field: a(ft)
|
|
492
|
+
}
|
|
493
|
+
), null, 16, ["field"])) : w("", !0),
|
|
487
494
|
(d(!0), P(oe, null, K(a(he), (l) => (d(), f(L(l), {
|
|
488
495
|
key: l.props.colId
|
|
489
496
|
}))), 128))
|
|
@@ -2,7 +2,7 @@ import { VxeTableEventProps, VxeTableProps } from 'vxe-table';
|
|
|
2
2
|
import { ApGridColumnType, ApGridProps, ApGridRowSelection } from '../interface';
|
|
3
3
|
import { RowSelectionType } from '@aplus-frontend/antdv/es/table/interface';
|
|
4
4
|
export declare function toVxeProps<RecordType>(props: ApGridProps): VxeTableProps<RecordType> & VxeTableEventProps<RecordType>;
|
|
5
|
-
export declare function getRowSelectionProps(rowSelection: ApGridRowSelection<any> | true, columns: ApGridColumnType[]): {
|
|
5
|
+
export declare function getRowSelectionProps(rowSelection: ApGridRowSelection<any> | true, columns: ApGridColumnType[], size: 'mini' | 'medium'): {
|
|
6
6
|
type: RowSelectionType;
|
|
7
7
|
width: string | number;
|
|
8
8
|
fixed: "left" | "right" | undefined;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { omit as s, isUndefined as
|
|
1
|
+
import { omit as s, isUndefined as f, isFunction as m, isNumber as C } from "lodash-unified";
|
|
2
2
|
import { isDef as g } from "../../utils/index.mjs";
|
|
3
3
|
const y = 20, b = 50, w = (e) => e.some((t) => !!t.html);
|
|
4
4
|
function K(e) {
|
|
@@ -22,23 +22,23 @@ function K(e) {
|
|
|
22
22
|
const r = e.rowSelection === !0 ? {} : e.rowSelection;
|
|
23
23
|
r.type === "radio" ? t.radioConfig = {
|
|
24
24
|
highlight: !0,
|
|
25
|
-
checkMethod({ row:
|
|
26
|
-
return r.disabled ? !r.disabled(
|
|
25
|
+
checkMethod({ row: n }) {
|
|
26
|
+
return r.disabled ? !r.disabled(n) : !0;
|
|
27
27
|
},
|
|
28
|
-
visibleMethod({ row:
|
|
29
|
-
return r.shown ? r.shown(
|
|
28
|
+
visibleMethod({ row: n }) {
|
|
29
|
+
return r.shown ? r.shown(n) : !0;
|
|
30
30
|
},
|
|
31
31
|
checkRowKey: (o = r.defaultSelectedRowKeys) == null ? void 0 : o[0],
|
|
32
|
-
reserve:
|
|
32
|
+
reserve: f(r.preserveSelectedRowKeys) ? !0 : r.preserveSelectedRowKeys
|
|
33
33
|
} : t.checkboxConfig = {
|
|
34
34
|
highlight: !0,
|
|
35
|
-
checkMethod({ row:
|
|
36
|
-
return r.disabled ? !r.disabled(
|
|
35
|
+
checkMethod({ row: n }) {
|
|
36
|
+
return r.disabled ? !r.disabled(n) : !0;
|
|
37
37
|
},
|
|
38
|
-
visibleMethod({ row:
|
|
39
|
-
return r.shown ? r.shown(
|
|
38
|
+
visibleMethod({ row: n }) {
|
|
39
|
+
return r.shown ? r.shown(n) : !0;
|
|
40
40
|
},
|
|
41
|
-
reserve:
|
|
41
|
+
reserve: f(r.preserveSelectedRowKeys) ? !0 : r.preserveSelectedRowKeys,
|
|
42
42
|
range: r.range || !1
|
|
43
43
|
};
|
|
44
44
|
}
|
|
@@ -50,7 +50,7 @@ function K(e) {
|
|
|
50
50
|
enabled: !1
|
|
51
51
|
}, t.virtualYConfig = {
|
|
52
52
|
enabled: !1
|
|
53
|
-
}) : (
|
|
53
|
+
}) : (a(t, "X", e.virtual), a(t, "Y", e.virtual)), t.round = g(e.round) ? e.round : !e.card, t.headerCellConfig = {
|
|
54
54
|
height: 36,
|
|
55
55
|
...t.headerCellConfig || {}
|
|
56
56
|
}, t.treeConfig && (t.treeConfig = {
|
|
@@ -65,29 +65,29 @@ function K(e) {
|
|
|
65
65
|
}
|
|
66
66
|
}, t;
|
|
67
67
|
}
|
|
68
|
-
function
|
|
69
|
-
const o = t === "X", r = o ? "x" : "y",
|
|
70
|
-
e[
|
|
71
|
-
enabled:
|
|
68
|
+
function a(e, t, i) {
|
|
69
|
+
const o = t === "X", r = o ? "x" : "y", n = o ? "virtualXConfig" : "virtualYConfig", u = i == null ? void 0 : i[r], l = u !== !1, d = o ? y : b, h = C(u) && u >= 0 ? u : d;
|
|
70
|
+
e[n] = {
|
|
71
|
+
enabled: l,
|
|
72
72
|
gt: h,
|
|
73
|
-
oSize: (
|
|
73
|
+
oSize: (i == null ? void 0 : i.oSize) || 0
|
|
74
74
|
};
|
|
75
75
|
}
|
|
76
76
|
function x(e) {
|
|
77
77
|
return e === !0 ? "left" : e;
|
|
78
78
|
}
|
|
79
|
-
function M(e, t) {
|
|
80
|
-
const
|
|
81
|
-
let
|
|
82
|
-
return
|
|
83
|
-
(
|
|
79
|
+
function M(e, t, i) {
|
|
80
|
+
const o = e === !0 || !e.type ? "checkbox" : e.type, r = (i === "mini" ? 9 * 2 : 12 * 2) + 16, n = e === !0 ? r : e.columnWidth || r;
|
|
81
|
+
let u = e === !0 ? void 0 : x(e.fixed);
|
|
82
|
+
return u || (u === !1 ? u = void 0 : u = t.some(
|
|
83
|
+
(l) => l.fixed === "left" || l.fixed === !0
|
|
84
84
|
) ? "left" : void 0), {
|
|
85
|
-
type:
|
|
86
|
-
width:
|
|
87
|
-
fixed:
|
|
85
|
+
type: o,
|
|
86
|
+
width: n,
|
|
87
|
+
fixed: u
|
|
88
88
|
};
|
|
89
89
|
}
|
|
90
|
-
function
|
|
90
|
+
function W(e) {
|
|
91
91
|
const t = (e == null ? void 0 : e.width) || "auto";
|
|
92
92
|
return {
|
|
93
93
|
type: "expand",
|
|
@@ -95,7 +95,7 @@ function k(e) {
|
|
|
95
95
|
width: t
|
|
96
96
|
};
|
|
97
97
|
}
|
|
98
|
-
function
|
|
98
|
+
function c(e) {
|
|
99
99
|
if (!e)
|
|
100
100
|
return 0;
|
|
101
101
|
const t = getComputedStyle(e);
|
|
@@ -104,13 +104,13 @@ function a(e) {
|
|
|
104
104
|
function R(e, t) {
|
|
105
105
|
if (!e)
|
|
106
106
|
return "auto";
|
|
107
|
-
const
|
|
107
|
+
const i = getComputedStyle(e);
|
|
108
108
|
let o = t === "medium" ? 12 * 2 : 9 * 2;
|
|
109
|
-
const r = (Number.parseFloat(
|
|
110
|
-
return o += r, e.querySelector("span.anticon-question-circle") && (o += 20), o +=
|
|
109
|
+
const r = (Number.parseFloat(i.fontSize) || 14) * 1.6;
|
|
110
|
+
return o += r, e.querySelector("span.anticon-question-circle") && (o += 20), o += c(e.querySelector(".vxe-cell--sort")) + c(e.querySelector(".vxe-cell--filter")), Math.ceil(o);
|
|
111
111
|
}
|
|
112
112
|
export {
|
|
113
|
-
|
|
113
|
+
W as getRowExpandProps,
|
|
114
114
|
M as getRowSelectionProps,
|
|
115
115
|
K as toVxeProps
|
|
116
116
|
};
|
|
@@ -10,7 +10,9 @@ declare function __VLS_template(): {
|
|
|
10
10
|
span: number;
|
|
11
11
|
row: number;
|
|
12
12
|
col: number;
|
|
13
|
+
showHeight: number | string;
|
|
13
14
|
height?: number | string | undefined;
|
|
15
|
+
module: string;
|
|
14
16
|
};
|
|
15
17
|
index: number;
|
|
16
18
|
}): any;
|
|
@@ -46,18 +48,14 @@ declare const __VLS_component: DefineComponent<ExtractPropTypes<{
|
|
|
46
48
|
type: NumberConstructor;
|
|
47
49
|
default: number;
|
|
48
50
|
};
|
|
49
|
-
dragOverlayColor: {
|
|
50
|
-
type: StringConstructor;
|
|
51
|
-
default: string;
|
|
52
|
-
};
|
|
53
|
-
dragOverlayBorderColor: {
|
|
54
|
-
type: StringConstructor;
|
|
55
|
-
default: string;
|
|
56
|
-
};
|
|
57
51
|
disableDrag: {
|
|
58
52
|
type: BooleanConstructor;
|
|
59
53
|
default: boolean;
|
|
60
54
|
};
|
|
55
|
+
customWrapper: {
|
|
56
|
+
type: StringConstructor;
|
|
57
|
+
default: string;
|
|
58
|
+
};
|
|
61
59
|
}>, {
|
|
62
60
|
setGridItems: (items: ApDraggableGridItemBase[]) => void;
|
|
63
61
|
refreshGrid: () => void;
|
|
@@ -88,18 +86,14 @@ declare const __VLS_component: DefineComponent<ExtractPropTypes<{
|
|
|
88
86
|
type: NumberConstructor;
|
|
89
87
|
default: number;
|
|
90
88
|
};
|
|
91
|
-
dragOverlayColor: {
|
|
92
|
-
type: StringConstructor;
|
|
93
|
-
default: string;
|
|
94
|
-
};
|
|
95
|
-
dragOverlayBorderColor: {
|
|
96
|
-
type: StringConstructor;
|
|
97
|
-
default: string;
|
|
98
|
-
};
|
|
99
89
|
disableDrag: {
|
|
100
90
|
type: BooleanConstructor;
|
|
101
91
|
default: boolean;
|
|
102
92
|
};
|
|
93
|
+
customWrapper: {
|
|
94
|
+
type: StringConstructor;
|
|
95
|
+
default: string;
|
|
96
|
+
};
|
|
103
97
|
}>> & Readonly<{
|
|
104
98
|
onOnGridListChange?: ((args_0: ApDraggableGridItemBase[]) => any) | undefined;
|
|
105
99
|
}>, {
|
|
@@ -109,9 +103,8 @@ declare const __VLS_component: DefineComponent<ExtractPropTypes<{
|
|
|
109
103
|
gridItemHeight: number;
|
|
110
104
|
gridItemShadow: string;
|
|
111
105
|
gapWidth: number;
|
|
112
|
-
dragOverlayColor: string;
|
|
113
|
-
dragOverlayBorderColor: string;
|
|
114
106
|
disableDrag: boolean;
|
|
107
|
+
customWrapper: string;
|
|
115
108
|
}, {}, {}, {}, string, ComponentProvideOptions, true, {
|
|
116
109
|
gridContainer: HTMLDivElement;
|
|
117
110
|
}, any>;
|