backendruntimecontext中setTokenValue
This commit is contained in:
parent
fc0c0b235c
commit
66648129e4
|
|
@ -1,7 +1,7 @@
|
|||
import { Style } from '../../../../types/Style';
|
||||
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<import("../../../../oak-app-domain").EntityDict, keyof import("../../../../oak-app-domain").EntityDict, false, {
|
||||
style: Style;
|
||||
entity: "application" | "platform" | "system";
|
||||
entity: "application" | "system" | "platform";
|
||||
entityId: string;
|
||||
name: string;
|
||||
}>) => React.ReactElement;
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import { Config } from '../../../types/Config';
|
||||
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<import("../../../oak-app-domain").EntityDict, keyof import("../../../oak-app-domain").EntityDict, false, {
|
||||
config: Config;
|
||||
entity: "platform" | "system";
|
||||
entity: "system" | "platform";
|
||||
name: string;
|
||||
entityId: string;
|
||||
}>) => React.ReactElement;
|
||||
|
|
|
|||
|
|
@ -13,19 +13,19 @@ declare const _default: <ED2 extends EntityDict & BaseEntityDict, T2 extends key
|
|||
type?: ButtonProps['type'] | AmButtonProps['type'];
|
||||
executeText?: string | undefined;
|
||||
buttonProps?: (ButtonProps & {
|
||||
color?: "default" | "success" | "warning" | "primary" | "danger" | undefined;
|
||||
color?: "default" | "success" | "primary" | "warning" | "danger" | undefined;
|
||||
fill?: "none" | "solid" | "outline" | undefined;
|
||||
size?: "small" | "middle" | "large" | "mini" | undefined;
|
||||
size?: "small" | "large" | "middle" | "mini" | undefined;
|
||||
block?: boolean | undefined;
|
||||
loading?: boolean | "auto" | undefined;
|
||||
loadingText?: string | undefined;
|
||||
loadingIcon?: import("react").ReactNode;
|
||||
disabled?: boolean | undefined;
|
||||
onClick?: ((event: import("react").MouseEvent<HTMLButtonElement, MouseEvent>) => unknown) | undefined;
|
||||
type?: "button" | "submit" | "reset" | undefined;
|
||||
type?: "reset" | "submit" | "button" | undefined;
|
||||
shape?: "default" | "rounded" | "rectangular" | undefined;
|
||||
children?: import("react").ReactNode;
|
||||
} & Pick<import("react").ClassAttributes<HTMLButtonElement> & import("react").ButtonHTMLAttributes<HTMLButtonElement>, "id" | "onMouseDown" | "onMouseUp" | "onTouchStart" | "onTouchEnd"> & {
|
||||
} & Pick<import("react").ClassAttributes<HTMLButtonElement> & import("react").ButtonHTMLAttributes<HTMLButtonElement>, "id" | "onMouseUp" | "onMouseDown" | "onTouchStart" | "onTouchEnd"> & {
|
||||
className?: string | undefined;
|
||||
style?: (import("react").CSSProperties & Partial<Record<"--text-color" | "--background-color" | "--border-radius" | "--border-width" | "--border-style" | "--border-color", string>>) | undefined;
|
||||
tabIndex?: number | undefined;
|
||||
|
|
|
|||
|
|
@ -4,8 +4,8 @@ declare const _default: (props: import("oak-frontend-base").ReactComponentProps<
|
|||
entity: keyof EntityDict;
|
||||
entityFilter: any;
|
||||
relationIds: string[];
|
||||
rule: "all" | "single" | "free";
|
||||
ruleOnRow: "all" | "single" | "free";
|
||||
rule: "single" | "all" | "free";
|
||||
ruleOnRow: "single" | "all" | "free";
|
||||
onPickRelations: (ids: string[]) => void;
|
||||
onPickRows: (ids: string[]) => void;
|
||||
pickedRowIds: string[] | undefined;
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ declare const _default: (props: import("oak-frontend-base").ReactComponentProps<
|
|||
claimUrl: string;
|
||||
qrCodeType: QrCodeType;
|
||||
multiple: boolean;
|
||||
rule: "all" | "single" | "free";
|
||||
ruleOnRow: "all" | "single" | "free";
|
||||
rule: "single" | "all" | "free";
|
||||
ruleOnRow: "single" | "all" | "free";
|
||||
}>) => React.ReactElement;
|
||||
export default _default;
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ export declare abstract class BackendRuntimeContext<ED extends EntityDict & Base
|
|||
protected rootMode?: boolean;
|
||||
private userId?;
|
||||
refineOpRecords(): Promise<void>;
|
||||
setTokenValue(tokenValue: string, userId?: string): Promise<void>;
|
||||
setTokenValue(tokenValue?: string, userId?: string): Promise<void>;
|
||||
setApplication(appId: string): Promise<void>;
|
||||
initialize(data?: SerializedData, later?: boolean): Promise<void>;
|
||||
getApplicationId(): ED["application"]["Schema"]["id"] | undefined;
|
||||
|
|
|
|||
|
|
@ -123,7 +123,7 @@ export class BackendRuntimeContext extends BRC {
|
|||
if (appId) {
|
||||
promises.push(this.setApplication(appId));
|
||||
}
|
||||
if (tokenValue) {
|
||||
if (tokenValue || userId) {
|
||||
promises.push(this.setTokenValue(tokenValue, userId));
|
||||
}
|
||||
if (promises.length > 0) {
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ export declare abstract class BackendRuntimeContext<ED extends EntityDict & Base
|
|||
protected rootMode?: boolean;
|
||||
private userId?;
|
||||
refineOpRecords(): Promise<void>;
|
||||
setTokenValue(tokenValue: string, userId?: string): Promise<void>;
|
||||
setTokenValue(tokenValue?: string, userId?: string): Promise<void>;
|
||||
setApplication(appId: string): Promise<void>;
|
||||
initialize(data?: SerializedData, later?: boolean): Promise<void>;
|
||||
getApplicationId(): ED["application"]["Schema"]["id"] | undefined;
|
||||
|
|
|
|||
|
|
@ -126,7 +126,7 @@ class BackendRuntimeContext extends oak_frontend_base_1.BackendRuntimeContext {
|
|||
if (appId) {
|
||||
promises.push(this.setApplication(appId));
|
||||
}
|
||||
if (tokenValue) {
|
||||
if (tokenValue || userId) {
|
||||
promises.push(this.setTokenValue(tokenValue, userId));
|
||||
}
|
||||
if (promises.length > 0) {
|
||||
|
|
|
|||
|
|
@ -65,7 +65,7 @@ export abstract class BackendRuntimeContext<ED extends EntityDict & BaseEntityDi
|
|||
}
|
||||
}
|
||||
|
||||
async setTokenValue(tokenValue: string, userId?: string) {
|
||||
async setTokenValue(tokenValue?: string, userId?: string) {
|
||||
if (tokenValue) {
|
||||
// 前台传递
|
||||
const result = await this.select(
|
||||
|
|
@ -162,7 +162,7 @@ export abstract class BackendRuntimeContext<ED extends EntityDict & BaseEntityDi
|
|||
if (appId) {
|
||||
promises.push(this.setApplication(appId));
|
||||
}
|
||||
if (tokenValue) {
|
||||
if (tokenValue || userId) {
|
||||
promises.push(this.setTokenValue(tokenValue, userId));
|
||||
}
|
||||
if (promises.length > 0) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue