修正了一个小bug
This commit is contained in:
parent
35ee2618b6
commit
d89cad87ca
|
|
@ -39,7 +39,7 @@ export declare class Cache<ED extends EntityDict & BaseEntityDict, Cxt extends A
|
|||
}>): Partial<ED[T]["Schema"]>[];
|
||||
private getInner;
|
||||
get<T extends keyof ED, S extends ED[T]['Selection']>(entity: T, selection: S, params?: SelectOption): Partial<ED[T]["Schema"]>[];
|
||||
judgeRelation(entity: keyof ED, attr: string): string | 0 | 1 | 2 | string[];
|
||||
judgeRelation(entity: keyof ED, attr: string): string | 0 | 2 | 1 | string[];
|
||||
bindOnSync(callback: (opRecords: OpRecord<ED>[]) => void): void;
|
||||
unbindOnSync(callback: (opRecords: OpRecord<ED>[]) => void): void;
|
||||
getCachedData(): { [T in keyof ED]?: ED[T]["OpSchema"][] | undefined; };
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@ declare abstract class Node<ED extends EntityDict & BaseEntityDict, T extends ke
|
|||
setExecuting(executing: boolean): void;
|
||||
getParent(): SingleNode<ED, keyof ED, Cxt, FrontCxt, AD> | ListNode<ED, T, Cxt, FrontCxt, AD> | VirtualNode<ED, Cxt, FrontCxt, AD> | undefined;
|
||||
protected getProjection(): ED[T]["Selection"]["data"];
|
||||
protected judgeRelation(attr: string): string | 0 | 1 | 2 | string[];
|
||||
protected judgeRelation(attr: string): string | 0 | 2 | 1 | string[];
|
||||
protected contains(filter: ED[T]['Selection']['filter'], conditionalFilter: ED[T]['Selection']['filter']): boolean;
|
||||
protected repel(filter1: ED[T]['Selection']['filter'], filter2: ED[T]['Selection']['filter']): boolean;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -192,12 +192,15 @@ function reRender(option, extra) {
|
|||
features: features,
|
||||
props: this.props,
|
||||
})
|
||||
: {
|
||||
__now: Date.now(), // 如果没有任何state被set,可能会不触发重渲染
|
||||
};
|
||||
: {};
|
||||
if (extra) {
|
||||
Object.assign(data, extra);
|
||||
}
|
||||
if (Object.keys(data).length === 0) {
|
||||
Object.assign(data, {
|
||||
__now: Date.now(), // 如果没有任何state被set,可能会不触发重渲染
|
||||
});
|
||||
}
|
||||
this.setState(data);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -203,12 +203,15 @@ export function reRender<
|
|||
features,
|
||||
props: this.props,
|
||||
} as any)
|
||||
: {
|
||||
__now: Date.now(), // 如果没有任何state被set,可能会不触发重渲染
|
||||
};
|
||||
: {};
|
||||
if (extra) {
|
||||
Object.assign(data, extra);
|
||||
}
|
||||
if (Object.keys(data).length === 0) {
|
||||
Object.assign(data, {
|
||||
__now: Date.now(), // 如果没有任何state被set,可能会不触发重渲染
|
||||
})
|
||||
}
|
||||
this.setState(data);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue