vxe-table 4.23.12 → 4.23.14
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/all.esm.js +4789 -4773
- package/dist/all.esm.min.js +3 -3
- package/es/colgroup/index.d.ts +18 -18
- package/es/column/index.d.ts +18 -18
- package/es/grid/index.d.ts +126 -126
- package/es/grid/src/emits.d.ts +1 -1
- package/es/grid/src/emits.js +3 -3
- package/es/grid/src/grid.d.ts +20 -20
- package/es/grid/src/grid.js +10 -10
- package/es/grid/src/props.d.ts +2 -2
- package/es/grid/src/props.js +4 -4
- package/es/index.esm.js +1 -0
- package/es/index.js +1 -0
- package/es/table/index.d.ts +118 -118
- package/es/table/module/custom/panel.js +1588 -1585
- package/es/table/module/export/export-panel.js +587 -584
- package/es/table/module/export/import-panel.js +258 -255
- package/es/table/module/filter/hook.js +1 -15
- package/es/table/module/filter/panel.js +281 -278
- package/es/table/module/menu/panel.js +225 -222
- package/es/table/src/body.js +895 -892
- package/es/table/src/column.d.ts +3 -3
- package/es/table/src/emits.d.ts +1 -1
- package/es/table/src/emits.js +2 -2
- package/es/table/src/footer.js +341 -338
- package/es/table/src/group.d.ts +3 -3
- package/es/table/src/header.js +539 -536
- package/es/table/src/props.d.ts +2 -2
- package/es/table/src/props.js +2 -2
- package/es/table/src/table.d.ts +19 -19
- package/es/table/src/table.js +15 -10
- package/es/table/src/util.d.ts +1 -1
- package/es/toolbar/index.d.ts +18 -18
- package/es/toolbar/src/toolbar.d.ts +3 -3
- package/es/ui/index.js +1 -1
- package/es/ui/src/log.js +1 -1
- package/es/ui/src/vn.d.ts +1 -1
- package/lib/colgroup/index.d.ts +760 -0
- package/lib/column/index.d.ts +760 -0
- package/lib/components.d.ts +13 -0
- package/lib/grid/index.d.ts +2824 -0
- package/lib/grid/src/emits.d.ts +2 -0
- package/lib/grid/src/emits.js +2 -2
- package/lib/grid/src/grid.d.ts +556 -0
- package/lib/grid/src/grid.js +6 -6
- package/lib/grid/src/props.d.ts +200 -0
- package/lib/grid/src/props.js +3 -3
- package/lib/index.common.js +1 -0
- package/lib/index.d.ts +3 -0
- package/lib/index.js +1 -0
- package/lib/index.umd.js +4789 -4773
- package/lib/index.umd.min.js +3 -3
- package/lib/locale/ar-EG.umd.d.ts +908 -0
- package/lib/locale/de-DE.umd.d.ts +908 -0
- package/lib/locale/en-US.umd.d.ts +908 -0
- package/lib/locale/es-ES.umd.d.ts +908 -0
- package/lib/locale/fr-FR.umd.d.ts +908 -0
- package/lib/locale/hu-HU.umd.d.ts +908 -0
- package/lib/locale/hy-AM.umd.d.ts +908 -0
- package/lib/locale/id-ID.umd.d.ts +908 -0
- package/lib/locale/it-IT.umd.d.ts +908 -0
- package/lib/locale/ja-JP.umd.d.ts +908 -0
- package/lib/locale/ko-KR.umd.d.ts +908 -0
- package/lib/locale/lang/ar-EG.d.ts +908 -0
- package/lib/locale/lang/ar-EG.umd.d.ts +908 -0
- package/lib/locale/lang/de-DE.d.ts +908 -0
- package/lib/locale/lang/de-DE.umd.d.ts +908 -0
- package/lib/locale/lang/en-US.d.ts +908 -0
- package/lib/locale/lang/en-US.umd.d.ts +908 -0
- package/lib/locale/lang/es-ES.d.ts +908 -0
- package/lib/locale/lang/es-ES.umd.d.ts +908 -0
- package/lib/locale/lang/fr-FR.d.ts +908 -0
- package/lib/locale/lang/fr-FR.umd.d.ts +908 -0
- package/lib/locale/lang/hu-HU.d.ts +908 -0
- package/lib/locale/lang/hu-HU.umd.d.ts +908 -0
- package/lib/locale/lang/hy-AM.d.ts +908 -0
- package/lib/locale/lang/hy-AM.umd.d.ts +908 -0
- package/lib/locale/lang/id-ID.d.ts +908 -0
- package/lib/locale/lang/id-ID.umd.d.ts +908 -0
- package/lib/locale/lang/it-IT.d.ts +908 -0
- package/lib/locale/lang/it-IT.umd.d.ts +908 -0
- package/lib/locale/lang/ja-JP.d.ts +908 -0
- package/lib/locale/lang/ja-JP.umd.d.ts +908 -0
- package/lib/locale/lang/ko-KR.d.ts +908 -0
- package/lib/locale/lang/ko-KR.umd.d.ts +908 -0
- package/lib/locale/lang/ms-MY.d.ts +908 -0
- package/lib/locale/lang/ms-MY.umd.d.ts +908 -0
- package/lib/locale/lang/nb-NO.d.ts +908 -0
- package/lib/locale/lang/nb-NO.umd.d.ts +908 -0
- package/lib/locale/lang/pt-BR.d.ts +908 -0
- package/lib/locale/lang/pt-BR.umd.d.ts +908 -0
- package/lib/locale/lang/ru-RU.d.ts +908 -0
- package/lib/locale/lang/ru-RU.umd.d.ts +908 -0
- package/lib/locale/lang/th-TH.d.ts +908 -0
- package/lib/locale/lang/th-TH.umd.d.ts +908 -0
- package/lib/locale/lang/ug-CN.d.ts +908 -0
- package/lib/locale/lang/ug-CN.umd.d.ts +908 -0
- package/lib/locale/lang/uk-UA.d.ts +908 -0
- package/lib/locale/lang/uk-UA.umd.d.ts +908 -0
- package/lib/locale/lang/uz-UZ.d.ts +908 -0
- package/lib/locale/lang/uz-UZ.umd.d.ts +908 -0
- package/lib/locale/lang/vi-VN.d.ts +908 -0
- package/lib/locale/lang/vi-VN.umd.d.ts +908 -0
- package/lib/locale/lang/zh-CHT.d.ts +908 -0
- package/lib/locale/lang/zh-CHT.umd.d.ts +908 -0
- package/lib/locale/lang/zh-CN.d.ts +908 -0
- package/lib/locale/lang/zh-CN.umd.d.ts +908 -0
- package/lib/locale/lang/zh-HK.d.ts +908 -0
- package/lib/locale/lang/zh-HK.umd.d.ts +908 -0
- package/lib/locale/lang/zh-MO.d.ts +908 -0
- package/lib/locale/lang/zh-MO.umd.d.ts +908 -0
- package/lib/locale/lang/zh-TC.d.ts +908 -0
- package/lib/locale/lang/zh-TC.umd.d.ts +908 -0
- package/lib/locale/lang/zh-TW.d.ts +908 -0
- package/lib/locale/lang/zh-TW.umd.d.ts +908 -0
- package/lib/locale/ms-MY.umd.d.ts +908 -0
- package/lib/locale/nb-NO.umd.d.ts +908 -0
- package/lib/locale/pt-BR.umd.d.ts +908 -0
- package/lib/locale/ru-RU.umd.d.ts +908 -0
- package/lib/locale/th-TH.umd.d.ts +908 -0
- package/lib/locale/ug-CN.umd.d.ts +908 -0
- package/lib/locale/uk-UA.umd.d.ts +908 -0
- package/lib/locale/uz-UZ.umd.d.ts +908 -0
- package/lib/locale/vi-VN.umd.d.ts +908 -0
- package/lib/locale/zh-CHT.umd.d.ts +908 -0
- package/lib/locale/zh-CN.umd.d.ts +908 -0
- package/lib/locale/zh-HK.umd.d.ts +908 -0
- package/lib/locale/zh-MO.umd.d.ts +908 -0
- package/lib/locale/zh-TC.umd.d.ts +908 -0
- package/lib/locale/zh-TW.umd.d.ts +908 -0
- package/lib/table/index.d.ts +2672 -0
- package/lib/table/module/custom/hook.d.ts +1 -0
- package/lib/table/module/custom/panel.d.ts +17 -0
- package/lib/table/module/custom/panel.js +1588 -1585
- package/lib/table/module/edit/hook.d.ts +1 -0
- package/lib/table/module/export/export-panel.d.ts +27 -0
- package/lib/table/module/export/export-panel.js +587 -584
- package/lib/table/module/export/hook.d.ts +1 -0
- package/lib/table/module/export/import-panel.d.ts +27 -0
- package/lib/table/module/export/import-panel.js +258 -255
- package/lib/table/module/export/util.d.ts +5 -0
- package/lib/table/module/filter/hook.d.ts +1 -0
- package/lib/table/module/filter/hook.js +1 -15
- package/lib/table/module/filter/panel.d.ts +16 -0
- package/lib/table/module/filter/panel.js +281 -278
- package/lib/table/module/keyboard/hook.d.ts +1 -0
- package/lib/table/module/menu/hook.d.ts +1 -0
- package/lib/table/module/menu/panel.d.ts +2 -0
- package/lib/table/module/menu/panel.js +225 -222
- package/lib/table/module/validator/hook.d.ts +1 -0
- package/lib/table/render/index.d.ts +1 -0
- package/lib/table/src/body.d.ts +24 -0
- package/lib/table/src/body.js +895 -892
- package/lib/table/src/cell.d.ts +192 -0
- package/lib/table/src/column.d.ts +263 -0
- package/lib/table/src/columnInfo.d.ts +13 -0
- package/lib/table/src/emits.d.ts +2 -0
- package/lib/table/src/emits.js +2 -2
- package/lib/table/src/footer.d.ts +45 -0
- package/lib/table/src/footer.js +341 -338
- package/lib/table/src/group.d.ts +178 -0
- package/lib/table/src/header.d.ts +26 -0
- package/lib/table/src/header.js +539 -536
- package/lib/table/src/props.d.ts +238 -0
- package/lib/table/src/props.js +2 -2
- package/lib/table/src/store.d.ts +6 -0
- package/lib/table/src/table.d.ts +539 -0
- package/lib/table/src/table.js +13 -8
- package/lib/table/src/use/cell-view.d.ts +10 -0
- package/lib/table/src/use/index.d.ts +1 -0
- package/lib/table/src/util.d.ts +74 -0
- package/lib/toolbar/index.d.ts +340 -0
- package/lib/toolbar/src/toolbar.d.ts +75 -0
- package/lib/ui/index.d.ts +85 -0
- package/lib/ui/index.js +1 -1
- package/lib/ui/src/anime.d.ts +10 -0
- package/lib/ui/src/comp.d.ts +2 -0
- package/lib/ui/src/dom.d.ts +80 -0
- package/lib/ui/src/log.d.ts +6 -0
- package/lib/ui/src/log.js +1 -1
- package/lib/ui/src/utils.d.ts +23 -0
- package/lib/ui/src/vn.d.ts +7 -0
- package/lib/v-x-e-table/index.d.ts +2 -0
- package/lib/vxe-colgroup/index.d.ts +3 -0
- package/lib/vxe-column/index.d.ts +3 -0
- package/lib/vxe-grid/index.d.ts +3 -0
- package/lib/vxe-table/index.d.ts +3 -0
- package/lib/vxe-toolbar/index.d.ts +3 -0
- package/lib/vxe-ui/index.d.ts +3 -0
- package/package.json +7 -7
- package/packages/grid/src/emits.ts +2 -2
- package/packages/grid/src/grid.ts +8 -8
- package/packages/grid/src/props.ts +3 -3
- package/packages/index.ts +2 -2
- package/packages/table/module/custom/panel.ts +2 -2
- package/packages/table/module/export/export-panel.ts +2 -2
- package/packages/table/module/export/import-panel.ts +2 -2
- package/packages/table/module/filter/hook.ts +1 -15
- package/packages/table/module/filter/panel.ts +2 -2
- package/packages/table/module/menu/panel.ts +2 -2
- package/packages/table/src/body.ts +2 -2
- package/packages/table/src/emits.ts +1 -1
- package/packages/table/src/footer.ts +2 -2
- package/packages/table/src/header.ts +2 -2
- package/packages/table/src/props.ts +1 -1
- package/packages/table/src/table.ts +21 -33
- /package/dist/{iconfont.1793090564415.ttf → iconfont.1793683456086.ttf} +0 -0
- /package/dist/{iconfont.1793090564415.woff → iconfont.1793683456086.woff} +0 -0
- /package/dist/{iconfont.1793090564415.woff2 → iconfont.1793683456086.woff2} +0 -0
- /package/es/{iconfont.1793090564415.ttf → iconfont.1793683456086.ttf} +0 -0
- /package/es/{iconfont.1793090564415.woff → iconfont.1793683456086.woff} +0 -0
- /package/es/{iconfont.1793090564415.woff2 → iconfont.1793683456086.woff2} +0 -0
- /package/lib/{iconfont.1793090564415.ttf → iconfont.1793683456086.ttf} +0 -0
- /package/lib/{iconfont.1793090564415.woff → iconfont.1793683456086.woff} +0 -0
- /package/lib/{iconfont.1793090564415.woff2 → iconfont.1793683456086.woff2} +0 -0
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
export declare function initTpImg(): HTMLImageElement;
|
|
2
|
+
export declare function getTpImg(): HTMLImageElement;
|
|
3
|
+
export declare function getPropClass(property: any, params: any): any;
|
|
4
|
+
export declare function isPx(val: any): any;
|
|
5
|
+
export declare function isScale(val: any): any;
|
|
6
|
+
export declare function hasClass(elem: any, cls: any): any;
|
|
7
|
+
export declare function removeClass(elem: any, cls: any): void;
|
|
8
|
+
export declare function addClass(elem: any, cls: string): void;
|
|
9
|
+
export declare function hasControlKey(evnt: KeyboardEvent | MouseEvent | DragEvent): boolean;
|
|
10
|
+
export declare function toCssUnit(val?: number | string, unit?: string): string;
|
|
11
|
+
export declare function queryElement(elem: HTMLTableCellElement, selector: string): HTMLElement | null;
|
|
12
|
+
export declare function getDomNode(): {
|
|
13
|
+
scrollTop: number;
|
|
14
|
+
scrollLeft: number;
|
|
15
|
+
visibleHeight: number;
|
|
16
|
+
visibleWidth: number;
|
|
17
|
+
};
|
|
18
|
+
export declare function getOffsetHeight(elem?: HTMLElement): number;
|
|
19
|
+
export declare function getPaddingTopBottomSize(elem: HTMLElement): number;
|
|
20
|
+
export declare function setScrollTop(elem: HTMLElement | null | undefined, scrollTop: number): void;
|
|
21
|
+
export declare function setScrollLeft(elem: HTMLElement | null | undefined, scrollLeft: number): void;
|
|
22
|
+
export declare function updateCellTitle(overflowElem: any, column: any): void;
|
|
23
|
+
export declare function checkTargetElement(target: HTMLElement | EventTarget | null, exEls: (HTMLElement | null)[], endEl?: HTMLElement | EventTarget | null): boolean;
|
|
24
|
+
/**
|
|
25
|
+
* 检查触发源是否属于目标节点
|
|
26
|
+
*/
|
|
27
|
+
export declare function getEventTargetNode(evnt: any, container: any, queryCls?: string, queryMethod?: (target: Element) => boolean): {
|
|
28
|
+
flag: boolean;
|
|
29
|
+
container: any;
|
|
30
|
+
targetElem: any;
|
|
31
|
+
} | {
|
|
32
|
+
flag: boolean;
|
|
33
|
+
container?: undefined;
|
|
34
|
+
targetElem?: undefined;
|
|
35
|
+
};
|
|
36
|
+
/**
|
|
37
|
+
* 获取元素相对于 document 的位置
|
|
38
|
+
*/
|
|
39
|
+
export declare function getOffsetPos(elem: any, container: any): any;
|
|
40
|
+
export declare function getAbsolutePos(elem: any): {
|
|
41
|
+
boundingTop: any;
|
|
42
|
+
top: any;
|
|
43
|
+
boundingLeft: any;
|
|
44
|
+
left: any;
|
|
45
|
+
visibleHeight: number;
|
|
46
|
+
visibleWidth: number;
|
|
47
|
+
};
|
|
48
|
+
export declare function hasEventInputTarget(target: EventTarget | Element | null): boolean | "";
|
|
49
|
+
export declare function hasAxternalInputTarget(target: EventTarget | Element | null): boolean;
|
|
50
|
+
export declare function scrollToView(elem: any): void;
|
|
51
|
+
export declare function triggerEvent(targetElem: Element, type: string): void;
|
|
52
|
+
export declare function isNodeElement(elem: any): elem is HTMLElement;
|
|
53
|
+
export declare function scrollTopTo(diffNum: number, cb: (progress: number) => void): void;
|
|
54
|
+
export declare function wheelScrollLeftTo(scrollLeft: number, cb: (offsetLeft: number) => void): void;
|
|
55
|
+
export declare function wheelScrollTopTo(diffNum: number, cb: (progress: number) => void): void;
|
|
56
|
+
interface PanelPlacementOptions {
|
|
57
|
+
defaultTop?: number;
|
|
58
|
+
defaultLeft?: number;
|
|
59
|
+
placement?: '' | 'top' | 'bottom' | null;
|
|
60
|
+
defaultPlacement?: '' | 'top' | 'bottom' | null;
|
|
61
|
+
appendTo?: string | HTMLElement | ((params: any) => string | HTMLElement);
|
|
62
|
+
teleportTo?: boolean;
|
|
63
|
+
marginSize?: number;
|
|
64
|
+
isMinWidth?: boolean;
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* 通用定位计算
|
|
68
|
+
*/
|
|
69
|
+
export declare function updatePanelPlacement(targetElem: HTMLElement | null | undefined, panelElem: HTMLElement | null | undefined, options: PanelPlacementOptions): {
|
|
70
|
+
top: number;
|
|
71
|
+
bottom: number;
|
|
72
|
+
left: number;
|
|
73
|
+
arrowLeft: number;
|
|
74
|
+
style: Record<string, string>;
|
|
75
|
+
placement: "top" | "bottom";
|
|
76
|
+
};
|
|
77
|
+
export declare function getPopupWrapperElement(panelElem: HTMLElement | null | undefined): HTMLElement | null;
|
|
78
|
+
export declare function getPopupContainer(appendTo: string | HTMLElement | ((params: any) => string | HTMLElement) | undefined): string | HTMLElement;
|
|
79
|
+
export declare function getPopupAppendElement(appendTo: string | HTMLElement | ((params: any) => string | HTMLElement) | undefined): HTMLElement;
|
|
80
|
+
export {};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export declare function createComponentLog(name: string): {
|
|
2
|
+
warnLog: (key: string, args?: any) => string;
|
|
3
|
+
errLog: (key: string, args?: any) => string;
|
|
4
|
+
};
|
|
5
|
+
export declare const warnLog: (key: string, args?: any) => string;
|
|
6
|
+
export declare const errLog: (key: string, args?: any) => string;
|
package/lib/ui/src/log.js
CHANGED
|
@@ -25,7 +25,7 @@ __export(log_exports, {
|
|
|
25
25
|
module.exports = __toCommonJS(log_exports);
|
|
26
26
|
var import_core = require("@vxe-ui/core");
|
|
27
27
|
const { log } = import_core.VxeUI;
|
|
28
|
-
const tableVersion = `table v${"4.23.
|
|
28
|
+
const tableVersion = `table v${"4.23.14"}`;
|
|
29
29
|
function createComponentLog(name) {
|
|
30
30
|
const uiVersion = import_core.VxeUI.uiVersion ? `ui v${import_core.VxeUI.uiVersion}` : "";
|
|
31
31
|
const ganttVersion = import_core.VxeUI.ganttVersion ? `gantt v${import_core.VxeUI.ganttVersion}` : "";
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export declare function isEnableConf(conf: any): boolean;
|
|
2
|
+
/**
|
|
3
|
+
* 用于开关类型的配置项
|
|
4
|
+
* 局部启用规则:conf={}
|
|
5
|
+
* 局部禁用规则:conf={enabled:false}
|
|
6
|
+
* 全局默认启用规则:conf.enabled=true
|
|
7
|
+
*/
|
|
8
|
+
export declare function hasEnableConf(conf: any, opts: any): boolean;
|
|
9
|
+
export declare function isEmptyValue(cellValue: any): boolean;
|
|
10
|
+
export declare function parseFile(file: File): {
|
|
11
|
+
filename: string;
|
|
12
|
+
type: string;
|
|
13
|
+
};
|
|
14
|
+
export declare function nextZIndex(): number;
|
|
15
|
+
export declare function getLastZIndex(): number;
|
|
16
|
+
export declare function hasChildrenList(item: any): any;
|
|
17
|
+
export declare function getFuncText(content?: string | number | boolean | null, args?: any): string;
|
|
18
|
+
export declare function formatText(value: any, placeholder?: any): string;
|
|
19
|
+
/**
|
|
20
|
+
* 判断值为:'' | null | undefined 时都属于空值
|
|
21
|
+
*/
|
|
22
|
+
export declare function eqEmptyValue(cellValue: any): boolean;
|
|
23
|
+
export declare function getDefaultConfig<T = any, D = any>(val1: T, def1: D): T | D;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { VxeGlobalRendererHandles } from 'vxe-pc-ui';
|
|
2
|
+
import type { VxeComponentSlotType } from '../../../types';
|
|
3
|
+
export declare function getOnName(type: string): string;
|
|
4
|
+
export declare function getModelEvent(renderOpts: VxeGlobalRendererHandles.RenderOptions): "input" | "change" | "update:modelValue";
|
|
5
|
+
export declare function getChangeEvent(renderOpts: VxeGlobalRendererHandles.RenderOptions): "input" | "change";
|
|
6
|
+
export declare function hasInputType(renderOpts: VxeGlobalRendererHandles.RenderOptions): boolean;
|
|
7
|
+
export declare function getSlotVNs(vns: VxeComponentSlotType | VxeComponentSlotType[]): VxeComponentSlotType[];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vxe-table",
|
|
3
|
-
"version": "4.23.
|
|
3
|
+
"version": "4.23.14",
|
|
4
4
|
"description": "A PC-end table component based on Vxe UI, supporting copy-paste, data pivot table, and high-performance virtual list table solution.",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"update": "npm install --legacy-peer-deps",
|
|
@@ -75,14 +75,14 @@
|
|
|
75
75
|
"typescript": "~5.9.3",
|
|
76
76
|
"vue": "3.4.27",
|
|
77
77
|
"vue-router": "~4.5.1",
|
|
78
|
-
"vxe-pc-ui": "4.20.
|
|
78
|
+
"vxe-pc-ui": "4.20.36"
|
|
79
79
|
},
|
|
80
80
|
"allowScripts": {
|
|
81
|
-
"esbuild
|
|
82
|
-
"@parcel/watcher
|
|
83
|
-
"yorkie
|
|
84
|
-
"core-js
|
|
85
|
-
"es5-ext
|
|
81
|
+
"esbuild": true,
|
|
82
|
+
"@parcel/watcher": true,
|
|
83
|
+
"yorkie": true,
|
|
84
|
+
"core-js": true,
|
|
85
|
+
"es5-ext": true
|
|
86
86
|
},
|
|
87
87
|
"vetur": {
|
|
88
88
|
"tags": "helper/vetur/tags.json",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { tableComponenEmits } from '../../table/src/emits'
|
|
2
2
|
|
|
3
3
|
import type { VxeGridEmits } from '../../../types'
|
|
4
4
|
|
|
5
|
-
export const
|
|
5
|
+
export const gridComponeEmits: VxeGridEmits = [...tableComponenEmits, 'page-change', 'form-submit', 'form-submit-invalid', 'form-reset', 'form-collapse', 'form-toggle-collapse', 'proxy-query', 'proxy-delete', 'proxy-save', 'toolbar-button-click', 'toolbar-tool-click', 'zoom']
|
|
@@ -4,12 +4,12 @@ import { defineVxeComponent } from '../../ui/src/comp'
|
|
|
4
4
|
import XEUtils from 'xe-utils'
|
|
5
5
|
import { getLastZIndex, nextZIndex, isEnableConf } from '../../ui/src/utils'
|
|
6
6
|
import { getOffsetHeight, getPaddingTopBottomSize, getDomNode, toCssUnit, hasClass } from '../../ui/src/dom'
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
7
|
+
import { gridComponeProps } from './props'
|
|
8
|
+
import { gridComponeEmits } from './emits'
|
|
9
9
|
import { getSlotVNs } from '../../ui/src/vn'
|
|
10
10
|
import { createComponentLog } from '../../ui/src/log'
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
11
|
+
import { tableComponenEmits } from '../../table/src/emits'
|
|
12
|
+
import { tableComponenProps } from '../../table/src/props'
|
|
13
13
|
import VxeTableComponent from '../../table'
|
|
14
14
|
import VxeToolbarComponent from '../../toolbar'
|
|
15
15
|
|
|
@@ -42,7 +42,7 @@ const { warnLog, errLog } = createComponentLog('grid')
|
|
|
42
42
|
|
|
43
43
|
const { getConfig, getI18n, commands, hooks, useFns, createEvent, globalEvents, GLOBAL_EVENT_KEYS, renderEmptyElement } = VxeUI
|
|
44
44
|
|
|
45
|
-
const tableComponentPropKeys = Object.keys(
|
|
45
|
+
const tableComponentPropKeys = Object.keys(tableComponenProps) as (keyof VxeTableProps)[]
|
|
46
46
|
const tableComponentMethodKeys: (keyof VxeTableMethods)[] = [
|
|
47
47
|
'clearAll',
|
|
48
48
|
'syncData',
|
|
@@ -256,8 +256,8 @@ function createInternalData(): GridInternalData {
|
|
|
256
256
|
|
|
257
257
|
export default /* define-vxe-component start */ defineVxeComponent({
|
|
258
258
|
name: 'VxeGrid',
|
|
259
|
-
props:
|
|
260
|
-
emits:
|
|
259
|
+
props: gridComponeProps,
|
|
260
|
+
emits: gridComponeEmits,
|
|
261
261
|
setup(props, context) {
|
|
262
262
|
const { slots, emit } = context
|
|
263
263
|
|
|
@@ -1191,7 +1191,7 @@ export default /* define-vxe-component start */ defineVxeComponent({
|
|
|
1191
1191
|
}
|
|
1192
1192
|
|
|
1193
1193
|
const tableCompEvents: VxeTableEventProps = {}
|
|
1194
|
-
|
|
1194
|
+
tableComponenEmits.forEach((name) => {
|
|
1195
1195
|
const type = XEUtils.camelCase(`on-${name}`) as keyof VxeTableEventProps
|
|
1196
1196
|
tableCompEvents[type] = (...args: any[]) => emit(name, ...args)
|
|
1197
1197
|
})
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { PropType } from 'vue'
|
|
2
2
|
import { VxeUI } from '@vxe-ui/core'
|
|
3
|
-
import {
|
|
3
|
+
import { tableComponenProps } from '../../table/src/props'
|
|
4
4
|
|
|
5
5
|
import type { VxeGridPropTypes } from '../../../types'
|
|
6
6
|
|
|
7
7
|
const { getConfig } = VxeUI
|
|
8
8
|
|
|
9
|
-
export const
|
|
10
|
-
...
|
|
9
|
+
export const gridComponeProps = {
|
|
10
|
+
...tableComponenProps,
|
|
11
11
|
layouts: Array as PropType<VxeGridPropTypes.Layouts>,
|
|
12
12
|
columns: Array as PropType<VxeGridPropTypes.Columns<any>>,
|
|
13
13
|
pagerConfig: Object as PropType<VxeGridPropTypes.PagerConfig>,
|
package/packages/index.ts
CHANGED
|
@@ -2,9 +2,9 @@ import * as VxeUITableExport from './components'
|
|
|
2
2
|
|
|
3
3
|
if (typeof window !== 'undefined') {
|
|
4
4
|
if ((window as any).Vue) {
|
|
5
|
-
|
|
5
|
+
// 兼容旧版本
|
|
6
6
|
if (!(window as any).VXETable) {
|
|
7
|
-
(window as any).VXETable = VxeUITableExport
|
|
7
|
+
;(window as any).VXETable = VxeUITableExport
|
|
8
8
|
}
|
|
9
9
|
}
|
|
10
10
|
}
|
|
@@ -25,7 +25,7 @@ export function createInternalData(): TableCustomPanelInternalData {
|
|
|
25
25
|
}
|
|
26
26
|
}
|
|
27
27
|
|
|
28
|
-
export default defineVxeComponent({
|
|
28
|
+
export default /* define-vxe-component start */ defineVxeComponent({
|
|
29
29
|
name: 'TableCustomPanel',
|
|
30
30
|
props: {
|
|
31
31
|
customStore: {
|
|
@@ -1999,4 +1999,4 @@ export default defineVxeComponent({
|
|
|
1999
1999
|
render() {
|
|
2000
2000
|
return this.renderVN()
|
|
2001
2001
|
}
|
|
2002
|
-
})
|
|
2002
|
+
}) /* define-vxe-component end */
|
|
@@ -11,7 +11,7 @@ const { errLog } = createComponentLog('table')
|
|
|
11
11
|
|
|
12
12
|
const { getI18n, getIcon, renderEmptyElement } = VxeUI
|
|
13
13
|
|
|
14
|
-
export default defineVxeComponent({
|
|
14
|
+
export default /* define-vxe-component start */ defineVxeComponent({
|
|
15
15
|
name: 'VxeTableExportPanel',
|
|
16
16
|
props: {
|
|
17
17
|
defaultOptions: {
|
|
@@ -694,4 +694,4 @@ export default defineVxeComponent({
|
|
|
694
694
|
|
|
695
695
|
return renderVN
|
|
696
696
|
}
|
|
697
|
-
})
|
|
697
|
+
}) /* define-vxe-component end */
|
|
@@ -11,7 +11,7 @@ const { errLog } = createComponentLog('table')
|
|
|
11
11
|
|
|
12
12
|
const { getI18n, getIcon, renderEmptyElement } = VxeUI
|
|
13
13
|
|
|
14
|
-
export default defineVxeComponent({
|
|
14
|
+
export default /* define-vxe-component start */ defineVxeComponent({
|
|
15
15
|
name: 'VxeTableImportPanel',
|
|
16
16
|
props: {
|
|
17
17
|
defaultOptions: {
|
|
@@ -316,4 +316,4 @@ export default defineVxeComponent({
|
|
|
316
316
|
|
|
317
317
|
return renderVN
|
|
318
318
|
}
|
|
319
|
-
})
|
|
319
|
+
}) /* define-vxe-component end */
|
|
@@ -9,21 +9,7 @@ import type { TableFilterMethods, TableFilterPrivateMethods, VxeTableDefines } f
|
|
|
9
9
|
|
|
10
10
|
const { renderer, hooks } = VxeUI
|
|
11
11
|
|
|
12
|
-
const tableFilterMethodKeys: (keyof TableFilterMethods)[] = [
|
|
13
|
-
'openFilter',
|
|
14
|
-
'setFilter',
|
|
15
|
-
'clearFilter',
|
|
16
|
-
'saveFilter',
|
|
17
|
-
'saveFilterByEvent',
|
|
18
|
-
'saveFilterPanel',
|
|
19
|
-
'saveFilterPanelByEvent',
|
|
20
|
-
'resetFilter',
|
|
21
|
-
'resetFilterByEvent',
|
|
22
|
-
'resetFilterPanel',
|
|
23
|
-
'resetFilterPanelByEvent',
|
|
24
|
-
'getCheckedFilters',
|
|
25
|
-
'updateFilterOptionStatus'
|
|
26
|
-
]
|
|
12
|
+
const tableFilterMethodKeys: (keyof TableFilterMethods)[] = ['openFilter', 'setFilter', 'clearFilter', 'saveFilter', 'saveFilterByEvent', 'saveFilterPanel', 'saveFilterPanelByEvent', 'resetFilter', 'resetFilterByEvent', 'resetFilterPanel', 'resetFilterPanelByEvent', 'getCheckedFilters', 'updateFilterOptionStatus']
|
|
27
13
|
|
|
28
14
|
const sourceType = 'table'
|
|
29
15
|
|
|
@@ -14,7 +14,7 @@ const { warnLog } = createComponentLog('table')
|
|
|
14
14
|
|
|
15
15
|
const { getI18n, getIcon, renderer, renderEmptyElement } = VxeUI
|
|
16
16
|
|
|
17
|
-
export default defineVxeComponent({
|
|
17
|
+
export default /* define-vxe-component start */ defineVxeComponent({
|
|
18
18
|
name: 'VxeTableFilterPanel',
|
|
19
19
|
props: {
|
|
20
20
|
filterStore: {
|
|
@@ -365,4 +365,4 @@ export default defineVxeComponent({
|
|
|
365
365
|
render() {
|
|
366
366
|
return this.renderVN()
|
|
367
367
|
}
|
|
368
|
-
})
|
|
368
|
+
}) /* define-vxe-component end */
|
|
@@ -9,7 +9,7 @@ import type { VxeTablePrivateMethods, VxeTableConstructor, VxeTableMethods } fro
|
|
|
9
9
|
|
|
10
10
|
const { getIcon, getI18n, renderEmptyElement } = VxeUI
|
|
11
11
|
|
|
12
|
-
export default defineVxeComponent({
|
|
12
|
+
export default /* define-vxe-component start */ defineVxeComponent({
|
|
13
13
|
name: 'VxeTableMenuPanel',
|
|
14
14
|
setup(props, context) {
|
|
15
15
|
const xID = XEUtils.uniqueId()
|
|
@@ -269,4 +269,4 @@ export default defineVxeComponent({
|
|
|
269
269
|
render() {
|
|
270
270
|
return this.renderVN()
|
|
271
271
|
}
|
|
272
|
-
})
|
|
272
|
+
}) /* define-vxe-component end */
|
|
@@ -14,7 +14,7 @@ const { getI18n, renderer, renderEmptyElement } = VxeUI
|
|
|
14
14
|
const sourceType = 'table'
|
|
15
15
|
const renderType = 'body'
|
|
16
16
|
|
|
17
|
-
export default defineVxeComponent({
|
|
17
|
+
export default /* define-vxe-component start */ defineVxeComponent({
|
|
18
18
|
name: 'VxeTableBody',
|
|
19
19
|
props: {
|
|
20
20
|
tableData: Array as PropType<any[]>,
|
|
@@ -1075,4 +1075,4 @@ export default defineVxeComponent({
|
|
|
1075
1075
|
|
|
1076
1076
|
return renderVN
|
|
1077
1077
|
}
|
|
1078
|
-
})
|
|
1078
|
+
}) /* define-vxe-component end */
|
|
@@ -13,7 +13,7 @@ const { renderer, renderEmptyElement } = VxeUI
|
|
|
13
13
|
const sourceType = 'table'
|
|
14
14
|
const renderType = 'footer'
|
|
15
15
|
|
|
16
|
-
export default defineVxeComponent({
|
|
16
|
+
export default /* define-vxe-component start */ defineVxeComponent({
|
|
17
17
|
name: 'VxeTableFooter',
|
|
18
18
|
props: {
|
|
19
19
|
footerTableData: {
|
|
@@ -422,4 +422,4 @@ export default defineVxeComponent({
|
|
|
422
422
|
|
|
423
423
|
return renderVN
|
|
424
424
|
}
|
|
425
|
-
})
|
|
425
|
+
}) /* define-vxe-component end */
|
|
@@ -13,7 +13,7 @@ const { renderer, renderEmptyElement } = VxeUI
|
|
|
13
13
|
const sourceType = 'table'
|
|
14
14
|
const renderType = 'header'
|
|
15
15
|
|
|
16
|
-
export default defineVxeComponent({
|
|
16
|
+
export default /* define-vxe-component start */ defineVxeComponent({
|
|
17
17
|
name: 'VxeTableHeader',
|
|
18
18
|
props: {
|
|
19
19
|
tableData: Array as PropType<any[]>,
|
|
@@ -639,4 +639,4 @@ export default defineVxeComponent({
|
|
|
639
639
|
|
|
640
640
|
return renderVN
|
|
641
641
|
}
|
|
642
|
-
})
|
|
642
|
+
}) /* define-vxe-component end */
|
|
@@ -44,8 +44,8 @@ import Cell from './cell'
|
|
|
44
44
|
import TableBodyComponent from './body'
|
|
45
45
|
import TableHeaderComponent from './header'
|
|
46
46
|
import TableFooterComponent from './footer'
|
|
47
|
-
import {
|
|
48
|
-
import {
|
|
47
|
+
import { tableComponenProps } from './props'
|
|
48
|
+
import { tableComponenEmits } from './emits'
|
|
49
49
|
import TableCustomPanelComponent from '../module/custom/panel'
|
|
50
50
|
import TableFilterPanelComponent from '../module/filter/panel'
|
|
51
51
|
import TableImportPanelComponent from '../module/export/import-panel'
|
|
@@ -99,8 +99,8 @@ let crossTableDragRowObj: {
|
|
|
99
99
|
|
|
100
100
|
export default /* define-vxe-component start */ defineVxeComponent({
|
|
101
101
|
name: 'VxeTable',
|
|
102
|
-
props:
|
|
103
|
-
emits:
|
|
102
|
+
props: tableComponenProps,
|
|
103
|
+
emits: tableComponenEmits,
|
|
104
104
|
setup(props, context) {
|
|
105
105
|
const { slots, emit } = context
|
|
106
106
|
|
|
@@ -1121,11 +1121,11 @@ export default /* define-vxe-component start */ defineVxeComponent({
|
|
|
1121
1121
|
*/
|
|
1122
1122
|
function getCustomStorageMap(id: string) {
|
|
1123
1123
|
if (customStoreDB) {
|
|
1124
|
-
return customStoreDB.getById(id).then(dbRest => dbRest ? dbRest.data : {})
|
|
1124
|
+
return customStoreDB.getById(id).then((dbRest) => (dbRest ? dbRest.data : {}))
|
|
1125
1125
|
}
|
|
1126
1126
|
|
|
1127
1127
|
// 已废弃,兼容旧版本
|
|
1128
|
-
return new Promise<VxeTableDefines.CustomStoreData>(resolve => {
|
|
1128
|
+
return new Promise<VxeTableDefines.CustomStoreData>((resolve) => {
|
|
1129
1129
|
const version = getConfig().version
|
|
1130
1130
|
const rest = XEUtils.toStringJSON(localStorage.getItem(customStorageKey) || '')
|
|
1131
1131
|
const maps = rest && rest._v === version ? rest : { _v: version }
|
|
@@ -2366,8 +2366,8 @@ export default /* define-vxe-component start */ defineVxeComponent({
|
|
|
2366
2366
|
const reHeight = calcCellAutoHeight(rowid, rowRest, el)
|
|
2367
2367
|
rowRest.height = Math.max(defaultRowHeight, reHeight)
|
|
2368
2368
|
}
|
|
2369
|
-
el.removeAttribute('data-calc-row')
|
|
2370
2369
|
})
|
|
2370
|
+
el.removeAttribute('data-calc-row')
|
|
2371
2371
|
reactData.calcCellHeightFlag++
|
|
2372
2372
|
}
|
|
2373
2373
|
}
|
|
@@ -4513,6 +4513,7 @@ export default /* define-vxe-component start */ defineVxeComponent({
|
|
|
4513
4513
|
}
|
|
4514
4514
|
})
|
|
4515
4515
|
}
|
|
4516
|
+
const oldVisibleColumn = internalData.visibleColumn
|
|
4516
4517
|
const visibleColumn = leftList.concat(centerList).concat(rightList)
|
|
4517
4518
|
internalData.visibleColumn = visibleColumn
|
|
4518
4519
|
updateColumnOffsetLeft()
|
|
@@ -4551,7 +4552,7 @@ export default /* define-vxe-component start */ defineVxeComponent({
|
|
|
4551
4552
|
}
|
|
4552
4553
|
// 如果列被显示/隐藏,则清除合并状态
|
|
4553
4554
|
// 如果列被设置为固定,则清除合并状态
|
|
4554
|
-
if (
|
|
4555
|
+
if (oldVisibleColumn.length !== visibleColumn.length || !visibleColumn.every((column, index) => column === oldVisibleColumn[index])) {
|
|
4555
4556
|
$xeTable.clearMergeCells()
|
|
4556
4557
|
$xeTable.clearMergeFooterItems()
|
|
4557
4558
|
}
|
|
@@ -6749,8 +6750,8 @@ export default /* define-vxe-component start */ defineVxeComponent({
|
|
|
6749
6750
|
if (rowRest) {
|
|
6750
6751
|
rowRest.resizeHeight = calcCellAutoHeight(rowid, rowRest, el)
|
|
6751
6752
|
}
|
|
6752
|
-
el.removeAttribute('data-calc-row')
|
|
6753
6753
|
})
|
|
6754
|
+
el.removeAttribute('data-calc-row')
|
|
6754
6755
|
reactData.calcCellHeightFlag++
|
|
6755
6756
|
}
|
|
6756
6757
|
return nextTick()
|
|
@@ -7110,7 +7111,11 @@ export default /* define-vxe-component start */ defineVxeComponent({
|
|
|
7110
7111
|
}
|
|
7111
7112
|
}
|
|
7112
7113
|
if (reserve) {
|
|
7113
|
-
|
|
7114
|
+
if (treeConfig) {
|
|
7115
|
+
XEUtils.eachTree(tableFullData, (row) => handleCheckboxReserveRow(row, false), { children: childrenField })
|
|
7116
|
+
} else {
|
|
7117
|
+
tableFullData.forEach((row) => handleCheckboxReserveRow(row, false))
|
|
7118
|
+
}
|
|
7114
7119
|
}
|
|
7115
7120
|
reactData.isAllSelected = false
|
|
7116
7121
|
reactData.isIndeterminate = false
|
|
@@ -8888,12 +8893,7 @@ export default /* define-vxe-component start */ defineVxeComponent({
|
|
|
8888
8893
|
}
|
|
8889
8894
|
}
|
|
8890
8895
|
} else if (hasEnableConf(mouseConfig, mouseOpts)) {
|
|
8891
|
-
if (
|
|
8892
|
-
!getEventTargetNode(evnt, el).flag &&
|
|
8893
|
-
!($xeGGWrapper && getEventTargetNode(evnt, $xeGGWrapper.getRefMaps().refElem.value).flag) &&
|
|
8894
|
-
!(tableMenu && getEventTargetNode(evnt, tableMenu.getRefMaps().refElem.value).flag) &&
|
|
8895
|
-
!($xeToolbar && getEventTargetNode(evnt, $xeToolbar.getRefMaps().refElem.value).flag)
|
|
8896
|
-
) {
|
|
8896
|
+
if (!getEventTargetNode(evnt, el).flag && !($xeGGWrapper && getEventTargetNode(evnt, $xeGGWrapper.getRefMaps().refElem.value).flag) && !(tableMenu && getEventTargetNode(evnt, tableMenu.getRefMaps().refElem.value).flag) && !($xeToolbar && getEventTargetNode(evnt, $xeToolbar.getRefMaps().refElem.value).flag)) {
|
|
8897
8897
|
if ($xeTable.clearSelected) {
|
|
8898
8898
|
$xeTable.clearSelected()
|
|
8899
8899
|
}
|
|
@@ -9329,8 +9329,8 @@ export default /* define-vxe-component start */ defineVxeComponent({
|
|
|
9329
9329
|
} else if (hasBackspaceKey && hasEnableConf(keyboardConfig, keyboardOpts) && keyboardOpts.isBack && isEnableConf(editConfig) && (selectRow || selectColumn)) {
|
|
9330
9330
|
if (!isEditStatus) {
|
|
9331
9331
|
const { backMethod } = keyboardOpts
|
|
9332
|
-
//
|
|
9333
|
-
if (
|
|
9332
|
+
// 如果是回车键
|
|
9333
|
+
if (isEnableConf(editConfig) && (selectRow || selectColumn)) {
|
|
9334
9334
|
const params = {
|
|
9335
9335
|
row: selectRow,
|
|
9336
9336
|
rowIndex: $xeTable.getRowIndex(selectRow),
|
|
@@ -9766,15 +9766,7 @@ export default /* define-vxe-component start */ defineVxeComponent({
|
|
|
9766
9766
|
* @param {Event} evnt 事件
|
|
9767
9767
|
* @param {Row} row 行对象
|
|
9768
9768
|
*/
|
|
9769
|
-
const handleTooltip = (
|
|
9770
|
-
evnt: MouseEvent,
|
|
9771
|
-
tipOpts: VxeTablePropTypes.TooltipConfig | VxeTablePropTypes.HeaderTooltipConfig | VxeTablePropTypes.FooterTooltipConfig,
|
|
9772
|
-
type: 'header' | 'body' | 'footer',
|
|
9773
|
-
tdEl: HTMLTableCellElement,
|
|
9774
|
-
overflowElem: HTMLElement | null,
|
|
9775
|
-
tipElem: HTMLElement | null,
|
|
9776
|
-
params: any
|
|
9777
|
-
) => {
|
|
9769
|
+
const handleTooltip = (evnt: MouseEvent, tipOpts: VxeTablePropTypes.TooltipConfig | VxeTablePropTypes.HeaderTooltipConfig | VxeTablePropTypes.FooterTooltipConfig, type: 'header' | 'body' | 'footer', tdEl: HTMLTableCellElement, overflowElem: HTMLElement | null, tipElem: HTMLElement | null, params: any) => {
|
|
9778
9770
|
const tipOverEl = overflowElem || tdEl
|
|
9779
9771
|
if (!tipOverEl) {
|
|
9780
9772
|
return nextTick()
|
|
@@ -12731,11 +12723,7 @@ export default /* define-vxe-component start */ defineVxeComponent({
|
|
|
12731
12723
|
}
|
|
12732
12724
|
}
|
|
12733
12725
|
}
|
|
12734
|
-
if (
|
|
12735
|
-
$xeTable.eqRow(dragRow, row) ||
|
|
12736
|
-
(isControlKey && treeConfig && lazy && row[hasChildField] && rowRest && !rowRest.treeLoaded && !isAutoLazyLoadToChild && !isAutoExpandToChild) ||
|
|
12737
|
-
(!isCrossDrag && treeConfig && transform && (isPeerDrag ? dragRow[parentField] !== row[parentField] : rowRest.level))
|
|
12738
|
-
) {
|
|
12726
|
+
if ($xeTable.eqRow(dragRow, row) || (isControlKey && treeConfig && lazy && row[hasChildField] && rowRest && !rowRest.treeLoaded && !isAutoLazyLoadToChild && !isAutoExpandToChild) || (!isCrossDrag && treeConfig && transform && (isPeerDrag ? dragRow[parentField] !== row[parentField] : rowRest.level))) {
|
|
12739
12727
|
showDropTip(evnt, trEl, null, false, dragPos)
|
|
12740
12728
|
return
|
|
12741
12729
|
}
|
|
@@ -13506,7 +13494,7 @@ export default /* define-vxe-component start */ defineVxeComponent({
|
|
|
13506
13494
|
return
|
|
13507
13495
|
}
|
|
13508
13496
|
|
|
13509
|
-
const { highlightHoverRow } =
|
|
13497
|
+
const { highlightHoverRow } = props
|
|
13510
13498
|
const { scrollXLoad, scrollYLoad, overflowX, overflowY, expandColumn } = reactData
|
|
13511
13499
|
const leftFixedWidth = computeLeftFixedWidth.value
|
|
13512
13500
|
const rightFixedWidth = computeRightFixedWidth.value
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|