debugStore实现了checkRelationAsync接口
This commit is contained in:
parent
75c77b12f5
commit
e9891ac095
|
|
@ -8,5 +8,5 @@ type TransformAspectDict<T extends AspectDict<ED, BCT>, ED extends BaseEntityDic
|
|||
[K in keyof T]: T[K] extends (params: infer P, context: BCT) => infer R ? R extends Promise<unknown> ? (params: P, callback?: (result: R, opRecords?: OpRecord<ED>[]) => void, dontPublish?: true, ignoreContext?: true) => R : never : never;
|
||||
};
|
||||
export type AspectDictTrans<ED extends BaseEntityDict, AD extends AspectDict<ED, BCT>, BCT extends AsyncContext<ED>> = TransformAspectDict<AD & CommonAspectDict<ED>, ED, BCT>;
|
||||
export declare const createService: <ED extends BaseEntityDict, AD extends AspectDict<ED, any>>(cache: import("../features/cache").Cache<ED>) => TransformAspectDict<AD & CommonAspectDict<ED>, ED, any>;
|
||||
export declare const createService: <ED extends BaseEntityDict, AD extends AspectDict<ED, any>>(cache: BasicFeatures<ED>["cache"]) => TransformAspectDict<AD & CommonAspectDict<ED>, ED, any>;
|
||||
export {};
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
export default OakComponent({
|
||||
isList: false,
|
||||
data: {
|
||||
slideWidth: 0,
|
||||
slideLeft: 0,
|
||||
slideShow: false,
|
||||
slideWidth: 0, //小程序使用
|
||||
slideLeft: 0, //小程序使用
|
||||
slideShow: false, //小程序使用
|
||||
commonAction: [
|
||||
'create',
|
||||
'update',
|
||||
|
|
|
|||
|
|
@ -2,12 +2,12 @@ import { ED, OakAbsAttrDef } from '../../types/AbstractComponent';
|
|||
import { ReactComponentProps } from '../../types/Page';
|
||||
import { Breakpoint } from 'antd';
|
||||
declare const _default: <ED2 extends ED, T2 extends keyof ED2>(props: ReactComponentProps<ED2, T2, false, {
|
||||
column?: number | Record<Breakpoint, number> | undefined;
|
||||
column?: number | Record<Breakpoint, number>;
|
||||
entity: T2;
|
||||
attributes: OakAbsAttrDef[];
|
||||
data: Partial<ED2[T2]["Schema"]>;
|
||||
title?: string | undefined;
|
||||
bordered?: boolean | undefined;
|
||||
layout?: "horizontal" | "vertical" | undefined;
|
||||
data: Partial<ED2[T2]['Schema']>;
|
||||
title?: string;
|
||||
bordered?: boolean;
|
||||
layout?: 'horizontal' | 'vertical';
|
||||
}>) => React.ReactElement;
|
||||
export default _default;
|
||||
|
|
|
|||
|
|
@ -61,7 +61,7 @@ export default OakComponent({
|
|||
let currentUrl = event.currentTarget.dataset.src;
|
||||
let urlList = event.currentTarget.dataset.list;
|
||||
wx.previewImage({
|
||||
current: currentUrl,
|
||||
current: currentUrl, // 当前显示图片的http链接
|
||||
urls: urlList, // 需要预览的图片http链接列表
|
||||
});
|
||||
},
|
||||
|
|
|
|||
|
|
@ -3,8 +3,8 @@ import { ReactComponentProps } from '../../types/Page';
|
|||
import { ECode } from '../../types/ErrorPage';
|
||||
declare const _default: <ED2 extends ED, T2 extends keyof ED2>(props: ReactComponentProps<ED2, T2, false, {
|
||||
code: ECode;
|
||||
title?: string | undefined;
|
||||
desc?: string | undefined;
|
||||
title?: string;
|
||||
desc?: string;
|
||||
children?: React.ReactNode;
|
||||
icon?: React.ReactNode;
|
||||
content?: React.ReactNode;
|
||||
|
|
|
|||
|
|
@ -52,7 +52,7 @@ export default OakComponent({
|
|||
code: '',
|
||||
title: '',
|
||||
desc: '',
|
||||
icon: '',
|
||||
icon: '', //web独有
|
||||
imagePath: '', //小程序独有
|
||||
},
|
||||
lifetimes: {
|
||||
|
|
|
|||
|
|
@ -93,7 +93,7 @@ export default OakComponent({
|
|||
attribute: {},
|
||||
options: [],
|
||||
inputType: '',
|
||||
timeStartStr: '',
|
||||
timeStartStr: '', // 小程序选择时间显示
|
||||
timeEndStr: '',
|
||||
selectedLabel: '',
|
||||
minDateMp: new Date(1980, 1, 1).getTime(),
|
||||
|
|
|
|||
|
|
@ -10,18 +10,13 @@ declare const _default: <ED2 extends ED, T2 extends keyof ED2>(props: ReactCompo
|
|||
data: RowWithActions<ED2, T2>[];
|
||||
loading: boolean;
|
||||
tablePagination?: React.ReactNode | false;
|
||||
rowSelection?: import("antd/es/table/interface").TableRowSelection<RowWithActions<ED2, T2>> | undefined;
|
||||
hideHeader?: boolean | undefined;
|
||||
disableSerialNumber?: boolean | undefined;
|
||||
size?: "small" | "large" | "middle" | undefined;
|
||||
scroll?: ({
|
||||
x?: string | number | true | undefined;
|
||||
y?: string | number | undefined;
|
||||
} & {
|
||||
scrollToFirstRowOnChange?: boolean | undefined;
|
||||
}) | undefined;
|
||||
rowSelection?: TableProps<RowWithActions<ED2, T2>>['rowSelection'];
|
||||
hideHeader?: boolean;
|
||||
disableSerialNumber?: boolean;
|
||||
size?: 'large' | 'middle' | 'small';
|
||||
scroll?: TableProps<RowWithActions<ED2, T2>>['scroll'];
|
||||
empty?: React.ReactNode;
|
||||
opWidth?: number | undefined;
|
||||
ellipsis?: boolean | undefined;
|
||||
opWidth?: number;
|
||||
ellipsis?: boolean;
|
||||
}>) => React.ReactElement;
|
||||
export default _default;
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ export default OakComponent({
|
|||
tablePagination: undefined,
|
||||
rowSelection: undefined,
|
||||
hideHeader: false,
|
||||
disableSerialNumber: false,
|
||||
disableSerialNumber: false, //是否禁用序号 默认启用
|
||||
size: 'large',
|
||||
scroll: undefined,
|
||||
empty: undefined,
|
||||
|
|
|
|||
|
|
@ -1,21 +1,20 @@
|
|||
/// <reference types="react" />
|
||||
import { ReactComponentProps } from '../../types/Page';
|
||||
import { ED } from '../../types/AbstractComponent';
|
||||
declare const _default: <ED2 extends ED, T2 extends keyof ED2>(props: ReactComponentProps<ED2, T2, false, {
|
||||
style?: import("react").CSSProperties | undefined;
|
||||
className?: string | undefined;
|
||||
style?: React.CSSProperties;
|
||||
className?: string;
|
||||
title?: React.ReactNode;
|
||||
showBack?: boolean | undefined;
|
||||
onBack?: (() => void) | undefined;
|
||||
showBack?: boolean;
|
||||
onBack?: () => void;
|
||||
backIcon?: React.ReactNode;
|
||||
delta?: number | undefined;
|
||||
delta?: number;
|
||||
extra?: React.ReactNode;
|
||||
subTitle?: React.ReactNode;
|
||||
contentMargin?: boolean | undefined;
|
||||
contentStyle?: import("react").CSSProperties | undefined;
|
||||
contentClassName?: string | undefined;
|
||||
contentMargin?: boolean;
|
||||
contentStyle?: React.CSSProperties;
|
||||
contentClassName?: string;
|
||||
tags?: React.ReactNode;
|
||||
children?: React.ReactNode;
|
||||
showHeader?: boolean | undefined;
|
||||
showHeader?: boolean;
|
||||
}>) => React.ReactElement;
|
||||
export default _default;
|
||||
|
|
|
|||
|
|
@ -1,23 +1,22 @@
|
|||
/// <reference types="react" />
|
||||
import { ReactComponentProps } from '../../types/Page';
|
||||
import { ED } from '../../types/AbstractComponent';
|
||||
declare const _default: <ED2 extends ED, T2 extends keyof ED2>(props: ReactComponentProps<ED2, T2, false, {
|
||||
style?: import("react").CSSProperties | undefined;
|
||||
className?: string | undefined;
|
||||
showHeader?: boolean | undefined;
|
||||
showBack?: boolean | undefined;
|
||||
onBack?: (() => void) | undefined;
|
||||
style?: React.CSSProperties;
|
||||
className?: string;
|
||||
showHeader?: boolean;
|
||||
showBack?: boolean;
|
||||
onBack?: () => void;
|
||||
backIcon?: React.ReactNode;
|
||||
delta?: number | undefined;
|
||||
delta?: number;
|
||||
title?: React.ReactNode;
|
||||
subTitle?: React.ReactNode;
|
||||
tags?: React.ReactNode;
|
||||
extra?: React.ReactNode;
|
||||
children?: React.ReactNode;
|
||||
content: React.ReactNode;
|
||||
contentStyle?: import("react").CSSProperties | undefined;
|
||||
contentClassName?: string | undefined;
|
||||
bodyStyle?: import("react").CSSProperties | undefined;
|
||||
bodyClassName?: string | undefined;
|
||||
contentStyle?: React.CSSProperties;
|
||||
contentClassName?: string;
|
||||
bodyStyle?: React.CSSProperties;
|
||||
bodyClassName?: string;
|
||||
}>) => React.ReactElement;
|
||||
export default _default;
|
||||
|
|
|
|||
|
|
@ -1,13 +1,12 @@
|
|||
/// <reference types="react" />
|
||||
import { ReactComponentProps } from '../../types/Page';
|
||||
import { ED } from '../../types/AbstractComponent';
|
||||
declare const _default: <ED2 extends ED, T2 extends keyof ED2>(props: ReactComponentProps<ED2, T2, false, {
|
||||
entity: T2;
|
||||
style?: import("react").CSSProperties | undefined;
|
||||
className?: string | undefined;
|
||||
showQuickJumper?: boolean | undefined;
|
||||
size?: "small" | "default" | undefined;
|
||||
showSizeChanger?: boolean | undefined;
|
||||
showTotal?: ((total: number, range: [number, number]) => React.ReactNode) | undefined;
|
||||
style?: React.CSSProperties;
|
||||
className?: string;
|
||||
showQuickJumper?: boolean;
|
||||
size?: 'default' | 'small';
|
||||
showSizeChanger?: boolean;
|
||||
showTotal?: (total: number, range: [number, number]) => React.ReactNode;
|
||||
}>) => React.ReactElement;
|
||||
export default _default;
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ export default OakComponent({
|
|||
multiple: false,
|
||||
entityId: '',
|
||||
entityIds: [],
|
||||
pickerRender: {},
|
||||
pickerRender: {}, // OakAbsRefAttrPickerRender
|
||||
onChange: (() => undefined),
|
||||
},
|
||||
formData() {
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ declare const _default: <ED2 extends ED, T2 extends keyof ED2, T3 extends string
|
|||
helps: Record<string, string>;
|
||||
entity: T2;
|
||||
attributes: OakAbsAttrUpsertDef<ED2, T2, T3>[];
|
||||
data: ED2[T2]["Schema"];
|
||||
data: ED2[T2]['Schema'];
|
||||
layout: 'horizontal' | 'vertical';
|
||||
mode: 'default' | 'card';
|
||||
}>) => React.ReactElement;
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ export default OakComponent({
|
|||
return this.props.entity;
|
||||
},
|
||||
properties: {
|
||||
helps: {},
|
||||
helps: {}, // Record<string, string>;
|
||||
entity: '',
|
||||
attributes: [],
|
||||
layout: 'horizontal',
|
||||
|
|
|
|||
|
|
@ -18,6 +18,7 @@ export declare class DebugStore<ED extends EntityDict & BaseEntityDict, Cxt exte
|
|||
constructor(storageSchema: StorageSchema<ED>, contextBuilder: (store: DebugStore<ED, Cxt>) => Cxt, authDeduceRelationMap: AuthDeduceRelationMap<ED>, selectFreeEntities?: (keyof ED)[], updateFreeDict?: {
|
||||
[A in keyof ED]?: string[];
|
||||
});
|
||||
checkRelationAsync<T extends keyof ED, Cxt extends AsyncContext<ED>>(entity: T, operation: Omit<ED[T]["Operation"] | ED[T]["Selection"], "id">, context: Cxt): Promise<void>;
|
||||
exec(script: string, txnId?: string): Promise<void>;
|
||||
aggregate<T extends keyof ED, OP extends SelectOption>(entity: T, aggregation: ED[T]["Aggregation"], context: Cxt, option: OP): Promise<AggregationResult<ED[T]["Schema"]>>;
|
||||
begin(option?: TxnOption): Promise<string>;
|
||||
|
|
|
|||
|
|
@ -18,6 +18,9 @@ export class DebugStore extends TreeStore {
|
|||
this.executor = new TriggerExecutor(() => contextBuilder(this));
|
||||
this.relationAuth = new RelationAuth(storageSchema, authDeduceRelationMap, selectFreeEntities, updateFreeDict);
|
||||
}
|
||||
checkRelationAsync(entity, operation, context) {
|
||||
return this.relationAuth.checkRelationAsync(entity, operation, context);
|
||||
}
|
||||
async exec(script, txnId) {
|
||||
throw new Error('debugStore dont support exec script directly');
|
||||
}
|
||||
|
|
|
|||
|
|
@ -427,7 +427,7 @@ export class Cache extends Feature {
|
|||
opers.forEach((oper) => {
|
||||
const { entity, operation } = oper;
|
||||
this.cacheStore.operate(entity, operation, this.context, {
|
||||
checkerTypes: ['logical'],
|
||||
checkerTypes: ['logical'], // 这里不能检查data,不然在数据没填完前会有大量异常
|
||||
dontCollect: true,
|
||||
});
|
||||
});
|
||||
|
|
|
|||
|
|
@ -49,21 +49,21 @@ export declare function createComponent<IsList extends boolean, ED extends Entit
|
|||
redirectTo<T2_1 extends keyof ED>(options: {
|
||||
url: string;
|
||||
} & OakNavigateToParameters<ED, T2_1>, state?: Record<string, any> | undefined, disableNamespace?: boolean | undefined): Promise<void>;
|
||||
addItem<T extends keyof ED>(data: Omit<ED[T]["CreateSingle"]["data"], "id"> & {
|
||||
addItem<T_1 extends keyof ED>(data: Omit<ED[T_1]["CreateSingle"]["data"], "id"> & {
|
||||
id?: string | undefined;
|
||||
}, path?: string | undefined): string;
|
||||
addItems<T_1 extends keyof ED>(data: (Omit<ED[T_1]["CreateSingle"]["data"], "id"> & {
|
||||
addItems<T_2 extends keyof ED>(data: (Omit<ED[T_2]["CreateSingle"]["data"], "id"> & {
|
||||
id?: string | undefined;
|
||||
})[], path?: string | undefined): string[];
|
||||
removeItem(id: string, path?: string | undefined): void;
|
||||
removeItems(ids: string[], path?: string | undefined): void;
|
||||
updateItem<T_2 extends keyof ED>(data: ED[T_2]["Update"]["data"], id: string, action?: ED[T_2]["Action"] | undefined, path?: string | undefined): void;
|
||||
updateItems<T_3 extends keyof ED>(data: ED[T_3]["Update"]["data"], ids: string[], action?: ED[T_3]["Action"] | undefined, path?: string | undefined): void;
|
||||
updateItem<T_3 extends keyof ED>(data: ED[T_3]["Update"]["data"], id: string, action?: ED[T_3]["Action"] | undefined, path?: string | undefined): void;
|
||||
updateItems<T_4 extends keyof ED>(data: ED[T_4]["Update"]["data"], ids: string[], action?: ED[T_4]["Action"] | undefined, path?: string | undefined): void;
|
||||
recoverItem(id: string, path?: string | undefined): void;
|
||||
recoverItems(ids: string[], path?: string | undefined): void;
|
||||
resetItem(id: string, path?: string | undefined): void;
|
||||
update<T_4 extends keyof ED>(data: ED[T_4]["Update"]["data"], action?: ED[T_4]["Action"] | undefined, path?: string | undefined): void;
|
||||
create<T_5 extends keyof ED>(data: Omit<ED[T_5]["CreateSingle"]["data"], "id">, path?: string | undefined): void;
|
||||
update<T_5 extends keyof ED>(data: ED[T_5]["Update"]["data"], action?: ED[T_5]["Action"] | undefined, path?: string | undefined): void;
|
||||
create<T_6 extends keyof ED>(data: Omit<ED[T_6]["CreateSingle"]["data"], "id">, path?: string | undefined): void;
|
||||
remove(path?: string | undefined): void;
|
||||
isCreation(path?: string | undefined): boolean;
|
||||
clean(lsn?: number | undefined, dontPublish?: true | undefined, path?: string | undefined): void;
|
||||
|
|
@ -78,7 +78,7 @@ export declare function createComponent<IsList extends boolean, ED extends Entit
|
|||
select<T2_2 extends keyof ED>(entity: T2_2, selection: ED[T2_2]["Selection"]): Partial<import("oak-domain/lib/types").GeneralEntityShape>[];
|
||||
checkOperation<T2_3 extends keyof ED>(entity: T2_3, operation: Omit<ED[T2_3]["Operation"], "id">, checkerTypes?: CheckerType[] | undefined, cacheInsensative?: true | undefined): boolean | { [A in ED[T2_3]["Action"]]: boolean | import("oak-domain/lib/types").OakUserException<ED>; }[ED[T2_3]["Action"]];
|
||||
tryExecute(path?: string | undefined, action?: string | undefined): boolean | { [A_1 in ED[keyof ED]["Action"]]: boolean | import("oak-domain/lib/types").OakUserException<ED>; }[ED[keyof ED]["Action"]];
|
||||
getOperations<T_6 extends keyof ED>(path?: string | undefined): {
|
||||
getOperations<T_7 extends keyof ED>(path?: string | undefined): {
|
||||
entity: keyof ED;
|
||||
operation: ED[keyof ED]["Operation"];
|
||||
}[] | undefined;
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import React from 'react';
|
||||
export const keys = ['xs', 'sm', 'md', 'lg', 'xl', 'xxl'];
|
||||
export const values = {
|
||||
xs: 576,
|
||||
xs: 576, //小于576
|
||||
sm: 576,
|
||||
md: 768,
|
||||
lg: 992,
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ export declare enum ECode {
|
|||
networkError = "network-error",
|
||||
browserIncompatible = "browser-incompatible",
|
||||
maintenance = "maintenance",
|
||||
pageCrash = "pageCrash",
|
||||
pageUpdate = "pageUpdate",
|
||||
pageCrash = "pageCrash",// 页面崩溃
|
||||
pageUpdate = "pageUpdate",// 页面更新
|
||||
pageDataCacheFailure = "pageDataCacheFailure"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -8,5 +8,5 @@ type TransformAspectDict<T extends AspectDict<ED, BCT>, ED extends BaseEntityDic
|
|||
[K in keyof T]: T[K] extends (params: infer P, context: BCT) => infer R ? R extends Promise<unknown> ? (params: P, callback?: (result: R, opRecords?: OpRecord<ED>[]) => void, dontPublish?: true, ignoreContext?: true) => R : never : never;
|
||||
};
|
||||
export type AspectDictTrans<ED extends BaseEntityDict, AD extends AspectDict<ED, BCT>, BCT extends AsyncContext<ED>> = TransformAspectDict<AD & CommonAspectDict<ED>, ED, BCT>;
|
||||
export declare const createService: <ED extends BaseEntityDict, AD extends AspectDict<ED, any>>(cache: import("../features/cache").Cache<ED>) => TransformAspectDict<AD & CommonAspectDict<ED>, ED, any>;
|
||||
export declare const createService: <ED extends BaseEntityDict, AD extends AspectDict<ED, any>>(cache: BasicFeatures<ED>["cache"]) => TransformAspectDict<AD & CommonAspectDict<ED>, ED, any>;
|
||||
export {};
|
||||
|
|
|
|||
|
|
@ -18,6 +18,7 @@ export declare class DebugStore<ED extends EntityDict & BaseEntityDict, Cxt exte
|
|||
constructor(storageSchema: StorageSchema<ED>, contextBuilder: (store: DebugStore<ED, Cxt>) => Cxt, authDeduceRelationMap: AuthDeduceRelationMap<ED>, selectFreeEntities?: (keyof ED)[], updateFreeDict?: {
|
||||
[A in keyof ED]?: string[];
|
||||
});
|
||||
checkRelationAsync<T extends keyof ED, Cxt extends AsyncContext<ED>>(entity: T, operation: Omit<ED[T]["Operation"] | ED[T]["Selection"], "id">, context: Cxt): Promise<void>;
|
||||
exec(script: string, txnId?: string): Promise<void>;
|
||||
aggregate<T extends keyof ED, OP extends SelectOption>(entity: T, aggregation: ED[T]["Aggregation"], context: Cxt, option: OP): Promise<AggregationResult<ED[T]["Schema"]>>;
|
||||
begin(option?: TxnOption): Promise<string>;
|
||||
|
|
|
|||
|
|
@ -21,6 +21,9 @@ class DebugStore extends oak_memory_tree_store_1.TreeStore {
|
|||
this.executor = new TriggerExecutor_1.TriggerExecutor(() => contextBuilder(this));
|
||||
this.relationAuth = new RelationAuth_1.RelationAuth(storageSchema, authDeduceRelationMap, selectFreeEntities, updateFreeDict);
|
||||
}
|
||||
checkRelationAsync(entity, operation, context) {
|
||||
return this.relationAuth.checkRelationAsync(entity, operation, context);
|
||||
}
|
||||
async exec(script, txnId) {
|
||||
throw new Error('debugStore dont support exec script directly');
|
||||
}
|
||||
|
|
|
|||
|
|
@ -430,7 +430,7 @@ class Cache extends Feature_1.Feature {
|
|||
opers.forEach((oper) => {
|
||||
const { entity, operation } = oper;
|
||||
this.cacheStore.operate(entity, operation, this.context, {
|
||||
checkerTypes: ['logical'],
|
||||
checkerTypes: ['logical'], // 这里不能检查data,不然在数据没填完前会有大量异常
|
||||
dontCollect: true,
|
||||
});
|
||||
});
|
||||
|
|
|
|||
|
|
@ -49,21 +49,21 @@ export declare function createComponent<IsList extends boolean, ED extends Entit
|
|||
redirectTo<T2_1 extends keyof ED>(options: {
|
||||
url: string;
|
||||
} & OakNavigateToParameters<ED, T2_1>, state?: Record<string, any> | undefined, disableNamespace?: boolean | undefined): Promise<void>;
|
||||
addItem<T extends keyof ED>(data: Omit<ED[T]["CreateSingle"]["data"], "id"> & {
|
||||
addItem<T_1 extends keyof ED>(data: Omit<ED[T_1]["CreateSingle"]["data"], "id"> & {
|
||||
id?: string | undefined;
|
||||
}, path?: string | undefined): string;
|
||||
addItems<T_1 extends keyof ED>(data: (Omit<ED[T_1]["CreateSingle"]["data"], "id"> & {
|
||||
addItems<T_2 extends keyof ED>(data: (Omit<ED[T_2]["CreateSingle"]["data"], "id"> & {
|
||||
id?: string | undefined;
|
||||
})[], path?: string | undefined): string[];
|
||||
removeItem(id: string, path?: string | undefined): void;
|
||||
removeItems(ids: string[], path?: string | undefined): void;
|
||||
updateItem<T_2 extends keyof ED>(data: ED[T_2]["Update"]["data"], id: string, action?: ED[T_2]["Action"] | undefined, path?: string | undefined): void;
|
||||
updateItems<T_3 extends keyof ED>(data: ED[T_3]["Update"]["data"], ids: string[], action?: ED[T_3]["Action"] | undefined, path?: string | undefined): void;
|
||||
updateItem<T_3 extends keyof ED>(data: ED[T_3]["Update"]["data"], id: string, action?: ED[T_3]["Action"] | undefined, path?: string | undefined): void;
|
||||
updateItems<T_4 extends keyof ED>(data: ED[T_4]["Update"]["data"], ids: string[], action?: ED[T_4]["Action"] | undefined, path?: string | undefined): void;
|
||||
recoverItem(id: string, path?: string | undefined): void;
|
||||
recoverItems(ids: string[], path?: string | undefined): void;
|
||||
resetItem(id: string, path?: string | undefined): void;
|
||||
update<T_4 extends keyof ED>(data: ED[T_4]["Update"]["data"], action?: ED[T_4]["Action"] | undefined, path?: string | undefined): void;
|
||||
create<T_5 extends keyof ED>(data: Omit<ED[T_5]["CreateSingle"]["data"], "id">, path?: string | undefined): void;
|
||||
update<T_5 extends keyof ED>(data: ED[T_5]["Update"]["data"], action?: ED[T_5]["Action"] | undefined, path?: string | undefined): void;
|
||||
create<T_6 extends keyof ED>(data: Omit<ED[T_6]["CreateSingle"]["data"], "id">, path?: string | undefined): void;
|
||||
remove(path?: string | undefined): void;
|
||||
isCreation(path?: string | undefined): boolean;
|
||||
clean(lsn?: number | undefined, dontPublish?: true | undefined, path?: string | undefined): void;
|
||||
|
|
@ -78,7 +78,7 @@ export declare function createComponent<IsList extends boolean, ED extends Entit
|
|||
select<T2_2 extends keyof ED>(entity: T2_2, selection: ED[T2_2]["Selection"]): Partial<import("oak-domain/lib/types").GeneralEntityShape>[];
|
||||
checkOperation<T2_3 extends keyof ED>(entity: T2_3, operation: Omit<ED[T2_3]["Operation"], "id">, checkerTypes?: CheckerType[] | undefined, cacheInsensative?: true | undefined): boolean | { [A in ED[T2_3]["Action"]]: boolean | import("oak-domain/lib/types").OakUserException<ED>; }[ED[T2_3]["Action"]];
|
||||
tryExecute(path?: string | undefined, action?: string | undefined): boolean | { [A_1 in ED[keyof ED]["Action"]]: boolean | import("oak-domain/lib/types").OakUserException<ED>; }[ED[keyof ED]["Action"]];
|
||||
getOperations<T_6 extends keyof ED>(path?: string | undefined): {
|
||||
getOperations<T_7 extends keyof ED>(path?: string | undefined): {
|
||||
entity: keyof ED;
|
||||
operation: ED[keyof ED]["Operation"];
|
||||
}[] | undefined;
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ const tslib_1 = require("tslib");
|
|||
const react_1 = tslib_1.__importDefault(require("react"));
|
||||
exports.keys = ['xs', 'sm', 'md', 'lg', 'xl', 'xxl'];
|
||||
exports.values = {
|
||||
xs: 576,
|
||||
xs: 576, //小于576
|
||||
sm: 576,
|
||||
md: 768,
|
||||
lg: 992,
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ export declare enum ECode {
|
|||
networkError = "network-error",
|
||||
browserIncompatible = "browser-incompatible",
|
||||
maintenance = "maintenance",
|
||||
pageCrash = "pageCrash",
|
||||
pageUpdate = "pageUpdate",
|
||||
pageCrash = "pageCrash",// 页面崩溃
|
||||
pageUpdate = "pageUpdate",// 页面更新
|
||||
pageDataCacheFailure = "pageDataCacheFailure"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -42,6 +42,10 @@ export class DebugStore<ED extends EntityDict & BaseEntityDict, Cxt extends Asyn
|
|||
this.relationAuth = new RelationAuth(storageSchema, authDeduceRelationMap, selectFreeEntities, updateFreeDict);
|
||||
}
|
||||
|
||||
checkRelationAsync<T extends keyof ED, Cxt extends AsyncContext<ED>>(entity: T, operation: Omit<ED[T]["Operation"] | ED[T]["Selection"], "id">, context: Cxt): Promise<void> {
|
||||
return this.relationAuth.checkRelationAsync(entity, operation, context);
|
||||
}
|
||||
|
||||
async exec(script: string, txnId?: string) {
|
||||
throw new Error('debugStore dont support exec script directly');
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue