@scvzerng/element-ui-ag-grid-vue2 0.0.25 → 0.0.26
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.
|
@@ -1,8 +1,18 @@
|
|
|
1
|
+
import { type ComputedRef } from 'vue';
|
|
2
|
+
import type { GridOptions } from 'ag-grid-community';
|
|
1
3
|
import type { GridProps } from './use-grid';
|
|
2
4
|
/**
|
|
3
5
|
* Vue2 适配: useFooter 薄壳, 委托给 core
|
|
6
|
+
*
|
|
7
|
+
* 根因: workspace 同时装了 vue@2.7.16 (consumer) 和 vue@3.5.40 (core build toolchain),
|
|
8
|
+
* core 的 .d.ts 里的 import("vue").ComputedRef 在 consumer 端被解析到 vue3 的 ComputedRef,
|
|
9
|
+
* vue-tsc 不认这个类型的 ref 在 Vue2.7 模板里要 unwrap -> TS2559.
|
|
10
|
+
*
|
|
11
|
+
* 修复: 把 footerGridOptions 显式断言成 consumer 自己的 ComputedRef<GridOptions<any>>
|
|
12
|
+
* (即 vue@2.7.16 的 ComputedRef), vue-tsc 就认了, 模板里 :grid-options="footerGridOptions" 直接 unwrap.
|
|
4
13
|
*/
|
|
5
14
|
export declare const useFooter: (props: GridProps, gridRef: any, gridStyles: any) => {
|
|
15
|
+
footerGridOptions: ComputedRef<GridOptions<any>>;
|
|
6
16
|
setFooterData: (data: any[]) => void;
|
|
7
17
|
footerGridApi: import("vue").Ref<import("ag-grid-community").GridApi<any> | undefined, import("ag-grid-community").GridApi<any> | undefined>;
|
|
8
18
|
footerData: import("vue").Ref<any[], any[]>;
|
|
@@ -11,5 +21,4 @@ export declare const useFooter: (props: GridProps, gridRef: any, gridStyles: any
|
|
|
11
21
|
} | {
|
|
12
22
|
height?: undefined;
|
|
13
23
|
}>;
|
|
14
|
-
footerGridOptions: import("vue").ComputedRef<import("ag-grid-community").GridOptions<any>>;
|
|
15
24
|
};
|
package/dist/types/use-grid.d.ts
CHANGED
|
@@ -672,6 +672,7 @@ export declare const useGrid: <T = any>(props: GridProps) => {
|
|
|
672
672
|
reload: () => void;
|
|
673
673
|
redraw: (row: GridRow<any>) => void;
|
|
674
674
|
redrawCell: (row: GridRow<any>, rowId: string, column: import("ag-grid-community").Column) => void;
|
|
675
|
+
ensureNodeVisible: (rowId: string) => void;
|
|
675
676
|
getColumns: () => import("@scvzerng/ag-grid-core").SpanColumn[];
|
|
676
677
|
} | undefined;
|
|
677
678
|
createRow: (data: T) => ActualRow<T>;
|
|
@@ -690,6 +691,7 @@ export declare const useGrid: <T = any>(props: GridProps) => {
|
|
|
690
691
|
reload: () => void;
|
|
691
692
|
redraw: (row: GridRow<any>) => void;
|
|
692
693
|
redrawCell: (row: GridRow<any>, rowId: string, column: import("ag-grid-community").Column) => void;
|
|
694
|
+
ensureNodeVisible: (rowId: string) => void;
|
|
693
695
|
getColumns: () => import("@scvzerng/ag-grid-core").SpanColumn[];
|
|
694
696
|
} | undefined;
|
|
695
697
|
createRow: (data: T) => ActualRow<T>;
|