diff --git a/lib/features/runningTree.d.ts b/lib/features/runningTree.d.ts index adb76170..88e184ee 100644 --- a/lib/features/runningTree.d.ts +++ b/lib/features/runningTree.d.ts @@ -198,7 +198,7 @@ export declare class RunningTree; - execute(path: string, operation?: ED[keyof ED]['Operation']): Promise(path: string, operation?: Omit): Promise; clean(path: string): Promise; diff --git a/lib/page.common.d.ts b/lib/page.common.d.ts index 32b2f3a6..f610810b 100644 --- a/lib/page.common.d.ts +++ b/lib/page.common.d.ts @@ -7,7 +7,7 @@ export declare function onPathSet>(this: ComponentFullThisType, option: OakComponentOption, extra?: Record): Promise; export declare function refresh>(this: ComponentFullThisType): Promise; export declare function loadMore>(this: ComponentFullThisType): Promise; -export declare function execute>(this: ComponentFullThisType, operation?: ED[T]['Operation'], path?: string): Promise>(this: ComponentFullThisType, operation?: Omit, path?: string): Promise; export declare function callPicker>(this: ComponentFullThisType, attr: string, params?: Record): void; diff --git a/lib/types/Page.d.ts b/lib/types/Page.d.ts index db8d79f6..69bff882 100644 --- a/lib/types/Page.d.ts +++ b/lib/types/Page.d.ts @@ -150,7 +150,7 @@ export declare type OakCommonComponentMethods void; t(key: string, params?: object): string; callPicker: (attr: string, params: Record) => void; - execute: (operation?: ED[T]['Operation'], path?: string) => Promise; + execute: (operation?: Omit, path?: string) => Promise; checkOperation: (ntity: T, action: ED[T]['Action'], filter?: ED[T]['Update']['filter'], checkerTypes?: CheckerType[]) => Promise; tryExecute: (path?: string) => Promise; getOperations: (path?: string) => Promise; diff --git a/src/features/runningTree.ts b/src/features/runningTree.ts index 0d2b45da..56c62563 100644 --- a/src/features/runningTree.ts +++ b/src/features/runningTree.ts @@ -2028,7 +2028,7 @@ export class RunningTree< } @Action - async execute(path: string, operation?: ED[keyof ED]['Operation']) { + async execute(path: string, operation?: Omit) { const node = this.findNode(path)!; if (operation) { assert(node instanceof ListNode || node instanceof SingleNode); diff --git a/src/page.common.ts b/src/page.common.ts index 6b498f18..4a1c9b18 100644 --- a/src/page.common.ts +++ b/src/page.common.ts @@ -280,7 +280,7 @@ export async function execute< T extends keyof ED, Cxt extends Context>( this: ComponentFullThisType, - operation?: ED[T]['Operation'], + operation?: Omit, path?: string) { if (this.state.oakExecuting) { throw new Error('请仔细设计按钮状态,不要允许重复点击!'); diff --git a/src/types/Page.ts b/src/types/Page.ts index 6c9d06eb..19bb115a 100644 --- a/src/types/Page.ts +++ b/src/types/Page.ts @@ -252,7 +252,7 @@ export type OakCommonComponentMethods< t(key: string, params?: object): string; callPicker: (attr: string, params: Record) => void; - execute: (operation?: ED[T]['Operation'], path?: string) => Promise; + execute: (operation?: Omit, path?: string) => Promise; checkOperation: (ntity: T, action: ED[T]['Action'], filter?: ED[T]['Update']['filter'], checkerTypes?: CheckerType[]) => Promise; tryExecute: (path?: string) => Promise; getOperations: (path?: string) => Promise;