diff --git a/es/aspects/AspectService.d.ts b/es/aspects/AspectService.d.ts index cbd45209..6c2660ea 100644 --- a/es/aspects/AspectService.d.ts +++ b/es/aspects/AspectService.d.ts @@ -8,5 +8,5 @@ type TransformAspectDict, ED extends BaseEntityDic [K in keyof T]: T[K] extends (params: infer P, context: BCT) => infer R ? R extends Promise ? (params: P, callback?: (result: R, opRecords?: OpRecord[]) => void, dontPublish?: true, ignoreContext?: true) => R : never : never; }; export type AspectDictTrans, BCT extends AsyncContext> = TransformAspectDict, ED, BCT>; -export declare const createService: >(cache: BasicFeatures["cache"]) => TransformAspectDict, ED, any>; +export declare const createService: >(cache: import("../features/cache").Cache) => TransformAspectDict, ED, any>; export {}; diff --git a/es/components/actionTabPanel/index.js b/es/components/actionTabPanel/index.js index 1019b0e6..334680cc 100644 --- a/es/components/actionTabPanel/index.js +++ b/es/components/actionTabPanel/index.js @@ -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', diff --git a/es/components/detail/index.d.ts b/es/components/detail/index.d.ts index 633eebb3..bc0497c0 100644 --- a/es/components/detail/index.d.ts +++ b/es/components/detail/index.d.ts @@ -2,12 +2,12 @@ import { ED, OakAbsAttrDef } from '../../types/AbstractComponent'; import { ReactComponentProps } from '../../types/Page'; import { Breakpoint } from 'antd'; declare const _default: (props: ReactComponentProps; + column?: number | Record | undefined; entity: T2; attributes: OakAbsAttrDef[]; - data: Partial; - title?: string; - bordered?: boolean; - layout?: 'horizontal' | 'vertical'; + data: Partial; + title?: string | undefined; + bordered?: boolean | undefined; + layout?: "horizontal" | "vertical" | undefined; }>) => React.ReactElement; export default _default; diff --git a/es/components/detail/index.js b/es/components/detail/index.js index 2f123a1c..189d1831 100644 --- a/es/components/detail/index.js +++ b/es/components/detail/index.js @@ -61,7 +61,7 @@ export default OakComponent({ let currentUrl = event.currentTarget.dataset.src; let urlList = event.currentTarget.dataset.list; wx.previewImage({ - current: currentUrl, // 当前显示图片的http链接 + current: currentUrl, urls: urlList, // 需要预览的图片http链接列表 }); }, diff --git a/es/components/errorPage/index.d.ts b/es/components/errorPage/index.d.ts index b1cb64f5..637b5428 100644 --- a/es/components/errorPage/index.d.ts +++ b/es/components/errorPage/index.d.ts @@ -3,8 +3,8 @@ import { ReactComponentProps } from '../../types/Page'; import { ECode } from '../../types/ErrorPage'; declare const _default: (props: ReactComponentProps) => React.ReactElement; diff --git a/es/components/errorPage/index.js b/es/components/errorPage/index.js index 06597a8f..77682a75 100644 --- a/es/components/errorPage/index.js +++ b/es/components/errorPage/index.js @@ -37,7 +37,7 @@ export default OakComponent({ code: '', title: '', desc: '', - icon: '', //web独有 + icon: '', imagePath: '', //小程序独有 }, lifetimes: { diff --git a/es/components/filter/index.js b/es/components/filter/index.js index 9aaf28d0..93ab636e 100644 --- a/es/components/filter/index.js +++ b/es/components/filter/index.js @@ -93,7 +93,7 @@ export default OakComponent({ attribute: {}, options: [], inputType: '', - timeStartStr: '', // 小程序选择时间显示 + timeStartStr: '', timeEndStr: '', selectedLabel: '', minDateMp: new Date(1980, 1, 1).getTime(), diff --git a/es/components/list/index.d.ts b/es/components/list/index.d.ts index fee0097c..dba7ca05 100644 --- a/es/components/list/index.d.ts +++ b/es/components/list/index.d.ts @@ -10,13 +10,18 @@ declare const _default: (props: ReactCompo data: RowWithActions[]; loading: boolean; tablePagination?: React.ReactNode | false; - rowSelection?: TableProps>['rowSelection']; - hideHeader?: boolean; - disableSerialNumber?: boolean; - size?: 'large' | 'middle' | 'small'; - scroll?: TableProps>['scroll']; + rowSelection?: import("antd/es/table/interface").TableRowSelection> | 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; empty?: React.ReactNode; - opWidth?: number; - ellipsis?: boolean; + opWidth?: number | undefined; + ellipsis?: boolean | undefined; }>) => React.ReactElement; export default _default; diff --git a/es/components/list/index.js b/es/components/list/index.js index 59480dd7..33980d7e 100644 --- a/es/components/list/index.js +++ b/es/components/list/index.js @@ -13,7 +13,7 @@ export default OakComponent({ tablePagination: undefined, rowSelection: undefined, hideHeader: false, - disableSerialNumber: false, //是否禁用序号 默认启用 + disableSerialNumber: false, size: 'large', scroll: undefined, empty: undefined, diff --git a/es/components/pageHeader/index.d.ts b/es/components/pageHeader/index.d.ts index de716fe3..f25d157d 100644 --- a/es/components/pageHeader/index.d.ts +++ b/es/components/pageHeader/index.d.ts @@ -1,20 +1,21 @@ +/// import { ReactComponentProps } from '../../types/Page'; import { ED } from '../../types/AbstractComponent'; declare const _default: (props: ReactComponentProps void; + showBack?: boolean | undefined; + onBack?: (() => void) | undefined; backIcon?: React.ReactNode; - delta?: number; + delta?: number | undefined; extra?: React.ReactNode; subTitle?: React.ReactNode; - contentMargin?: boolean; - contentStyle?: React.CSSProperties; - contentClassName?: string; + contentMargin?: boolean | undefined; + contentStyle?: import("react").CSSProperties | undefined; + contentClassName?: string | undefined; tags?: React.ReactNode; children?: React.ReactNode; - showHeader?: boolean; + showHeader?: boolean | undefined; }>) => React.ReactElement; export default _default; diff --git a/es/components/pageHeader2/index.d.ts b/es/components/pageHeader2/index.d.ts index 7e219729..554c89f9 100644 --- a/es/components/pageHeader2/index.d.ts +++ b/es/components/pageHeader2/index.d.ts @@ -1,22 +1,23 @@ +/// import { ReactComponentProps } from '../../types/Page'; import { ED } from '../../types/AbstractComponent'; declare const _default: (props: ReactComponentProps void; + style?: import("react").CSSProperties | undefined; + className?: string | undefined; + showHeader?: boolean | undefined; + showBack?: boolean | undefined; + onBack?: (() => void) | undefined; backIcon?: React.ReactNode; - delta?: number; + delta?: number | undefined; title?: React.ReactNode; subTitle?: React.ReactNode; tags?: React.ReactNode; extra?: React.ReactNode; children?: React.ReactNode; content: React.ReactNode; - contentStyle?: React.CSSProperties; - contentClassName?: string; - bodyStyle?: React.CSSProperties; - bodyClassName?: string; + contentStyle?: import("react").CSSProperties | undefined; + contentClassName?: string | undefined; + bodyStyle?: import("react").CSSProperties | undefined; + bodyClassName?: string | undefined; }>) => React.ReactElement; export default _default; diff --git a/es/components/pagination/index.d.ts b/es/components/pagination/index.d.ts index 7e393cff..0e7e783f 100644 --- a/es/components/pagination/index.d.ts +++ b/es/components/pagination/index.d.ts @@ -1,12 +1,13 @@ +/// import { ReactComponentProps } from '../../types/Page'; import { ED } from '../../types/AbstractComponent'; declare const _default: (props: ReactComponentProps React.ReactNode; + 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; }>) => React.ReactElement; export default _default; diff --git a/es/components/refAttr/index.js b/es/components/refAttr/index.js index 6c92bb93..a98ea981 100644 --- a/es/components/refAttr/index.js +++ b/es/components/refAttr/index.js @@ -9,7 +9,7 @@ export default OakComponent({ multiple: false, entityId: '', entityIds: [], - pickerRender: {}, // OakAbsRefAttrPickerRender + pickerRender: {}, onChange: (() => undefined), }, formData() { diff --git a/es/components/upsert/index.d.ts b/es/components/upsert/index.d.ts index b81a5408..35a7fb5e 100644 --- a/es/components/upsert/index.d.ts +++ b/es/components/upsert/index.d.ts @@ -4,7 +4,7 @@ declare const _default: ; entity: T2; attributes: OakAbsAttrUpsertDef[]; - data: ED2[T2]['Schema']; + data: ED2[T2]["Schema"]; layout: 'horizontal' | 'vertical'; mode: 'default' | 'card'; }>) => React.ReactElement; diff --git a/es/components/upsert/index.js b/es/components/upsert/index.js index 38d769fd..d9561533 100644 --- a/es/components/upsert/index.js +++ b/es/components/upsert/index.js @@ -5,7 +5,7 @@ export default OakComponent({ return this.props.entity; }, properties: { - helps: {}, // Record; + helps: {}, entity: '', attributes: [], layout: 'horizontal', diff --git a/es/features/cache.js b/es/features/cache.js index b1d64b45..d41f6ed9 100644 --- a/es/features/cache.js +++ b/es/features/cache.js @@ -411,7 +411,7 @@ export class Cache extends Feature { opers.forEach((oper) => { const { entity, operation } = oper; this.cacheStore.operate(entity, operation, this.context, { - checkerTypes: ['logical'], // 这里不能检查data,不然在数据没填完前会有大量异常 + checkerTypes: ['logical'], dontCollect: true, }); }); diff --git a/es/features/runningTree.d.ts b/es/features/runningTree.d.ts index 8ab9fd35..45389432 100644 --- a/es/features/runningTree.d.ts +++ b/es/features/runningTree.d.ts @@ -179,7 +179,7 @@ declare class ListNode['select']>>, append?: boolean, currentPage?: number): void; - refresh(pageNumber?: number, append?: boolean, resetTotal?: number): Promise; + refresh(pageNumber?: number, append?: boolean, resetTotal?: boolean): Promise; loadMore(): Promise; setCurrentPage(currentPage: number): void; clean(lsn?: number, dontPublish?: true): void; diff --git a/es/features/runningTree.js b/es/features/runningTree.js index 8acc9c93..65c9893c 100644 --- a/es/features/runningTree.js +++ b/es/features/runningTree.js @@ -631,7 +631,7 @@ class ListNode extends EntityNode { this.filters.splice(fIndex, 1); } if (refresh) { - this.refresh(0, false); + this.refresh(0, false, true); } else { this.publish(); @@ -644,7 +644,7 @@ class ListNode extends EntityNode { this.filters.splice(fIndex, 1); } if (refresh) { - this.refresh(0, false); + this.refresh(0, false, true); } else { this.publish(); diff --git a/es/page.react.d.ts b/es/page.react.d.ts index 04b78984..63f5e293 100644 --- a/es/page.react.d.ts +++ b/es/page.react.d.ts @@ -49,21 +49,21 @@ export declare function createComponent(options: { url: string; } & OakNavigateToParameters, state?: Record | undefined, disableNamespace?: boolean | undefined): Promise; - addItem(data: Omit & { + addItem(data: Omit & { id?: string | undefined; }, path?: string | undefined): string; - addItems(data: (Omit & { + addItems(data: (Omit & { id?: string | undefined; })[], path?: string | undefined): string[]; removeItem(id: string, path?: string | undefined): void; removeItems(ids: string[], path?: string | undefined): void; - updateItem(data: ED[T_3]["Update"]["data"], id: string, action?: ED[T_3]["Action"] | undefined, path?: string | undefined): void; - updateItems(data: ED[T_4]["Update"]["data"], ids: string[], action?: ED[T_4]["Action"] | undefined, path?: string | undefined): void; + updateItem(data: ED[T_2]["Update"]["data"], id: string, action?: ED[T_2]["Action"] | undefined, path?: string | undefined): void; + updateItems(data: ED[T_3]["Update"]["data"], ids: string[], action?: ED[T_3]["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(data: ED[T_5]["Update"]["data"], action?: ED[T_5]["Action"] | undefined, path?: string | undefined): void; - create(data: Omit, path?: string | undefined): void; + update(data: ED[T_4]["Update"]["data"], action?: ED[T_4]["Action"] | undefined, path?: string | undefined): void; + create(data: Omit, 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(entity: T2_2, selection: ED[T2_2]["Selection"]): Partial[]; checkOperation(entity: T2_3, operation: Omit, checkerTypes?: CheckerType[] | undefined): boolean | { [A in ED[T2_3]["Action"]]: boolean | import("oak-domain/lib/types").OakUserException; }[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[keyof ED]["Action"]]; - getOperations(path?: string | undefined): { + getOperations(path?: string | undefined): { entity: keyof ED; operation: ED[keyof ED]["Operation"]; }[] | undefined; diff --git a/es/platforms/web/responsive/context.js b/es/platforms/web/responsive/context.js index 1f1c4d3f..160db654 100644 --- a/es/platforms/web/responsive/context.js +++ b/es/platforms/web/responsive/context.js @@ -1,7 +1,7 @@ import React from 'react'; export const keys = ['xs', 'sm', 'md', 'lg', 'xl', 'xxl']; export const values = { - xs: 576, //小于576 + xs: 576, sm: 576, md: 768, lg: 992, diff --git a/lib/aspects/AspectService.d.ts b/lib/aspects/AspectService.d.ts index cbd45209..6c2660ea 100644 --- a/lib/aspects/AspectService.d.ts +++ b/lib/aspects/AspectService.d.ts @@ -8,5 +8,5 @@ type TransformAspectDict, ED extends BaseEntityDic [K in keyof T]: T[K] extends (params: infer P, context: BCT) => infer R ? R extends Promise ? (params: P, callback?: (result: R, opRecords?: OpRecord[]) => void, dontPublish?: true, ignoreContext?: true) => R : never : never; }; export type AspectDictTrans, BCT extends AsyncContext> = TransformAspectDict, ED, BCT>; -export declare const createService: >(cache: BasicFeatures["cache"]) => TransformAspectDict, ED, any>; +export declare const createService: >(cache: import("../features/cache").Cache) => TransformAspectDict, ED, any>; export {}; diff --git a/lib/features/cache.js b/lib/features/cache.js index f02aee3b..1c48a482 100644 --- a/lib/features/cache.js +++ b/lib/features/cache.js @@ -414,7 +414,7 @@ class Cache extends Feature_1.Feature { opers.forEach((oper) => { const { entity, operation } = oper; this.cacheStore.operate(entity, operation, this.context, { - checkerTypes: ['logical'], // 这里不能检查data,不然在数据没填完前会有大量异常 + checkerTypes: ['logical'], dontCollect: true, }); }); diff --git a/lib/features/runningTree.d.ts b/lib/features/runningTree.d.ts index 8ab9fd35..45389432 100644 --- a/lib/features/runningTree.d.ts +++ b/lib/features/runningTree.d.ts @@ -179,7 +179,7 @@ declare class ListNode['select']>>, append?: boolean, currentPage?: number): void; - refresh(pageNumber?: number, append?: boolean, resetTotal?: number): Promise; + refresh(pageNumber?: number, append?: boolean, resetTotal?: boolean): Promise; loadMore(): Promise; setCurrentPage(currentPage: number): void; clean(lsn?: number, dontPublish?: true): void; diff --git a/lib/features/runningTree.js b/lib/features/runningTree.js index dd507886..441d8e14 100644 --- a/lib/features/runningTree.js +++ b/lib/features/runningTree.js @@ -634,7 +634,7 @@ class ListNode extends EntityNode { this.filters.splice(fIndex, 1); } if (refresh) { - this.refresh(0, false); + this.refresh(0, false, true); } else { this.publish(); @@ -647,7 +647,7 @@ class ListNode extends EntityNode { this.filters.splice(fIndex, 1); } if (refresh) { - this.refresh(0, false); + this.refresh(0, false, true); } else { this.publish(); diff --git a/lib/page.react.d.ts b/lib/page.react.d.ts index 04b78984..63f5e293 100644 --- a/lib/page.react.d.ts +++ b/lib/page.react.d.ts @@ -49,21 +49,21 @@ export declare function createComponent(options: { url: string; } & OakNavigateToParameters, state?: Record | undefined, disableNamespace?: boolean | undefined): Promise; - addItem(data: Omit & { + addItem(data: Omit & { id?: string | undefined; }, path?: string | undefined): string; - addItems(data: (Omit & { + addItems(data: (Omit & { id?: string | undefined; })[], path?: string | undefined): string[]; removeItem(id: string, path?: string | undefined): void; removeItems(ids: string[], path?: string | undefined): void; - updateItem(data: ED[T_3]["Update"]["data"], id: string, action?: ED[T_3]["Action"] | undefined, path?: string | undefined): void; - updateItems(data: ED[T_4]["Update"]["data"], ids: string[], action?: ED[T_4]["Action"] | undefined, path?: string | undefined): void; + updateItem(data: ED[T_2]["Update"]["data"], id: string, action?: ED[T_2]["Action"] | undefined, path?: string | undefined): void; + updateItems(data: ED[T_3]["Update"]["data"], ids: string[], action?: ED[T_3]["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(data: ED[T_5]["Update"]["data"], action?: ED[T_5]["Action"] | undefined, path?: string | undefined): void; - create(data: Omit, path?: string | undefined): void; + update(data: ED[T_4]["Update"]["data"], action?: ED[T_4]["Action"] | undefined, path?: string | undefined): void; + create(data: Omit, 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(entity: T2_2, selection: ED[T2_2]["Selection"]): Partial[]; checkOperation(entity: T2_3, operation: Omit, checkerTypes?: CheckerType[] | undefined): boolean | { [A in ED[T2_3]["Action"]]: boolean | import("oak-domain/lib/types").OakUserException; }[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[keyof ED]["Action"]]; - getOperations(path?: string | undefined): { + getOperations(path?: string | undefined): { entity: keyof ED; operation: ED[keyof ED]["Operation"]; }[] | undefined; diff --git a/lib/platforms/web/responsive/context.js b/lib/platforms/web/responsive/context.js index adacafce..55d0f20e 100644 --- a/lib/platforms/web/responsive/context.js +++ b/lib/platforms/web/responsive/context.js @@ -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, //小于576 + xs: 576, sm: 576, md: 768, lg: 992,