This commit is contained in:
神仙都没用 2024-05-26 18:28:43 +08:00
parent a2337924bb
commit 48735c2a2f
4 changed files with 10 additions and 6 deletions

View File

@ -40,8 +40,8 @@ declare type obj = {
declare type DeepPartial<T> = T extends Function
? T
: T extends object
? { [P in keyof T]?: DeepPartial<T[P]> }
: T;
? { [P in keyof T]?: DeepPartial<T[P]> }
: T;
// 合并
declare type Merge<A, B> = Omit<A, keyof B> & B;
@ -703,7 +703,11 @@ declare namespace ClContextMenu {
}
interface Ref {
open(event: Event, options: Options): { close: () => void };
open(event: Event, options: Options): Exposed;
close(): void;
}
interface Exposed {
close(): void;
}
}

View File

@ -1,6 +1,6 @@
{
"name": "@cool-vue/crud",
"version": "7.1.18",
"version": "7.1.19",
"private": false,
"main": "./dist/index.umd.min.js",
"typings": "types/index.d.ts",

View File

@ -267,7 +267,7 @@ export const ContextMenu = {
render(vm, event.target.ownerDocument.createElement("div"));
return vm.component?.exposed;
return vm.component?.exposed as ClContextMenu.Exposed;
}
};

View File

@ -26,6 +26,6 @@ declare const ClContextMenu: import("vue").DefineComponent<{
event: ClContextMenu.Event;
}, {}>;
export declare const ContextMenu: {
open(event: ClContextMenu.Event, options: ClContextMenu.Options): Record<string, any> | null | undefined;
open(event: ClContextMenu.Event, options: ClContextMenu.Options): ClContextMenu.Exposed;
};
export default ClContextMenu;