@ditari/bsui 1.0.68 → 1.0.69
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/dist/cjs/components/layout/List.vue.cjs.js +1 -1
- package/dist/cjs/components/table/Table.cjs.js +1 -1
- package/dist/cjs/components/table/Table.d.ts +80 -0
- package/dist/cjs/components/table/index.d.ts +75 -0
- package/dist/esm/components/layout/List.vue.esm.js +62 -56
- package/dist/esm/components/table/Table.d.ts +80 -0
- package/dist/esm/components/table/Table.esm.js +122 -129
- package/dist/esm/components/table/index.d.ts +75 -0
- package/package.json +1 -1
- package/src/components/layout/List.vue +24 -7
- package/src/components/table/Table.tsx +3 -9
- package/src/components/table/Table.jsx +0 -338
- package/src/components/table/index.js +0 -4
|
@@ -1,11 +1,8 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { Table as
|
|
1
|
+
import { defineComponent as X, ref as r, computed as S, watchEffect as k, nextTick as _, watch as G, createVNode as f, withDirectives as M, vShow as Y, Fragment as z } from "vue";
|
|
2
|
+
import { Table as Z, Space as ee, Pagination as te } from "ant-design-vue";
|
|
3
3
|
import { useEleHeight as E } from "../../utils/html.esm.js";
|
|
4
|
-
import { prefixName as
|
|
5
|
-
|
|
6
|
-
return typeof t == "function" || Object.prototype.toString.call(t) === "[object Object]" && !te(t);
|
|
7
|
-
}
|
|
8
|
-
const ue = () => ({
|
|
4
|
+
import { prefixName as ae } from "../theme/index.esm.js";
|
|
5
|
+
const ne = () => ({
|
|
9
6
|
data: {
|
|
10
7
|
type: Object,
|
|
11
8
|
required: !0
|
|
@@ -37,7 +34,7 @@ const ue = () => ({
|
|
|
37
34
|
},
|
|
38
35
|
defaultExpandAllRows: Boolean,
|
|
39
36
|
default: () => !0
|
|
40
|
-
}),
|
|
37
|
+
}), b = {
|
|
41
38
|
defaultPageSize: 20,
|
|
42
39
|
hideOnSinglePage: !1,
|
|
43
40
|
pageSizeOptions: ["10", "20", "30", "40"],
|
|
@@ -45,136 +42,135 @@ const ue = () => ({
|
|
|
45
42
|
showQuickJumper: !0,
|
|
46
43
|
showLessItems: !0,
|
|
47
44
|
showTotal: (t) => `总共 ${t} 条`
|
|
48
|
-
}, K = `${
|
|
45
|
+
}, K = `${ae}-pagination`, ce = /* @__PURE__ */ X({
|
|
49
46
|
name: "DTable",
|
|
50
|
-
props:
|
|
47
|
+
props: ne(),
|
|
51
48
|
// emits: { "update:keys": (keys: []) => void }
|
|
52
49
|
// TODO 需要做调整
|
|
53
50
|
emits: ["update:keys"],
|
|
54
51
|
setup: function(t, {
|
|
55
52
|
emit: R,
|
|
56
|
-
slots:
|
|
53
|
+
slots: s
|
|
57
54
|
}) {
|
|
58
|
-
const a =
|
|
59
|
-
var e
|
|
60
|
-
return (
|
|
61
|
-
}),
|
|
62
|
-
var e
|
|
63
|
-
return (
|
|
64
|
-
}),
|
|
65
|
-
|
|
55
|
+
const a = r(t.keys || []), B = S(() => t.data), O = S(() => {
|
|
56
|
+
var e;
|
|
57
|
+
return ((e = t.config) == null ? void 0 : e.columns) ?? [];
|
|
58
|
+
}), v = S(() => {
|
|
59
|
+
var e;
|
|
60
|
+
return ((e = t.config) == null ? void 0 : e.pagination) ?? {};
|
|
61
|
+
}), C = r(t.expandedRowKeys);
|
|
62
|
+
k(() => {
|
|
66
63
|
const {
|
|
67
64
|
expandedRowKeys: e
|
|
68
65
|
} = t;
|
|
69
|
-
|
|
66
|
+
C.value = e;
|
|
70
67
|
});
|
|
71
68
|
const {
|
|
72
69
|
tableRef: H,
|
|
73
|
-
tableRootRef:
|
|
74
|
-
tableHeight:
|
|
75
|
-
onPageChange:
|
|
76
|
-
onRowClassName:
|
|
77
|
-
} =
|
|
78
|
-
function
|
|
79
|
-
var e;
|
|
70
|
+
tableRootRef: j,
|
|
71
|
+
tableHeight: A,
|
|
72
|
+
onPageChange: D,
|
|
73
|
+
onRowClassName: U
|
|
74
|
+
} = $();
|
|
75
|
+
function $() {
|
|
80
76
|
const {
|
|
81
|
-
rowClassName:
|
|
82
|
-
keepSelected:
|
|
77
|
+
rowClassName: e,
|
|
78
|
+
keepSelected: o,
|
|
83
79
|
onPageChange: l
|
|
84
|
-
} = t.config,
|
|
85
|
-
var
|
|
80
|
+
} = t.config, m = t.config.selection ?? "N", d = r(), i = r(null), n = r(), u = r(null), g = (c) => {
|
|
81
|
+
var h, T;
|
|
86
82
|
try {
|
|
87
|
-
const
|
|
88
|
-
let
|
|
83
|
+
const p = (h = i == null ? void 0 : i.value) == null ? void 0 : h.$el, V = E(p.getElementsByClassName("ant-table-header")[0]);
|
|
84
|
+
let P = 0;
|
|
89
85
|
if (t.config.pagination) {
|
|
90
|
-
const
|
|
91
|
-
|
|
86
|
+
const W = (T = d.value) == null ? void 0 : T.getElementsByClassName(K)[0];
|
|
87
|
+
P = E(W) ?? 0;
|
|
92
88
|
}
|
|
93
|
-
|
|
94
|
-
} catch (
|
|
95
|
-
console.warn(
|
|
89
|
+
n.value = c - (V + P), p.getElementsByClassName("ant-table-body")[0].style.height = n.value + "px", u.value = p.getElementsByClassName("ant-table-body")[0];
|
|
90
|
+
} catch (p) {
|
|
91
|
+
console.warn(p);
|
|
96
92
|
}
|
|
97
93
|
};
|
|
98
|
-
return
|
|
99
|
-
t.height !== 0 &&
|
|
94
|
+
return k(() => {
|
|
95
|
+
t.height !== 0 && _(() => {
|
|
100
96
|
setTimeout(() => {
|
|
101
|
-
|
|
97
|
+
g(t.height);
|
|
102
98
|
}, 10);
|
|
103
99
|
});
|
|
104
100
|
}), {
|
|
105
101
|
tableRef: i,
|
|
106
|
-
tableRootRef:
|
|
107
|
-
tableHeight:
|
|
108
|
-
onPageChange: (
|
|
102
|
+
tableRootRef: d,
|
|
103
|
+
tableHeight: n,
|
|
104
|
+
onPageChange: (c, h) => {
|
|
109
105
|
l && l({
|
|
110
|
-
page:
|
|
111
|
-
size:
|
|
112
|
-
}),
|
|
106
|
+
page: c,
|
|
107
|
+
size: h
|
|
108
|
+
}), u.value.scrollTop = 0, (m === "S" || !o) && (a.value = [], R("update:keys", a.value));
|
|
113
109
|
},
|
|
114
|
-
onRowClassName: (
|
|
110
|
+
onRowClassName: (c, h) => e ? e(c, h) : void 0
|
|
115
111
|
};
|
|
116
112
|
}
|
|
117
|
-
const
|
|
118
|
-
function
|
|
119
|
-
var e;
|
|
113
|
+
const q = F();
|
|
114
|
+
function F() {
|
|
120
115
|
const {
|
|
121
|
-
rowKey:
|
|
116
|
+
rowKey: e,
|
|
122
117
|
config: {
|
|
123
|
-
getCheckboxProps:
|
|
118
|
+
getCheckboxProps: o
|
|
124
119
|
}
|
|
125
120
|
} = t;
|
|
126
|
-
let l =
|
|
127
|
-
const
|
|
128
|
-
l === "S" ? (a.value = [], a.value =
|
|
129
|
-
},
|
|
130
|
-
const
|
|
131
|
-
a.value =
|
|
121
|
+
let l = t.config.selection ?? "N";
|
|
122
|
+
const m = (n, u) => {
|
|
123
|
+
l === "S" ? (a.value = [], a.value = u ? [n[e]] : []) : a.value = u ? a.value.concat(n[e]) : a.value.filter((g) => g !== n[e]), R("update:keys", a.value);
|
|
124
|
+
}, d = (n, u, g) => {
|
|
125
|
+
const w = g.map((y) => y[e]);
|
|
126
|
+
a.value = n ? a.value.concat(w) : a.value.filter((y) => !w.includes(y)), R("update:keys", a.value);
|
|
132
127
|
};
|
|
133
|
-
|
|
134
|
-
a.value =
|
|
128
|
+
G(() => t.keys, (n) => {
|
|
129
|
+
a.value = n;
|
|
135
130
|
});
|
|
136
|
-
const i =
|
|
137
|
-
return
|
|
131
|
+
const i = r(void 0);
|
|
132
|
+
return k(() => {
|
|
138
133
|
const {
|
|
139
|
-
selection:
|
|
134
|
+
selection: n
|
|
140
135
|
} = t.config;
|
|
141
|
-
l =
|
|
136
|
+
l = n, l !== "N" ? i.value = {
|
|
142
137
|
selectedRowKeys: a,
|
|
143
|
-
onSelect:
|
|
144
|
-
onSelectAll:
|
|
138
|
+
onSelect: m,
|
|
139
|
+
onSelectAll: d,
|
|
145
140
|
fixed: !0,
|
|
146
141
|
columnTitle: l === "S" ? "选择" : null,
|
|
147
142
|
columnWidth: l === "S" ? 60 : 40,
|
|
148
|
-
getCheckboxProps:
|
|
143
|
+
getCheckboxProps: o
|
|
149
144
|
} : i.value = void 0;
|
|
150
145
|
}), i;
|
|
151
146
|
}
|
|
152
|
-
const
|
|
153
|
-
function
|
|
147
|
+
const J = Q();
|
|
148
|
+
function Q() {
|
|
154
149
|
return (e) => {
|
|
155
|
-
let
|
|
150
|
+
let o;
|
|
156
151
|
const {
|
|
157
|
-
rowKey:
|
|
152
|
+
rowKey: l,
|
|
158
153
|
config: {
|
|
159
|
-
click:
|
|
160
|
-
dbClick:
|
|
161
|
-
selection:
|
|
162
|
-
getCheckboxProps:
|
|
154
|
+
click: m,
|
|
155
|
+
dbClick: d,
|
|
156
|
+
selection: i,
|
|
157
|
+
getCheckboxProps: n
|
|
163
158
|
}
|
|
164
|
-
} = t,
|
|
165
|
-
const
|
|
166
|
-
if (
|
|
159
|
+
} = t, u = e[l], g = () => {
|
|
160
|
+
const w = n === void 0 ? !1 : n(e).disabled;
|
|
161
|
+
if (i === "N" || w)
|
|
167
162
|
return;
|
|
168
|
-
a.value.some((
|
|
163
|
+
a.value.some((c) => c === u) ? a.value = a.value.filter((c) => c !== u) : (i === "S" && (a.value = []), a.value.push(u)), R("update:keys", a.value);
|
|
169
164
|
};
|
|
170
165
|
return {
|
|
171
166
|
onClick: () => {
|
|
172
|
-
clearTimeout(
|
|
173
|
-
|
|
167
|
+
clearTimeout(o), o = setTimeout(() => {
|
|
168
|
+
g(), m && m(e);
|
|
174
169
|
}, 200);
|
|
175
170
|
},
|
|
171
|
+
// 点击行
|
|
176
172
|
onDblclick: () => {
|
|
177
|
-
clearTimeout(
|
|
173
|
+
clearTimeout(o), d && d(e);
|
|
178
174
|
}
|
|
179
175
|
// onContextmenu: (event) => {
|
|
180
176
|
// //TODO
|
|
@@ -188,83 +184,80 @@ const ue = () => ({
|
|
|
188
184
|
};
|
|
189
185
|
};
|
|
190
186
|
}
|
|
191
|
-
const
|
|
187
|
+
const x = (e) => {
|
|
192
188
|
e.stopPropagation();
|
|
193
|
-
}, I =
|
|
189
|
+
}, I = S(() => {
|
|
194
190
|
const {
|
|
195
191
|
selection: e
|
|
196
192
|
} = t.config;
|
|
197
193
|
return e === "N";
|
|
198
|
-
}),
|
|
199
|
-
|
|
200
|
-
const L = () =>
|
|
194
|
+
}), N = {};
|
|
195
|
+
s.expandedRowRender && (N.expandedRowRender = (e) => f(z, null, [s.expandedRowRender && s.expandedRowRender(e)]));
|
|
196
|
+
const L = () => f(z, null, [s.summary && s.summary()]);
|
|
201
197
|
return () => {
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
ref: A,
|
|
198
|
+
var e;
|
|
199
|
+
return f("div", {
|
|
200
|
+
ref: j,
|
|
206
201
|
style: {
|
|
207
202
|
height: "100%"
|
|
208
203
|
}
|
|
209
|
-
}, [
|
|
204
|
+
}, [f(Z, {
|
|
210
205
|
ref: H,
|
|
211
206
|
"row-key": t.rowKey,
|
|
212
207
|
bordered: t.config.bordered,
|
|
213
|
-
columns:
|
|
214
|
-
dataSource:
|
|
208
|
+
columns: O.value,
|
|
209
|
+
dataSource: B.value,
|
|
215
210
|
loading: t.loading,
|
|
216
|
-
size: (
|
|
211
|
+
size: ((e = t.config) == null ? void 0 : e.size) ?? "small",
|
|
217
212
|
scroll: {
|
|
218
213
|
scrollToFirstRowOnChange: !0,
|
|
219
214
|
x: "100%",
|
|
220
|
-
y:
|
|
215
|
+
y: A.value + "px"
|
|
221
216
|
},
|
|
222
|
-
expandedRowKeys:
|
|
223
|
-
"onUpdate:expandedRowKeys": (
|
|
217
|
+
expandedRowKeys: C.value,
|
|
218
|
+
"onUpdate:expandedRowKeys": (o) => C.value = o,
|
|
224
219
|
expandRowByClick: I.value,
|
|
225
220
|
defaultExpandAllRows: t.defaultExpandAllRows,
|
|
226
221
|
pagination: !1,
|
|
227
|
-
customRow:
|
|
228
|
-
rowSelection:
|
|
229
|
-
rowClassName:
|
|
230
|
-
},
|
|
222
|
+
customRow: J,
|
|
223
|
+
rowSelection: q.value,
|
|
224
|
+
rowClassName: U
|
|
225
|
+
}, {
|
|
231
226
|
bodyCell: ({
|
|
232
|
-
column:
|
|
233
|
-
record:
|
|
227
|
+
column: o,
|
|
228
|
+
record: l
|
|
234
229
|
}) => {
|
|
235
|
-
if (
|
|
236
|
-
return
|
|
237
|
-
onClick:
|
|
238
|
-
onDblclick:
|
|
239
|
-
}, [
|
|
240
|
-
default: () => [
|
|
230
|
+
if (o.slot === "action")
|
|
231
|
+
return f("div", {
|
|
232
|
+
onClick: x,
|
|
233
|
+
onDblclick: x
|
|
234
|
+
}, [f(ee, null, {
|
|
235
|
+
default: () => [s.action && s.action(l)]
|
|
241
236
|
})]);
|
|
242
|
-
}
|
|
243
|
-
|
|
237
|
+
},
|
|
238
|
+
...N,
|
|
244
239
|
// 总结栏插槽
|
|
245
240
|
summary: L
|
|
246
|
-
})
|
|
247
|
-
default: () => [e]
|
|
248
|
-
}), Z(h(le, {
|
|
241
|
+
}), M(f(te, {
|
|
249
242
|
class: [K],
|
|
250
|
-
current:
|
|
251
|
-
"onUpdate:current": (
|
|
252
|
-
pageSize:
|
|
253
|
-
"onUpdate:pageSize": (
|
|
243
|
+
current: v.value.current,
|
|
244
|
+
"onUpdate:current": (o) => v.value.current = o,
|
|
245
|
+
pageSize: v.value.pageSize,
|
|
246
|
+
"onUpdate:pageSize": (o) => v.value.pageSize = o,
|
|
254
247
|
disabled: t.loading,
|
|
255
248
|
"show-size-changer": !0,
|
|
256
249
|
size: "default",
|
|
257
|
-
"hide-on-single-page":
|
|
258
|
-
"show-quick-jumper":
|
|
259
|
-
"default-page-size":
|
|
260
|
-
"page-size-options":
|
|
261
|
-
"show-total":
|
|
262
|
-
total:
|
|
263
|
-
onChange:
|
|
264
|
-
}, null), [[
|
|
250
|
+
"hide-on-single-page": b.hideOnSinglePage,
|
|
251
|
+
"show-quick-jumper": b.showQuickJumper,
|
|
252
|
+
"default-page-size": b.defaultPageSize,
|
|
253
|
+
"page-size-options": b.pageSizeOptions,
|
|
254
|
+
"show-total": b.showTotal,
|
|
255
|
+
total: v.value.total,
|
|
256
|
+
onChange: D
|
|
257
|
+
}, null), [[Y, t.config.pagination]])]);
|
|
265
258
|
};
|
|
266
259
|
}
|
|
267
260
|
});
|
|
268
261
|
export {
|
|
269
|
-
|
|
262
|
+
ce as default
|
|
270
263
|
};
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
export declare const DTable: import("../../utils/install").SFCWithInstall<import("vue").DefineComponent<{
|
|
2
|
+
data: {
|
|
3
|
+
type: import("vue").PropType<any>;
|
|
4
|
+
required: boolean;
|
|
5
|
+
};
|
|
6
|
+
height: {
|
|
7
|
+
type: import("vue").PropType<number>;
|
|
8
|
+
default: number;
|
|
9
|
+
};
|
|
10
|
+
keys: import("vue").PropType<import("./interface/table").Key[] | undefined>;
|
|
11
|
+
rowKey: {
|
|
12
|
+
type: import("vue").PropType<string>;
|
|
13
|
+
default: string;
|
|
14
|
+
};
|
|
15
|
+
loading: {
|
|
16
|
+
type: import("vue").PropType<false | undefined>;
|
|
17
|
+
default: boolean;
|
|
18
|
+
};
|
|
19
|
+
pagination: {
|
|
20
|
+
type: import("vue").PropType<any>;
|
|
21
|
+
default: () => {};
|
|
22
|
+
};
|
|
23
|
+
config: {
|
|
24
|
+
type: import("vue").PropType<import("./interface/table").Config>;
|
|
25
|
+
default: () => {};
|
|
26
|
+
};
|
|
27
|
+
expandedRowKeys: {
|
|
28
|
+
type: import("vue").PropType<string[] | undefined>;
|
|
29
|
+
default: () => never[];
|
|
30
|
+
};
|
|
31
|
+
defaultExpandAllRows: import("vue").PropType<boolean | undefined>;
|
|
32
|
+
default: () => boolean;
|
|
33
|
+
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "update:keys"[], "update:keys", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
34
|
+
data: {
|
|
35
|
+
type: import("vue").PropType<any>;
|
|
36
|
+
required: boolean;
|
|
37
|
+
};
|
|
38
|
+
height: {
|
|
39
|
+
type: import("vue").PropType<number>;
|
|
40
|
+
default: number;
|
|
41
|
+
};
|
|
42
|
+
keys: import("vue").PropType<import("./interface/table").Key[] | undefined>;
|
|
43
|
+
rowKey: {
|
|
44
|
+
type: import("vue").PropType<string>;
|
|
45
|
+
default: string;
|
|
46
|
+
};
|
|
47
|
+
loading: {
|
|
48
|
+
type: import("vue").PropType<false | undefined>;
|
|
49
|
+
default: boolean;
|
|
50
|
+
};
|
|
51
|
+
pagination: {
|
|
52
|
+
type: import("vue").PropType<any>;
|
|
53
|
+
default: () => {};
|
|
54
|
+
};
|
|
55
|
+
config: {
|
|
56
|
+
type: import("vue").PropType<import("./interface/table").Config>;
|
|
57
|
+
default: () => {};
|
|
58
|
+
};
|
|
59
|
+
expandedRowKeys: {
|
|
60
|
+
type: import("vue").PropType<string[] | undefined>;
|
|
61
|
+
default: () => never[];
|
|
62
|
+
};
|
|
63
|
+
defaultExpandAllRows: import("vue").PropType<boolean | undefined>;
|
|
64
|
+
default: () => boolean;
|
|
65
|
+
}>> & {
|
|
66
|
+
"onUpdate:keys"?: ((...args: any[]) => any) | undefined;
|
|
67
|
+
}, {
|
|
68
|
+
height: number;
|
|
69
|
+
loading: false | undefined;
|
|
70
|
+
rowKey: string;
|
|
71
|
+
pagination: any;
|
|
72
|
+
config: import("./interface/table").Config;
|
|
73
|
+
expandedRowKeys: string[] | undefined;
|
|
74
|
+
}>>;
|
|
75
|
+
export default DTable;
|
package/package.json
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
+
import { useElementSize } from "@vueuse/core";
|
|
3
|
+
|
|
2
4
|
import {
|
|
3
5
|
useSlots,
|
|
4
6
|
ref,
|
|
@@ -35,12 +37,12 @@ const height = ref(0);
|
|
|
35
37
|
|
|
36
38
|
let stopHandleWatch: WatchStopHandle;
|
|
37
39
|
|
|
38
|
-
nextTick(() => {
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
});
|
|
40
|
+
// nextTick(() => {
|
|
41
|
+
// setTimeout(() => {
|
|
42
|
+
// height.value = tableRef?.value?.offsetHeight;
|
|
43
|
+
// show.value = true;
|
|
44
|
+
// }, 1);
|
|
45
|
+
// });
|
|
44
46
|
|
|
45
47
|
watch(
|
|
46
48
|
() => configProvider?.componentSize,
|
|
@@ -91,6 +93,21 @@ function useWatch() {
|
|
|
91
93
|
}
|
|
92
94
|
);
|
|
93
95
|
}
|
|
96
|
+
|
|
97
|
+
// 监听表单高度变化
|
|
98
|
+
// 然后再获取表格高度
|
|
99
|
+
const formRef = ref(null);
|
|
100
|
+
const { height: formHeight } = useElementSize(formRef);
|
|
101
|
+
watch(
|
|
102
|
+
() => formHeight.value,
|
|
103
|
+
(val) => {
|
|
104
|
+
show.value = false;
|
|
105
|
+
setTimeout(() => {
|
|
106
|
+
height.value = tableRef?.value?.offsetHeight;
|
|
107
|
+
show.value = true;
|
|
108
|
+
}, 10);
|
|
109
|
+
}
|
|
110
|
+
);
|
|
94
111
|
</script>
|
|
95
112
|
<script lang="ts">
|
|
96
113
|
export default {
|
|
@@ -119,7 +136,7 @@ export default {
|
|
|
119
136
|
</a-space>
|
|
120
137
|
</div>
|
|
121
138
|
<div ref="tableRef" style="flex: 1">
|
|
122
|
-
<div style="height: 100%"
|
|
139
|
+
<div v-show="show" style="height: 100%">
|
|
123
140
|
<slot name="table" :height="height" />
|
|
124
141
|
</div>
|
|
125
142
|
</div>
|
|
@@ -1,19 +1,17 @@
|
|
|
1
1
|
import {
|
|
2
2
|
computed,
|
|
3
|
-
createVNode,
|
|
4
3
|
defineComponent,
|
|
5
4
|
nextTick,
|
|
6
5
|
PropType,
|
|
7
|
-
reactive,
|
|
8
6
|
ref,
|
|
9
7
|
watch,
|
|
10
8
|
watchEffect
|
|
11
9
|
} from "vue";
|
|
12
|
-
import { Pagination, Space, Table
|
|
10
|
+
import { Pagination, Space, Table } from "ant-design-vue";
|
|
13
11
|
import { useEleHeight } from "../../utils/html";
|
|
14
12
|
import { prefixName } from "../theme";
|
|
15
13
|
|
|
16
|
-
import type { TableProps, Key
|
|
14
|
+
import type { TableProps, Key } from "./interface/table";
|
|
17
15
|
/**
|
|
18
16
|
* 表格组件 基于TSX封装ATable
|
|
19
17
|
*/
|
|
@@ -80,11 +78,6 @@ const paginationConfig = {
|
|
|
80
78
|
//分页class名称
|
|
81
79
|
const basePageClassName = `${prefixName}-pagination`;
|
|
82
80
|
|
|
83
|
-
const configDefault: Config = {
|
|
84
|
-
selection: "N",
|
|
85
|
-
bordered: true
|
|
86
|
-
};
|
|
87
|
-
|
|
88
81
|
/**
|
|
89
82
|
* 表格组件定义
|
|
90
83
|
*/
|
|
@@ -383,6 +376,7 @@ const DXTable = defineComponent({
|
|
|
383
376
|
const summary = () => {
|
|
384
377
|
return <>{slots.summary && slots.summary()}</>;
|
|
385
378
|
};
|
|
379
|
+
|
|
386
380
|
return () => (
|
|
387
381
|
<div ref={tableRootRef} style={{ height: "100%" }}>
|
|
388
382
|
<Table
|