ele-admin-plus 1.1.9-beta.8 → 1.1.9-beta.9
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/ele-app/el.d.ts +6 -1
- package/es/ele-app/plus.d.ts +9 -0
- package/es/ele-config-provider/index.d.ts +2 -2
- package/es/ele-config-provider/props.d.ts +3 -3
- package/es/ele-config-provider/props.js +2 -2
- package/es/ele-config-provider/types.d.ts +2 -0
- package/es/ele-data-table/index.d.ts +2 -2
- package/es/ele-data-table/index.js +8 -0
- package/es/ele-data-table/style/index.scss +4 -0
- package/es/ele-data-table/types.d.ts +10 -0
- package/es/ele-data-table/util.d.ts +5 -0
- package/es/ele-data-table/util.js +14 -0
- package/es/ele-modal/style/index.scss +18 -29
- package/es/ele-pagination/index.d.ts +4 -2
- package/es/ele-pagination/index.js +17 -5
- package/es/ele-pagination/props.d.ts +3 -2
- package/es/ele-pagination/props.js +2 -0
- package/es/ele-pagination/style/index.scss +9 -0
- package/es/ele-pagination/types.d.ts +6 -1
- package/es/ele-printer/util.js +1 -1
- package/es/ele-pro-table/components/table-tools.d.ts +99 -8
- package/es/ele-pro-table/components/table-tools.js +125 -8
- package/es/ele-pro-table/components/tool-column-list.js +1 -0
- package/es/ele-pro-table/components/tool-column.js +6 -2
- package/es/ele-pro-table/components/tool-export.d.ts +457 -0
- package/es/ele-pro-table/components/tool-export.js +451 -0
- package/es/ele-pro-table/components/tool-print-body-cell.d.ts +34 -0
- package/es/ele-pro-table/components/tool-print-body-cell.js +88 -0
- package/es/ele-pro-table/components/tool-print-header-cell.d.ts +34 -0
- package/es/ele-pro-table/components/tool-print-header-cell.js +88 -0
- package/es/ele-pro-table/components/tool-print.d.ts +899 -0
- package/es/ele-pro-table/components/tool-print.js +547 -0
- package/es/ele-pro-table/index.d.ts +28 -9
- package/es/ele-pro-table/index.js +56 -8
- package/es/ele-pro-table/props.d.ts +11 -5
- package/es/ele-pro-table/props.js +6 -2
- package/es/ele-pro-table/style/index.js +9 -0
- package/es/ele-pro-table/style/index.scss +33 -5
- package/es/ele-pro-table/types.d.ts +147 -5
- package/es/ele-pro-table/util.d.ts +47 -3
- package/es/ele-pro-table/util.js +119 -13
- package/es/ele-table/index.d.ts +3 -0
- package/es/ele-table/index.js +2 -1
- package/es/ele-table/props.d.ts +2 -0
- package/es/ele-table/props.js +3 -1
- package/es/ele-table/style/index.scss +35 -0
- package/es/ele-tool/index.d.ts +1 -1
- package/es/ele-tool/index.js +2 -4
- package/es/ele-tool/props.d.ts +7 -0
- package/es/ele-tool/props.js +5 -0
- package/es/ele-virtual-table/components/body-cell.d.ts +0 -1
- package/es/ele-virtual-table/components/body-cell.js +32 -47
- package/es/ele-virtual-table/components/footer-row.d.ts +2 -2
- package/es/ele-virtual-table/components/footer-row.js +15 -10
- package/es/ele-virtual-table/types.d.ts +15 -1
- package/es/ele-virtual-table/util.d.ts +26 -3
- package/es/ele-virtual-table/util.js +44 -0
- package/es/icons/PrinterOutlined.d.ts +2 -0
- package/es/icons/PrinterOutlined.js +29 -0
- package/es/icons/VerticalLeftOutlined.js +2 -2
- package/es/icons/VerticalRightOutlined.js +2 -2
- package/es/icons/index.d.ts +1 -0
- package/es/icons/index.js +58 -56
- package/es/lang/en_US.js +13 -2
- package/es/lang/zh_CN.js +13 -2
- package/es/lang/zh_TW.js +12 -1
- package/es/utils/resolvers.js +2 -2
- package/lib/ele-app/el.d.ts +6 -1
- package/lib/ele-app/plus.d.ts +9 -0
- package/lib/ele-config-provider/index.d.ts +2 -2
- package/lib/ele-config-provider/props.cjs +2 -2
- package/lib/ele-config-provider/props.d.ts +3 -3
- package/lib/ele-config-provider/types.d.ts +2 -0
- package/lib/ele-data-table/index.cjs +8 -0
- package/lib/ele-data-table/index.d.ts +2 -2
- package/lib/ele-data-table/style/index.scss +4 -0
- package/lib/ele-data-table/types.d.ts +10 -0
- package/lib/ele-data-table/util.cjs +14 -0
- package/lib/ele-data-table/util.d.ts +5 -0
- package/lib/ele-modal/style/index.scss +18 -29
- package/lib/ele-pagination/index.cjs +16 -4
- package/lib/ele-pagination/index.d.ts +4 -2
- package/lib/ele-pagination/props.cjs +2 -0
- package/lib/ele-pagination/props.d.ts +3 -2
- package/lib/ele-pagination/style/index.scss +9 -0
- package/lib/ele-pagination/types.d.ts +6 -1
- package/lib/ele-printer/util.cjs +1 -1
- package/lib/ele-pro-table/components/table-tools.cjs +124 -7
- package/lib/ele-pro-table/components/table-tools.d.ts +99 -8
- package/lib/ele-pro-table/components/tool-column-list.cjs +1 -0
- package/lib/ele-pro-table/components/tool-column.cjs +6 -2
- package/lib/ele-pro-table/components/tool-export.cjs +450 -0
- package/lib/ele-pro-table/components/tool-export.d.ts +457 -0
- package/lib/ele-pro-table/components/tool-print-body-cell.cjs +87 -0
- package/lib/ele-pro-table/components/tool-print-body-cell.d.ts +34 -0
- package/lib/ele-pro-table/components/tool-print-header-cell.cjs +87 -0
- package/lib/ele-pro-table/components/tool-print-header-cell.d.ts +34 -0
- package/lib/ele-pro-table/components/tool-print.cjs +546 -0
- package/lib/ele-pro-table/components/tool-print.d.ts +899 -0
- package/lib/ele-pro-table/index.cjs +56 -8
- package/lib/ele-pro-table/index.d.ts +28 -9
- package/lib/ele-pro-table/props.cjs +6 -2
- package/lib/ele-pro-table/props.d.ts +11 -5
- package/lib/ele-pro-table/style/index.cjs +9 -0
- package/lib/ele-pro-table/style/index.scss +33 -5
- package/lib/ele-pro-table/types.d.ts +147 -5
- package/lib/ele-pro-table/util.cjs +119 -13
- package/lib/ele-pro-table/util.d.ts +47 -3
- package/lib/ele-table/index.cjs +2 -1
- package/lib/ele-table/index.d.ts +3 -0
- package/lib/ele-table/props.cjs +3 -1
- package/lib/ele-table/props.d.ts +2 -0
- package/lib/ele-table/style/index.scss +35 -0
- package/lib/ele-tool/index.cjs +1 -3
- package/lib/ele-tool/index.d.ts +1 -1
- package/lib/ele-tool/props.cjs +5 -0
- package/lib/ele-tool/props.d.ts +7 -0
- package/lib/ele-virtual-table/components/body-cell.cjs +31 -46
- package/lib/ele-virtual-table/components/body-cell.d.ts +0 -1
- package/lib/ele-virtual-table/components/footer-row.cjs +13 -8
- package/lib/ele-virtual-table/components/footer-row.d.ts +2 -2
- package/lib/ele-virtual-table/types.d.ts +15 -1
- package/lib/ele-virtual-table/util.cjs +44 -0
- package/lib/ele-virtual-table/util.d.ts +26 -3
- package/lib/icons/PrinterOutlined.cjs +28 -0
- package/lib/icons/PrinterOutlined.d.ts +2 -0
- package/lib/icons/VerticalLeftOutlined.cjs +2 -2
- package/lib/icons/VerticalRightOutlined.cjs +2 -2
- package/lib/icons/index.cjs +2 -0
- package/lib/icons/index.d.ts +1 -0
- package/lib/lang/en_US.cjs +13 -2
- package/lib/lang/zh_CN.cjs +13 -2
- package/lib/lang/zh_TW.cjs +12 -1
- package/lib/utils/resolvers.cjs +2 -2
- package/package.json +1 -1
package/es/ele-app/el.d.ts
CHANGED
|
@@ -49,13 +49,16 @@ import type {
|
|
|
49
49
|
ElImage,
|
|
50
50
|
ElScrollbar,
|
|
51
51
|
ElTreeV2,
|
|
52
|
-
|
|
52
|
+
ElForm,
|
|
53
|
+
ElFormItem,
|
|
54
|
+
FormItemRule
|
|
53
55
|
} from 'element-plus';
|
|
54
56
|
import type { dropdownProps } from 'element-plus';
|
|
55
57
|
import type { dropdownItemProps } from 'element-plus';
|
|
56
58
|
import type columnProps from 'element-plus/es/components/table/src/table-column/defaults';
|
|
57
59
|
import type { TreeProps } from 'element-plus/es/components/tree-v2/src/types';
|
|
58
60
|
import type { ComponentProps } from './types';
|
|
61
|
+
export type ElFormItemRule = FormItemRule;
|
|
59
62
|
|
|
60
63
|
/**
|
|
61
64
|
* 组件属性
|
|
@@ -173,4 +176,6 @@ export type ElScrollbarInstance = InstanceType<typeof ElScrollbar> | null;
|
|
|
173
176
|
|
|
174
177
|
export type ElTreeV2Instance = InstanceType<typeof ElTreeV2> | null;
|
|
175
178
|
|
|
179
|
+
export type ElFormInstance = InstanceType<typeof ElForm> | null;
|
|
180
|
+
|
|
176
181
|
export type ElFormItemInstance = InstanceType<typeof ElFormItem> | null;
|
package/es/ele-app/plus.d.ts
CHANGED
|
@@ -14,11 +14,14 @@ import type { PopoverProps } from '../ele-popover/props';
|
|
|
14
14
|
import type ElePopover from '../ele-popover/index';
|
|
15
15
|
import type { ProTableProps } from '../ele-pro-table/props';
|
|
16
16
|
import type EleProTable from '../ele-pro-table/index';
|
|
17
|
+
import type { PrinterProps } from '../ele-printer/props';
|
|
17
18
|
import type EleTabs from '../ele-tabs/index';
|
|
19
|
+
import type { TableProps } from '../ele-table/props';
|
|
18
20
|
import type { TextProps } from '../ele-text/props';
|
|
19
21
|
import type EleText from '../ele-text/index';
|
|
20
22
|
import type { ToolbarProps } from '../ele-toolbar/props';
|
|
21
23
|
import type { TooltipProps } from '../ele-tooltip/props';
|
|
24
|
+
import type { ToolProps } from '../ele-tool/props';
|
|
22
25
|
import type EleTooltip from '../ele-tooltip/index';
|
|
23
26
|
import type EleVirtualTable from '../ele-virtual-table/index';
|
|
24
27
|
import type ReceiverView from '../ele-config-provider/components/receiver-view';
|
|
@@ -46,12 +49,18 @@ export type ElePopoverProps = Partial<PopoverProps>;
|
|
|
46
49
|
|
|
47
50
|
export type EleProTableProps = ComponentProps<ProTableProps>;
|
|
48
51
|
|
|
52
|
+
export type ElePrinterProps = ComponentProps<PrinterProps>;
|
|
53
|
+
|
|
54
|
+
export type EleTableProps = ComponentProps<TableProps>;
|
|
55
|
+
|
|
49
56
|
export type EleTextProps = ComponentProps<TextProps>;
|
|
50
57
|
|
|
51
58
|
export type EleToolbarProps = ComponentProps<ToolbarProps>;
|
|
52
59
|
|
|
53
60
|
export type EleTooltipProps = Partial<TooltipProps>;
|
|
54
61
|
|
|
62
|
+
export type EleToolProps = Partial<ToolProps>;
|
|
63
|
+
|
|
55
64
|
/**
|
|
56
65
|
* 组件实例
|
|
57
66
|
*/
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
declare const _default: import("vue").DefineComponent<{
|
|
2
2
|
locale: import("vue").PropType<import("./types").EleLocale>;
|
|
3
|
-
table: import("vue").PropType<Partial<Pick<import("../ele-app/plus").EleProTableProps, "size" | "stripe" | "border" | "emptyProps" | "request" | "response" | "parseData" | "tools" | "maximizedIndex" | "pagination">>>;
|
|
3
|
+
table: import("vue").PropType<Partial<Pick<import("../ele-app/plus").EleProTableProps, "size" | "stripe" | "border" | "emptyProps" | "request" | "response" | "parseData" | "tools" | "maximizedIndex" | "pagination" | "exportConfig" | "printConfig">>>;
|
|
4
4
|
mapKey: StringConstructor;
|
|
5
5
|
license: StringConstructor;
|
|
6
6
|
}, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
7
7
|
[key: string]: any;
|
|
8
8
|
}>[] | undefined, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
9
9
|
locale: import("vue").PropType<import("./types").EleLocale>;
|
|
10
|
-
table: import("vue").PropType<Partial<Pick<import("../ele-app/plus").EleProTableProps, "size" | "stripe" | "border" | "emptyProps" | "request" | "response" | "parseData" | "tools" | "maximizedIndex" | "pagination">>>;
|
|
10
|
+
table: import("vue").PropType<Partial<Pick<import("../ele-app/plus").EleProTableProps, "size" | "stripe" | "border" | "emptyProps" | "request" | "response" | "parseData" | "tools" | "maximizedIndex" | "pagination" | "exportConfig" | "printConfig">>>;
|
|
11
11
|
mapKey: StringConstructor;
|
|
12
12
|
license: StringConstructor;
|
|
13
13
|
}>>, {}, {}>;
|
|
@@ -7,10 +7,10 @@ export declare const configProviderProps: {
|
|
|
7
7
|
/** 国际化 */
|
|
8
8
|
locale: PropType<EleLocale>;
|
|
9
9
|
/** 表格全局配置 */
|
|
10
|
-
table: PropType<Partial<Pick<import("../ele-app/plus").EleProTableProps, "size" | "stripe" | "border" | "tools" | "emptyProps" | "request" | "response" | "parseData" | "maximizedIndex" | "pagination">>>;
|
|
11
|
-
/**
|
|
10
|
+
table: PropType<Partial<Pick<import("../ele-app/plus").EleProTableProps, "size" | "stripe" | "border" | "tools" | "emptyProps" | "request" | "response" | "parseData" | "maximizedIndex" | "pagination" | "exportConfig" | "printConfig">>>;
|
|
11
|
+
/** 高德地图key */
|
|
12
12
|
mapKey: StringConstructor;
|
|
13
|
-
/**
|
|
13
|
+
/** license */
|
|
14
14
|
license: StringConstructor;
|
|
15
15
|
};
|
|
16
16
|
export type ConfigProviderProps = ExtractPropTypes<typeof configProviderProps>;
|
|
@@ -141,7 +141,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
141
141
|
clearFilter: (columnKeys?: string[] | undefined) => void;
|
|
142
142
|
doLayout: () => void;
|
|
143
143
|
sort: (prop: string, order: string) => void;
|
|
144
|
-
scrollTo: (options: number | ScrollToOptions, yCoord?: number | undefined) => void;
|
|
144
|
+
scrollTo: (options: number | ScrollToOptions, yCoord?: number | undefined) => void;
|
|
145
145
|
setScrollTop: (top?: number | undefined) => void;
|
|
146
146
|
setScrollLeft: (left?: number | undefined) => void;
|
|
147
147
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
@@ -155,7 +155,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
155
155
|
cellContextmenu: (_row: DataItem, _column: Column, _cell: HTMLTableCellElement, _e: MouseEvent) => boolean;
|
|
156
156
|
rowClick: (_row: DataItem, _column: Column, _e: MouseEvent) => boolean;
|
|
157
157
|
rowContextmenu: (_row: DataItem, _column: Column, _e: MouseEvent) => boolean;
|
|
158
|
-
rowDblclick: (_row: DataItem, _column: Column, _e: MouseEvent) => boolean;
|
|
158
|
+
rowDblclick: (_row: DataItem, _column: Column, _e: MouseEvent) => boolean;
|
|
159
159
|
headerClick: (_column: Column, _e: MouseEvent) => boolean;
|
|
160
160
|
headerContextmenu: (_column: Column, _e: MouseEvent) => boolean;
|
|
161
161
|
sortChange: (_sorter: Sorter) => boolean;
|
|
@@ -30,6 +30,13 @@ const index = defineComponent({
|
|
|
30
30
|
var _a;
|
|
31
31
|
return ((_a = props.treeProps) == null ? void 0 : _a.children) || "children";
|
|
32
32
|
});
|
|
33
|
+
const updateScrollBar = () => {
|
|
34
|
+
var _a;
|
|
35
|
+
const scrollBarRef = (_a = tableRef.value) == null ? void 0 : _a.scrollBarRef;
|
|
36
|
+
if (scrollBarRef && typeof scrollBarRef.update === "function") {
|
|
37
|
+
scrollBarRef.update();
|
|
38
|
+
}
|
|
39
|
+
};
|
|
33
40
|
const clearSort = () => {
|
|
34
41
|
methods.clearSort();
|
|
35
42
|
tableState.sorter = {};
|
|
@@ -226,6 +233,7 @@ const index = defineComponent({
|
|
|
226
233
|
tableCols.value = cols;
|
|
227
234
|
nextTick(() => {
|
|
228
235
|
methods.doLayout();
|
|
236
|
+
updateScrollBar();
|
|
229
237
|
if (sorter) {
|
|
230
238
|
methods.sort(sorter.prop, sorter.order || "ascending");
|
|
231
239
|
}
|
|
@@ -240,7 +240,17 @@ export type SpanMethod = ElTableProps<DataItem>['spanMethod'];
|
|
|
240
240
|
*/
|
|
241
241
|
export type RowKey = ElTableProps<DataItem>['rowKey'];
|
|
242
242
|
|
|
243
|
+
/**
|
|
244
|
+
* 表尾合计计算方法
|
|
245
|
+
*/
|
|
246
|
+
export type SummaryMethod = ElTableProps<DataItem>['summaryMethod'];
|
|
247
|
+
|
|
243
248
|
/**
|
|
244
249
|
* 控制行是否可选中的方法
|
|
245
250
|
*/
|
|
246
251
|
export type RowSelectable = Column['selectable'];
|
|
252
|
+
|
|
253
|
+
/**
|
|
254
|
+
* 序号列起始索引
|
|
255
|
+
*/
|
|
256
|
+
export type ColumnIndex = Column['index'];
|
|
@@ -137,6 +137,11 @@ export declare function isReserveChecked(columns?: Columns): boolean;
|
|
|
137
137
|
* @param fixed 固定值
|
|
138
138
|
*/
|
|
139
139
|
export declare function getColFixedNumber(fixed?: boolean | string): 0 | 1 | 2;
|
|
140
|
+
/**
|
|
141
|
+
* 获取列类名
|
|
142
|
+
* @param col 列属性
|
|
143
|
+
*/
|
|
144
|
+
export declare function getCellClass(col: Column): string | undefined;
|
|
140
145
|
/**
|
|
141
146
|
* 获取数据值
|
|
142
147
|
* @param rows 数据
|
|
@@ -27,6 +27,8 @@ function getCols(cols, pageIndex, slots, slotNormalize, globalTooltip) {
|
|
|
27
27
|
{
|
|
28
28
|
...omit(col, [
|
|
29
29
|
"showOverflowTooltip",
|
|
30
|
+
"columnKey",
|
|
31
|
+
"className",
|
|
30
32
|
"uid",
|
|
31
33
|
"slot",
|
|
32
34
|
"headerSlot",
|
|
@@ -39,6 +41,7 @@ function getCols(cols, pageIndex, slots, slotNormalize, globalTooltip) {
|
|
|
39
41
|
globalTooltip
|
|
40
42
|
),
|
|
41
43
|
columnKey: col.columnKey ?? col.prop,
|
|
44
|
+
className: getCellClass(col),
|
|
42
45
|
index: col.index ?? pageIndex,
|
|
43
46
|
key: col.uid
|
|
44
47
|
},
|
|
@@ -256,6 +259,16 @@ function getColFixedNumber(fixed) {
|
|
|
256
259
|
}
|
|
257
260
|
return 1;
|
|
258
261
|
}
|
|
262
|
+
function getCellClass(col) {
|
|
263
|
+
const classes = [];
|
|
264
|
+
if (col.type === "index") {
|
|
265
|
+
classes.push("is-index");
|
|
266
|
+
}
|
|
267
|
+
if (col.className) {
|
|
268
|
+
classes.push(col.className);
|
|
269
|
+
}
|
|
270
|
+
return classes.length ? classes.join(" ") : void 0;
|
|
271
|
+
}
|
|
259
272
|
function getRowKeys(rows, rowKey) {
|
|
260
273
|
const keys = [];
|
|
261
274
|
if (rows) {
|
|
@@ -455,6 +468,7 @@ function useEmits(emit) {
|
|
|
455
468
|
export {
|
|
456
469
|
arrayIsChanged,
|
|
457
470
|
getBodyRowClass,
|
|
471
|
+
getCellClass,
|
|
458
472
|
getColFixedNumber,
|
|
459
473
|
getCols,
|
|
460
474
|
getEmptyProps,
|
|
@@ -22,6 +22,7 @@
|
|
|
22
22
|
position: relative;
|
|
23
23
|
background: eleVar('modal', 'bg');
|
|
24
24
|
border-radius: eleVar('modal', 'radius');
|
|
25
|
+
margin-bottom: eleVar('modal', 'mobile-space');
|
|
25
26
|
|
|
26
27
|
& > .el-dialog__header,
|
|
27
28
|
& > .el-dialog__footer {
|
|
@@ -105,52 +106,40 @@
|
|
|
105
106
|
}
|
|
106
107
|
|
|
107
108
|
/* 默认位置 */
|
|
108
|
-
.ele-modal-
|
|
109
|
-
.ele-modal-top > .el-overlay-dialog > .el-dialog,
|
|
110
|
-
.ele-modal-bottom > .el-overlay-dialog > .el-dialog,
|
|
111
|
-
.ele-modal-left > .el-overlay-dialog > .el-dialog,
|
|
112
|
-
.ele-modal-right > .el-overlay-dialog > .el-dialog,
|
|
113
|
-
.ele-modal-left-top > .el-overlay-dialog > .el-dialog,
|
|
114
|
-
.ele-modal-left-bottom > .el-overlay-dialog > .el-dialog,
|
|
115
|
-
.ele-modal-right-top > .el-overlay-dialog > .el-dialog,
|
|
116
|
-
.ele-modal-right-bottom > .el-overlay-dialog > .el-dialog {
|
|
109
|
+
.ele-modal-top > .el-overlay-dialog > .el-dialog {
|
|
117
110
|
margin: 0;
|
|
118
111
|
}
|
|
119
112
|
|
|
120
|
-
.ele-modal-center > .el-overlay-dialog {
|
|
121
|
-
|
|
113
|
+
.ele-modal-center > .el-overlay-dialog > .el-dialog {
|
|
114
|
+
margin: auto;
|
|
122
115
|
}
|
|
123
116
|
|
|
124
|
-
.ele-modal-bottom > .el-overlay-dialog {
|
|
125
|
-
|
|
117
|
+
.ele-modal-bottom > .el-overlay-dialog > .el-dialog {
|
|
118
|
+
margin: auto auto 0 auto;
|
|
126
119
|
}
|
|
127
120
|
|
|
128
|
-
.ele-modal-left > .el-overlay-dialog {
|
|
129
|
-
|
|
130
|
-
align-items: flex-start;
|
|
121
|
+
.ele-modal-left > .el-overlay-dialog > .el-dialog {
|
|
122
|
+
margin: auto auto auto 0;
|
|
131
123
|
}
|
|
132
124
|
|
|
133
|
-
.ele-modal-right > .el-overlay-dialog {
|
|
134
|
-
|
|
135
|
-
align-items: flex-end;
|
|
125
|
+
.ele-modal-right > .el-overlay-dialog > .el-dialog {
|
|
126
|
+
margin: auto 0 auto auto;
|
|
136
127
|
}
|
|
137
128
|
|
|
138
|
-
.ele-modal-left-top > .el-overlay-dialog {
|
|
139
|
-
|
|
129
|
+
.ele-modal-left-top > .el-overlay-dialog > .el-dialog {
|
|
130
|
+
margin: 0 auto 0 0;
|
|
140
131
|
}
|
|
141
132
|
|
|
142
|
-
.ele-modal-left-bottom > .el-overlay-dialog {
|
|
143
|
-
|
|
144
|
-
align-items: flex-start;
|
|
133
|
+
.ele-modal-left-bottom > .el-overlay-dialog > .el-dialog {
|
|
134
|
+
margin: auto auto 0 0;
|
|
145
135
|
}
|
|
146
136
|
|
|
147
|
-
.ele-modal-right-top > .el-overlay-dialog {
|
|
148
|
-
|
|
137
|
+
.ele-modal-right-top > .el-overlay-dialog > .el-dialog {
|
|
138
|
+
margin: 0 0 0 auto;
|
|
149
139
|
}
|
|
150
140
|
|
|
151
|
-
.ele-modal-right-bottom > .el-overlay-dialog {
|
|
152
|
-
|
|
153
|
-
align-items: flex-end;
|
|
141
|
+
.ele-modal-right-bottom > .el-overlay-dialog > .el-dialog {
|
|
142
|
+
margin: auto 0 0 auto;
|
|
154
143
|
}
|
|
155
144
|
|
|
156
145
|
/* 支持拖拽 */
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
declare const _default: import("vue").DefineComponent<{
|
|
2
|
+
total: import("vue").PropType<import("./types").PaginationTotal>;
|
|
2
3
|
type: {
|
|
3
4
|
type: import("vue").PropType<import("./types").PaginationType>;
|
|
4
5
|
default: string;
|
|
5
6
|
};
|
|
6
7
|
pageSize: NumberConstructor;
|
|
7
8
|
defaultPageSize: NumberConstructor;
|
|
8
|
-
total: NumberConstructor;
|
|
9
9
|
pageCount: NumberConstructor;
|
|
10
10
|
pagerCount: import("element-plus/es/utils/index").EpPropFinalized<NumberConstructor, unknown, unknown, 7, boolean>;
|
|
11
11
|
currentPage: NumberConstructor;
|
|
@@ -23,19 +23,21 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
23
23
|
disabled: BooleanConstructor;
|
|
24
24
|
hideOnSinglePage: BooleanConstructor;
|
|
25
25
|
}, {
|
|
26
|
+
isInfinite: import("vue").ComputedRef<boolean>;
|
|
27
|
+
pageTotal: import("vue").ComputedRef<number | undefined>;
|
|
26
28
|
onUpdateCurrentPage: (currentPage: number) => void;
|
|
27
29
|
onUpdatePageSize: (pageSize: number) => void;
|
|
28
30
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
29
31
|
'update:currentPage': (_currentPage: number) => boolean;
|
|
30
32
|
'update:pageSize': (_pageSize: number) => boolean;
|
|
31
33
|
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
34
|
+
total: import("vue").PropType<import("./types").PaginationTotal>;
|
|
32
35
|
type: {
|
|
33
36
|
type: import("vue").PropType<import("./types").PaginationType>;
|
|
34
37
|
default: string;
|
|
35
38
|
};
|
|
36
39
|
pageSize: NumberConstructor;
|
|
37
40
|
defaultPageSize: NumberConstructor;
|
|
38
|
-
total: NumberConstructor;
|
|
39
41
|
pageCount: NumberConstructor;
|
|
40
42
|
pagerCount: import("element-plus/es/utils/index").EpPropFinalized<NumberConstructor, unknown, unknown, 7, boolean>;
|
|
41
43
|
currentPage: NumberConstructor;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent, resolveComponent, openBlock, createBlock, normalizeClass, createSlots, renderList, withCtx, renderSlot, normalizeProps, guardReactiveProps } from "vue";
|
|
1
|
+
import { defineComponent, computed, resolveComponent, openBlock, createBlock, normalizeClass, createSlots, renderList, withCtx, renderSlot, normalizeProps, guardReactiveProps } from "vue";
|
|
2
2
|
import { ElPagination } from "element-plus";
|
|
3
3
|
import { paginationProps, paginationEmits } from "./props";
|
|
4
4
|
const _sfc_main = defineComponent({
|
|
@@ -6,14 +6,22 @@ const _sfc_main = defineComponent({
|
|
|
6
6
|
components: { ElPagination },
|
|
7
7
|
props: paginationProps,
|
|
8
8
|
emits: paginationEmits,
|
|
9
|
-
setup(
|
|
9
|
+
setup(props, { emit }) {
|
|
10
|
+
const isInfinite = computed(() => "*" === props.total);
|
|
11
|
+
const pageTotal = computed(() => {
|
|
12
|
+
if (isInfinite.value) {
|
|
13
|
+
return Number.MAX_SAFE_INTEGER;
|
|
14
|
+
}
|
|
15
|
+
const num = props.total == null ? void 0 : Number(props.total);
|
|
16
|
+
return num == null || isNaN(num) ? void 0 : num;
|
|
17
|
+
});
|
|
10
18
|
const onUpdateCurrentPage = (currentPage) => {
|
|
11
19
|
emit("update:currentPage", currentPage);
|
|
12
20
|
};
|
|
13
21
|
const onUpdatePageSize = (pageSize) => {
|
|
14
22
|
emit("update:pageSize", pageSize);
|
|
15
23
|
};
|
|
16
|
-
return { onUpdateCurrentPage, onUpdatePageSize };
|
|
24
|
+
return { isInfinite, pageTotal, onUpdateCurrentPage, onUpdatePageSize };
|
|
17
25
|
}
|
|
18
26
|
});
|
|
19
27
|
const _export_sfc = (sfc, props) => {
|
|
@@ -30,7 +38,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
30
38
|
background: _ctx.type === "circle" ? false : _ctx.background,
|
|
31
39
|
pageSize: _ctx.pageSize,
|
|
32
40
|
defaultPageSize: _ctx.defaultPageSize,
|
|
33
|
-
total: _ctx.
|
|
41
|
+
total: _ctx.pageTotal,
|
|
34
42
|
pageCount: _ctx.pageCount,
|
|
35
43
|
pagerCount: _ctx.pagerCount,
|
|
36
44
|
currentPage: _ctx.currentPage,
|
|
@@ -45,7 +53,11 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
45
53
|
disabled: _ctx.disabled,
|
|
46
54
|
teleported: _ctx.teleported,
|
|
47
55
|
hideOnSinglePage: _ctx.hideOnSinglePage,
|
|
48
|
-
class: normalizeClass([
|
|
56
|
+
class: normalizeClass([
|
|
57
|
+
"ele-pagination",
|
|
58
|
+
{ "is-circle": _ctx.type === "circle" },
|
|
59
|
+
{ "is-infinite": _ctx.isInfinite }
|
|
60
|
+
]),
|
|
49
61
|
"onUpdate:currentPage": _ctx.onUpdateCurrentPage,
|
|
50
62
|
"onUpdate:pageSize": _ctx.onUpdatePageSize
|
|
51
63
|
}, createSlots({ _: 2 }, [
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import type { PropType, ExtractPropTypes } from 'vue';
|
|
2
|
-
import type { PaginationType } from './types';
|
|
2
|
+
import type { PaginationType, PaginationTotal } from './types';
|
|
3
3
|
/**
|
|
4
4
|
* 属性
|
|
5
5
|
*/
|
|
6
6
|
export declare const paginationProps: {
|
|
7
|
+
/** 总条目数 */
|
|
8
|
+
total: PropType<PaginationTotal>;
|
|
7
9
|
/** 风格 */
|
|
8
10
|
type: {
|
|
9
11
|
type: PropType<PaginationType>;
|
|
@@ -11,7 +13,6 @@ export declare const paginationProps: {
|
|
|
11
13
|
};
|
|
12
14
|
pageSize: NumberConstructor;
|
|
13
15
|
defaultPageSize: NumberConstructor;
|
|
14
|
-
total: NumberConstructor;
|
|
15
16
|
pageCount: NumberConstructor;
|
|
16
17
|
pagerCount: import("element-plus/es/utils/index").EpPropFinalized<NumberConstructor, unknown, unknown, 7, boolean>;
|
|
17
18
|
currentPage: NumberConstructor;
|
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
flex-wrap: wrap;
|
|
9
9
|
justify-content: center;
|
|
10
10
|
|
|
11
|
+
/* 圆角风格 */
|
|
11
12
|
&.is-circle {
|
|
12
13
|
/* 间距 */
|
|
13
14
|
& > * {
|
|
@@ -199,4 +200,12 @@
|
|
|
199
200
|
}
|
|
200
201
|
}
|
|
201
202
|
}
|
|
203
|
+
|
|
204
|
+
/* 无限页数 */
|
|
205
|
+
&.is-infinite {
|
|
206
|
+
.el-pager li:not(.is-active),
|
|
207
|
+
.el-pagination__total {
|
|
208
|
+
display: none;
|
|
209
|
+
}
|
|
210
|
+
}
|
|
202
211
|
}
|
package/es/ele-printer/util.js
CHANGED
|
@@ -120,7 +120,7 @@ function mergeOptions(options, userOptions) {
|
|
|
120
120
|
function usePrinter(done) {
|
|
121
121
|
const printId = uuid(8);
|
|
122
122
|
const onMessage = (e) => {
|
|
123
|
-
if (e.data ===
|
|
123
|
+
if (e.data === `elePrintDone_${printId}`) {
|
|
124
124
|
removePrintFrame();
|
|
125
125
|
done && done();
|
|
126
126
|
}
|
|
@@ -1,23 +1,68 @@
|
|
|
1
1
|
import type { PropType } from 'vue';
|
|
2
|
-
import type { Columns, TableSize } from '../../ele-data-table/types';
|
|
3
|
-
import type { TableLocale } from '../types';
|
|
2
|
+
import type { Columns, TableSize, DataItem } from '../../ele-data-table/types';
|
|
3
|
+
import type { TableLocale, FetchFunction, ExportConfig, PrintConfig } from '../types';
|
|
4
4
|
declare const _default: import("vue").DefineComponent<{
|
|
5
|
+
/** 工具按钮布局 */
|
|
6
|
+
tools: {
|
|
7
|
+
type: PropType<string[]>;
|
|
8
|
+
required: true;
|
|
9
|
+
};
|
|
5
10
|
/** 表格尺寸 */
|
|
6
11
|
size: StringConstructor;
|
|
7
12
|
/** 表格列数据 */
|
|
8
13
|
columns: PropType<Columns>;
|
|
9
|
-
/** 工具按钮布局 */
|
|
10
|
-
tools: PropType<string[] | null>;
|
|
11
14
|
/** 是否开启列拖拽排序 */
|
|
12
15
|
columnSortable: BooleanConstructor;
|
|
13
16
|
/** 是否开启开关固定列 */
|
|
14
17
|
columnFixed: BooleanConstructor;
|
|
15
18
|
/** 是否最大化 */
|
|
16
19
|
maximized: BooleanConstructor;
|
|
17
|
-
/**
|
|
20
|
+
/** 本地缓存的名称 */
|
|
18
21
|
cacheKey: StringConstructor;
|
|
19
22
|
/** 国际化 */
|
|
20
23
|
locale: PropType<Partial<TableLocale>>;
|
|
24
|
+
/** 表格选中数据 */
|
|
25
|
+
selections: PropType<DataItem[]>;
|
|
26
|
+
/** 表格当前页数据 */
|
|
27
|
+
pageData: PropType<DataItem[]>;
|
|
28
|
+
/** 单元格合并行列方法 */
|
|
29
|
+
spanMethod: PropType<((data: {
|
|
30
|
+
row: DataItem; /** 提示方向 */
|
|
31
|
+
rowIndex: number;
|
|
32
|
+
column: import("element-plus/es/components/table/src/table-column/defaults").TableColumnCtx<DataItem>;
|
|
33
|
+
columnIndex: number;
|
|
34
|
+
}) => number[] | {
|
|
35
|
+
rowspan: number;
|
|
36
|
+
colspan: number;
|
|
37
|
+
} | undefined) | undefined>;
|
|
38
|
+
/** 是否显示合计行 */
|
|
39
|
+
showSummary: BooleanConstructor;
|
|
40
|
+
/** 合计行文本 */
|
|
41
|
+
sumText: StringConstructor;
|
|
42
|
+
/** 合计行自定义方法 */
|
|
43
|
+
summaryMethod: PropType<import("element-plus/es/components/table/src/table/defaults").SummaryMethod<DataItem> | undefined>;
|
|
44
|
+
/** 单元格样式 */
|
|
45
|
+
cellStyle: PropType<import("element-plus/es/components/table/src/table/defaults").CellStyle<DataItem> | undefined>;
|
|
46
|
+
/** 单元格类名自定义 */
|
|
47
|
+
cellClassName: PropType<import("element-plus/es/components/table/src/table/defaults").CellCls<DataItem> | undefined>;
|
|
48
|
+
/** 单元格样式 */
|
|
49
|
+
headerCellStyle: PropType<import("element-plus/es/components/table/src/table/defaults").CellStyle<DataItem> | undefined>;
|
|
50
|
+
/** 单元格类名自定义 */
|
|
51
|
+
headerCellClassName: PropType<import("element-plus/es/components/table/src/table/defaults").CellCls<DataItem> | undefined>;
|
|
52
|
+
/** 序号列起始索引 */
|
|
53
|
+
pageIndex: NumberConstructor;
|
|
54
|
+
/** 表格请求数据方法 */
|
|
55
|
+
fetch: PropType<FetchFunction>;
|
|
56
|
+
/** 导出配置 */
|
|
57
|
+
exportConfig: {
|
|
58
|
+
type: PropType<ExportConfig>;
|
|
59
|
+
required: true;
|
|
60
|
+
};
|
|
61
|
+
/** 打印配置 */
|
|
62
|
+
printConfig: {
|
|
63
|
+
type: PropType<PrintConfig>;
|
|
64
|
+
required: true;
|
|
65
|
+
};
|
|
21
66
|
}, {
|
|
22
67
|
lang: import("vue").ComputedRef<TableLocale>;
|
|
23
68
|
placement: import("vue").ComputedRef<"top" | "bottom">;
|
|
@@ -31,28 +76,74 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
31
76
|
'update:columns': (_columns: Columns) => true;
|
|
32
77
|
'update:maximized': (_maximized: boolean) => true;
|
|
33
78
|
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
79
|
+
/** 工具按钮布局 */
|
|
80
|
+
tools: {
|
|
81
|
+
type: PropType<string[]>;
|
|
82
|
+
required: true;
|
|
83
|
+
};
|
|
34
84
|
/** 表格尺寸 */
|
|
35
85
|
size: StringConstructor;
|
|
36
86
|
/** 表格列数据 */
|
|
37
87
|
columns: PropType<Columns>;
|
|
38
|
-
/** 工具按钮布局 */
|
|
39
|
-
tools: PropType<string[] | null>;
|
|
40
88
|
/** 是否开启列拖拽排序 */
|
|
41
89
|
columnSortable: BooleanConstructor;
|
|
42
90
|
/** 是否开启开关固定列 */
|
|
43
91
|
columnFixed: BooleanConstructor;
|
|
44
92
|
/** 是否最大化 */
|
|
45
93
|
maximized: BooleanConstructor;
|
|
46
|
-
/**
|
|
94
|
+
/** 本地缓存的名称 */
|
|
47
95
|
cacheKey: StringConstructor;
|
|
48
96
|
/** 国际化 */
|
|
49
97
|
locale: PropType<Partial<TableLocale>>;
|
|
98
|
+
/** 表格选中数据 */
|
|
99
|
+
selections: PropType<DataItem[]>;
|
|
100
|
+
/** 表格当前页数据 */
|
|
101
|
+
pageData: PropType<DataItem[]>;
|
|
102
|
+
/** 单元格合并行列方法 */
|
|
103
|
+
spanMethod: PropType<((data: {
|
|
104
|
+
row: DataItem; /** 提示方向 */
|
|
105
|
+
rowIndex: number;
|
|
106
|
+
column: import("element-plus/es/components/table/src/table-column/defaults").TableColumnCtx<DataItem>;
|
|
107
|
+
columnIndex: number;
|
|
108
|
+
}) => number[] | {
|
|
109
|
+
rowspan: number;
|
|
110
|
+
colspan: number;
|
|
111
|
+
} | undefined) | undefined>;
|
|
112
|
+
/** 是否显示合计行 */
|
|
113
|
+
showSummary: BooleanConstructor;
|
|
114
|
+
/** 合计行文本 */
|
|
115
|
+
sumText: StringConstructor;
|
|
116
|
+
/** 合计行自定义方法 */
|
|
117
|
+
summaryMethod: PropType<import("element-plus/es/components/table/src/table/defaults").SummaryMethod<DataItem> | undefined>;
|
|
118
|
+
/** 单元格样式 */
|
|
119
|
+
cellStyle: PropType<import("element-plus/es/components/table/src/table/defaults").CellStyle<DataItem> | undefined>;
|
|
120
|
+
/** 单元格类名自定义 */
|
|
121
|
+
cellClassName: PropType<import("element-plus/es/components/table/src/table/defaults").CellCls<DataItem> | undefined>;
|
|
122
|
+
/** 单元格样式 */
|
|
123
|
+
headerCellStyle: PropType<import("element-plus/es/components/table/src/table/defaults").CellStyle<DataItem> | undefined>;
|
|
124
|
+
/** 单元格类名自定义 */
|
|
125
|
+
headerCellClassName: PropType<import("element-plus/es/components/table/src/table/defaults").CellCls<DataItem> | undefined>;
|
|
126
|
+
/** 序号列起始索引 */
|
|
127
|
+
pageIndex: NumberConstructor;
|
|
128
|
+
/** 表格请求数据方法 */
|
|
129
|
+
fetch: PropType<FetchFunction>;
|
|
130
|
+
/** 导出配置 */
|
|
131
|
+
exportConfig: {
|
|
132
|
+
type: PropType<ExportConfig>;
|
|
133
|
+
required: true;
|
|
134
|
+
};
|
|
135
|
+
/** 打印配置 */
|
|
136
|
+
printConfig: {
|
|
137
|
+
type: PropType<PrintConfig>;
|
|
138
|
+
required: true;
|
|
139
|
+
};
|
|
50
140
|
}>> & {
|
|
51
141
|
"onUpdate:columns"?: ((_columns: Columns) => any) | undefined;
|
|
52
142
|
onReload?: (() => any) | undefined;
|
|
53
143
|
"onUpdate:size"?: ((_size: "" | "default" | "small" | "large" | undefined) => any) | undefined;
|
|
54
144
|
"onUpdate:maximized"?: ((_maximized: boolean) => any) | undefined;
|
|
55
145
|
}, {
|
|
146
|
+
showSummary: boolean;
|
|
56
147
|
maximized: boolean;
|
|
57
148
|
columnSortable: boolean;
|
|
58
149
|
columnFixed: boolean;
|