debugStore的一个小bug,pagination支持宽窄分开设置
This commit is contained in:
parent
23f12303cb
commit
b52598a9c0
|
|
@ -144,7 +144,7 @@ async function doRoutines(store, contextBuilder, routines) {
|
||||||
await context.begin();
|
await context.begin();
|
||||||
try {
|
try {
|
||||||
await context.initialize();
|
await context.initialize();
|
||||||
const result = execWatcher(store, routine, context);
|
const result = await execWatcher(store, routine, context);
|
||||||
await context.commit();
|
await context.commit();
|
||||||
console.log(`例程【${name}】执行完成,耗时${Date.now() - start}毫秒,结果是`, result);
|
console.log(`例程【${name}】执行完成,耗时${Date.now() - start}毫秒,结果是`, result);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -45,7 +45,7 @@ export function onPathSet(option) {
|
||||||
});
|
});
|
||||||
assert(oakPath2, '没有正确的path信息,请检查是否配置正确');
|
assert(oakPath2, '没有正确的path信息,请检查是否配置正确');
|
||||||
const { actions, cascadeActions } = option;
|
const { actions, cascadeActions } = option;
|
||||||
// 在这里适配宽窄屏处理getTotal,不到运行时处理了 by Xc
|
// 在这里适配宽窄屏处理getTotal/pagination,不到运行时处理了 by Xc
|
||||||
let getTotal2;
|
let getTotal2;
|
||||||
if (getTotal) {
|
if (getTotal) {
|
||||||
const { width } = this.props;
|
const { width } = this.props;
|
||||||
|
|
@ -78,6 +78,16 @@ export function onPathSet(option) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
let pagination2;
|
||||||
|
if (pagination) {
|
||||||
|
if (pagination instanceof Array) {
|
||||||
|
const { width } = this.props;
|
||||||
|
pagination2 = pagination.find(ele => width === 'xs' && ele.deviceWidth === 'mobile' || width !== 'xs' && ele.deviceWidth === 'pc');
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
pagination2 = pagination;
|
||||||
|
}
|
||||||
|
}
|
||||||
else {
|
else {
|
||||||
// 不设置的默认情况,宽屏取100窄屏不取
|
// 不设置的默认情况,宽屏取100窄屏不取
|
||||||
const { width } = this.props;
|
const { width } = this.props;
|
||||||
|
|
@ -90,7 +100,7 @@ export function onPathSet(option) {
|
||||||
entity: entity2,
|
entity: entity2,
|
||||||
isList,
|
isList,
|
||||||
projection: projection2,
|
projection: projection2,
|
||||||
pagination: pagination,
|
pagination: pagination2,
|
||||||
filters: filters2,
|
filters: filters2,
|
||||||
sorters: sorters2,
|
sorters: sorters2,
|
||||||
id: oakId,
|
id: oakId,
|
||||||
|
|
|
||||||
|
|
@ -635,10 +635,12 @@ export function createComponent(option, features) {
|
||||||
? Object.assign({}, data, {
|
? Object.assign({}, data, {
|
||||||
oakFullpath: '',
|
oakFullpath: '',
|
||||||
oakLoading: !!option.entity && !!option.projection,
|
oakLoading: !!option.entity && !!option.projection,
|
||||||
|
width: 'xs',
|
||||||
})
|
})
|
||||||
: {
|
: {
|
||||||
oakFullpath: '',
|
oakFullpath: '',
|
||||||
oakLoading: !!option.entity && !!option.projection,
|
oakLoading: !!option.entity && !!option.projection,
|
||||||
|
width: 'xs',
|
||||||
},
|
},
|
||||||
properties: Object.assign({}, translatePropertiesToPropertyDefinitions(properties), OakPropertyTypes),
|
properties: Object.assign({}, translatePropertiesToPropertyDefinitions(properties), OakPropertyTypes),
|
||||||
methods: {
|
methods: {
|
||||||
|
|
|
||||||
|
|
@ -34,11 +34,12 @@ type FeatureDef<IsList extends boolean, ED extends EntityDict & BaseEntityDict,
|
||||||
behavior?: 'reRender' | 'refresh';
|
behavior?: 'reRender' | 'refresh';
|
||||||
callback?: (this: ComponentPublicThisType<ED, T, Cxt, FrontCxt, AD, FD, FormedData, IsList, TData, TProperty, TMethod, EMethod>) => void;
|
callback?: (this: ComponentPublicThisType<ED, T, Cxt, FrontCxt, AD, FD, FormedData, IsList, TData, TProperty, TMethod, EMethod>) => void;
|
||||||
};
|
};
|
||||||
|
type DevideWidth = 'pc' | 'mobile';
|
||||||
interface ComponentOption<IsList extends boolean, ED extends EntityDict & BaseEntityDict, T extends keyof ED, Cxt extends AsyncContext<ED>, FrontCxt extends SyncContext<ED>, AD extends Record<string, Aspect<ED, AsyncContext<ED>>>, FD extends Record<string, Feature>, FormedData extends Record<string, any>, TData extends DataOption, TProperty extends DataOption, TMethod extends Record<string, Function>, EMethod extends Record<string, Function> = {}> {
|
interface ComponentOption<IsList extends boolean, ED extends EntityDict & BaseEntityDict, T extends keyof ED, Cxt extends AsyncContext<ED>, FrontCxt extends SyncContext<ED>, AD extends Record<string, Aspect<ED, AsyncContext<ED>>>, FD extends Record<string, Feature>, FormedData extends Record<string, any>, TData extends DataOption, TProperty extends DataOption, TMethod extends Record<string, Function>, EMethod extends Record<string, Function> = {}> {
|
||||||
isList?: IsList;
|
isList?: IsList;
|
||||||
getTotal?: {
|
getTotal?: {
|
||||||
max: number;
|
max: number;
|
||||||
deviceWidth?: 'pc' | 'mobile' | 'all';
|
deviceWidth?: DevideWidth | 'all';
|
||||||
} | number;
|
} | number;
|
||||||
entity?: T | ((this: ComponentPublicThisType<ED, T, Cxt, FrontCxt, AD, FD, FormedData, IsList, TData, TProperty, TMethod, EMethod>) => T);
|
entity?: T | ((this: ComponentPublicThisType<ED, T, Cxt, FrontCxt, AD, FD, FormedData, IsList, TData, TProperty, TMethod, EMethod>) => T);
|
||||||
path?: string;
|
path?: string;
|
||||||
|
|
@ -49,7 +50,11 @@ interface ComponentOption<IsList extends boolean, ED extends EntityDict & BaseEn
|
||||||
actions?: ActionDef<ED, T>[] | ((this: ComponentPublicThisType<ED, T, Cxt, FrontCxt, AD, FD, FormedData, IsList, TData, TProperty, TMethod, EMethod>) => ActionDef<ED, T>[]);
|
actions?: ActionDef<ED, T>[] | ((this: ComponentPublicThisType<ED, T, Cxt, FrontCxt, AD, FD, FormedData, IsList, TData, TProperty, TMethod, EMethod>) => ActionDef<ED, T>[]);
|
||||||
projection?: ED[T]['Selection']['data'] | ((this: ComponentPublicThisType<ED, T, Cxt, FrontCxt, AD, FD, FormedData, IsList, TData, TProperty, TMethod, EMethod>) => ED[T]['Selection']['data'] | undefined);
|
projection?: ED[T]['Selection']['data'] | ((this: ComponentPublicThisType<ED, T, Cxt, FrontCxt, AD, FD, FormedData, IsList, TData, TProperty, TMethod, EMethod>) => ED[T]['Selection']['data'] | undefined);
|
||||||
append?: boolean;
|
append?: boolean;
|
||||||
pagination?: Pick<Pagination, 'currentPage' | 'pageSize' | 'randomRange'>;
|
pagination?: Pick<Pagination, 'currentPage' | 'pageSize' | 'randomRange'> | [
|
||||||
|
Pick<Pagination, 'currentPage' | 'pageSize' | 'randomRange'> & {
|
||||||
|
deviceWidth: DevideWidth;
|
||||||
|
}
|
||||||
|
];
|
||||||
filters?: Array<{
|
filters?: Array<{
|
||||||
filter: NonNullable<ED[T]['Selection']['filter']> | ((this: ComponentPublicThisType<ED, T, Cxt, FrontCxt, AD, FD, FormedData, IsList, TData, TProperty, TMethod, EMethod>) => ED[T]['Selection']['filter'] | undefined);
|
filter: NonNullable<ED[T]['Selection']['filter']> | ((this: ComponentPublicThisType<ED, T, Cxt, FrontCxt, AD, FD, FormedData, IsList, TData, TProperty, TMethod, EMethod>) => ED[T]['Selection']['filter'] | undefined);
|
||||||
'#name'?: string;
|
'#name'?: string;
|
||||||
|
|
|
||||||
|
|
@ -147,7 +147,7 @@ async function doRoutines(store, contextBuilder, routines) {
|
||||||
await context.begin();
|
await context.begin();
|
||||||
try {
|
try {
|
||||||
await context.initialize();
|
await context.initialize();
|
||||||
const result = execWatcher(store, routine, context);
|
const result = await execWatcher(store, routine, context);
|
||||||
await context.commit();
|
await context.commit();
|
||||||
console.log(`例程【${name}】执行完成,耗时${Date.now() - start}毫秒,结果是`, result);
|
console.log(`例程【${name}】执行完成,耗时${Date.now() - start}毫秒,结果是`, result);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -800,7 +800,7 @@ class ListNode extends Node {
|
||||||
async loadMore() {
|
async loadMore() {
|
||||||
const { filters, sorters, pagination, entity } = this;
|
const { filters, sorters, pagination, entity } = this;
|
||||||
const { pageSize, more, currentPage, count } = pagination;
|
const { pageSize, more, currentPage, count } = pagination;
|
||||||
if (!more || this.loadingMore) {
|
if (!more || this.loadingMore || this.loading || !count) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// 要根据total来计算下一页
|
// 要根据total来计算下一页
|
||||||
|
|
|
||||||
|
|
@ -48,7 +48,7 @@ function onPathSet(option) {
|
||||||
});
|
});
|
||||||
(0, assert_1.assert)(oakPath2, '没有正确的path信息,请检查是否配置正确');
|
(0, assert_1.assert)(oakPath2, '没有正确的path信息,请检查是否配置正确');
|
||||||
const { actions, cascadeActions } = option;
|
const { actions, cascadeActions } = option;
|
||||||
// 在这里适配宽窄屏处理getTotal,不到运行时处理了 by Xc
|
// 在这里适配宽窄屏处理getTotal/pagination,不到运行时处理了 by Xc
|
||||||
let getTotal2;
|
let getTotal2;
|
||||||
if (getTotal) {
|
if (getTotal) {
|
||||||
const { width } = this.props;
|
const { width } = this.props;
|
||||||
|
|
@ -81,6 +81,16 @@ function onPathSet(option) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
let pagination2;
|
||||||
|
if (pagination) {
|
||||||
|
if (pagination instanceof Array) {
|
||||||
|
const { width } = this.props;
|
||||||
|
pagination2 = pagination.find(ele => width === 'xs' && ele.deviceWidth === 'mobile' || width !== 'xs' && ele.deviceWidth === 'pc');
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
pagination2 = pagination;
|
||||||
|
}
|
||||||
|
}
|
||||||
else {
|
else {
|
||||||
// 不设置的默认情况,宽屏取100窄屏不取
|
// 不设置的默认情况,宽屏取100窄屏不取
|
||||||
const { width } = this.props;
|
const { width } = this.props;
|
||||||
|
|
@ -93,7 +103,7 @@ function onPathSet(option) {
|
||||||
entity: entity2,
|
entity: entity2,
|
||||||
isList,
|
isList,
|
||||||
projection: projection2,
|
projection: projection2,
|
||||||
pagination: pagination,
|
pagination: pagination2,
|
||||||
filters: filters2,
|
filters: filters2,
|
||||||
sorters: sorters2,
|
sorters: sorters2,
|
||||||
id: oakId,
|
id: oakId,
|
||||||
|
|
|
||||||
|
|
@ -638,10 +638,12 @@ function createComponent(option, features) {
|
||||||
? Object.assign({}, data, {
|
? Object.assign({}, data, {
|
||||||
oakFullpath: '',
|
oakFullpath: '',
|
||||||
oakLoading: !!option.entity && !!option.projection,
|
oakLoading: !!option.entity && !!option.projection,
|
||||||
|
width: 'xs',
|
||||||
})
|
})
|
||||||
: {
|
: {
|
||||||
oakFullpath: '',
|
oakFullpath: '',
|
||||||
oakLoading: !!option.entity && !!option.projection,
|
oakLoading: !!option.entity && !!option.projection,
|
||||||
|
width: 'xs',
|
||||||
},
|
},
|
||||||
properties: Object.assign({}, translatePropertiesToPropertyDefinitions(properties), OakPropertyTypes),
|
properties: Object.assign({}, translatePropertiesToPropertyDefinitions(properties), OakPropertyTypes),
|
||||||
methods: {
|
methods: {
|
||||||
|
|
|
||||||
|
|
@ -34,11 +34,12 @@ type FeatureDef<IsList extends boolean, ED extends EntityDict & BaseEntityDict,
|
||||||
behavior?: 'reRender' | 'refresh';
|
behavior?: 'reRender' | 'refresh';
|
||||||
callback?: (this: ComponentPublicThisType<ED, T, Cxt, FrontCxt, AD, FD, FormedData, IsList, TData, TProperty, TMethod, EMethod>) => void;
|
callback?: (this: ComponentPublicThisType<ED, T, Cxt, FrontCxt, AD, FD, FormedData, IsList, TData, TProperty, TMethod, EMethod>) => void;
|
||||||
};
|
};
|
||||||
|
type DevideWidth = 'pc' | 'mobile';
|
||||||
interface ComponentOption<IsList extends boolean, ED extends EntityDict & BaseEntityDict, T extends keyof ED, Cxt extends AsyncContext<ED>, FrontCxt extends SyncContext<ED>, AD extends Record<string, Aspect<ED, AsyncContext<ED>>>, FD extends Record<string, Feature>, FormedData extends Record<string, any>, TData extends DataOption, TProperty extends DataOption, TMethod extends Record<string, Function>, EMethod extends Record<string, Function> = {}> {
|
interface ComponentOption<IsList extends boolean, ED extends EntityDict & BaseEntityDict, T extends keyof ED, Cxt extends AsyncContext<ED>, FrontCxt extends SyncContext<ED>, AD extends Record<string, Aspect<ED, AsyncContext<ED>>>, FD extends Record<string, Feature>, FormedData extends Record<string, any>, TData extends DataOption, TProperty extends DataOption, TMethod extends Record<string, Function>, EMethod extends Record<string, Function> = {}> {
|
||||||
isList?: IsList;
|
isList?: IsList;
|
||||||
getTotal?: {
|
getTotal?: {
|
||||||
max: number;
|
max: number;
|
||||||
deviceWidth?: 'pc' | 'mobile' | 'all';
|
deviceWidth?: DevideWidth | 'all';
|
||||||
} | number;
|
} | number;
|
||||||
entity?: T | ((this: ComponentPublicThisType<ED, T, Cxt, FrontCxt, AD, FD, FormedData, IsList, TData, TProperty, TMethod, EMethod>) => T);
|
entity?: T | ((this: ComponentPublicThisType<ED, T, Cxt, FrontCxt, AD, FD, FormedData, IsList, TData, TProperty, TMethod, EMethod>) => T);
|
||||||
path?: string;
|
path?: string;
|
||||||
|
|
@ -49,7 +50,11 @@ interface ComponentOption<IsList extends boolean, ED extends EntityDict & BaseEn
|
||||||
actions?: ActionDef<ED, T>[] | ((this: ComponentPublicThisType<ED, T, Cxt, FrontCxt, AD, FD, FormedData, IsList, TData, TProperty, TMethod, EMethod>) => ActionDef<ED, T>[]);
|
actions?: ActionDef<ED, T>[] | ((this: ComponentPublicThisType<ED, T, Cxt, FrontCxt, AD, FD, FormedData, IsList, TData, TProperty, TMethod, EMethod>) => ActionDef<ED, T>[]);
|
||||||
projection?: ED[T]['Selection']['data'] | ((this: ComponentPublicThisType<ED, T, Cxt, FrontCxt, AD, FD, FormedData, IsList, TData, TProperty, TMethod, EMethod>) => ED[T]['Selection']['data'] | undefined);
|
projection?: ED[T]['Selection']['data'] | ((this: ComponentPublicThisType<ED, T, Cxt, FrontCxt, AD, FD, FormedData, IsList, TData, TProperty, TMethod, EMethod>) => ED[T]['Selection']['data'] | undefined);
|
||||||
append?: boolean;
|
append?: boolean;
|
||||||
pagination?: Pick<Pagination, 'currentPage' | 'pageSize' | 'randomRange'>;
|
pagination?: Pick<Pagination, 'currentPage' | 'pageSize' | 'randomRange'> | [
|
||||||
|
Pick<Pagination, 'currentPage' | 'pageSize' | 'randomRange'> & {
|
||||||
|
deviceWidth: DevideWidth;
|
||||||
|
}
|
||||||
|
];
|
||||||
filters?: Array<{
|
filters?: Array<{
|
||||||
filter: NonNullable<ED[T]['Selection']['filter']> | ((this: ComponentPublicThisType<ED, T, Cxt, FrontCxt, AD, FD, FormedData, IsList, TData, TProperty, TMethod, EMethod>) => ED[T]['Selection']['filter'] | undefined);
|
filter: NonNullable<ED[T]['Selection']['filter']> | ((this: ComponentPublicThisType<ED, T, Cxt, FrontCxt, AD, FD, FormedData, IsList, TData, TProperty, TMethod, EMethod>) => ED[T]['Selection']['filter'] | undefined);
|
||||||
'#name'?: string;
|
'#name'?: string;
|
||||||
|
|
|
||||||
|
|
@ -184,7 +184,7 @@ async function doRoutines<ED extends EntityDict & BaseEntityDict, Cxt extends As
|
||||||
await context.begin();
|
await context.begin();
|
||||||
try {
|
try {
|
||||||
await context.initialize();
|
await context.initialize();
|
||||||
const result = execWatcher(store, routine as Watcher<ED, keyof ED, Cxt>, context);
|
const result = await execWatcher(store, routine as Watcher<ED, keyof ED, Cxt>, context);
|
||||||
await context.commit();
|
await context.commit();
|
||||||
console.log(`例程【${name}】执行完成,耗时${Date.now() - start}毫秒,结果是`, result);
|
console.log(`例程【${name}】执行完成,耗时${Date.now() - start}毫秒,结果是`, result);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -21,6 +21,7 @@ import { judgeRelation } from 'oak-domain/lib/store/relation';
|
||||||
import { combineFilters } from 'oak-domain/lib/store/filter';
|
import { combineFilters } from 'oak-domain/lib/store/filter';
|
||||||
import { generateNewId } from 'oak-domain/lib/utils/uuid';
|
import { generateNewId } from 'oak-domain/lib/utils/uuid';
|
||||||
import { Cache } from './features/cache';
|
import { Cache } from './features/cache';
|
||||||
|
import { Pagination } from './types/Pagination';
|
||||||
|
|
||||||
export function onPathSet<
|
export function onPathSet<
|
||||||
ED extends EntityDict & BaseEntityDict,
|
ED extends EntityDict & BaseEntityDict,
|
||||||
|
|
@ -89,7 +90,7 @@ export function onPathSet<
|
||||||
|
|
||||||
const { actions, cascadeActions } = option;
|
const { actions, cascadeActions } = option;
|
||||||
|
|
||||||
// 在这里适配宽窄屏处理getTotal,不到运行时处理了 by Xc
|
// 在这里适配宽窄屏处理getTotal/pagination,不到运行时处理了 by Xc
|
||||||
let getTotal2: undefined | number;
|
let getTotal2: undefined | number;
|
||||||
if (getTotal) {
|
if (getTotal) {
|
||||||
const { width } = this.props;
|
const { width } = this.props;
|
||||||
|
|
@ -122,6 +123,16 @@ export function onPathSet<
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
let pagination2: Pick<Pagination, 'currentPage' | 'pageSize' | 'randomRange'> | undefined;
|
||||||
|
if (pagination) {
|
||||||
|
if (pagination instanceof Array) {
|
||||||
|
const { width } = this.props;
|
||||||
|
pagination2 = pagination.find(ele => width === 'xs' && ele.deviceWidth === 'mobile' || width !== 'xs' && ele.deviceWidth === 'pc')
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
pagination2 = pagination;
|
||||||
|
}
|
||||||
|
}
|
||||||
else {
|
else {
|
||||||
// 不设置的默认情况,宽屏取100窄屏不取
|
// 不设置的默认情况,宽屏取100窄屏不取
|
||||||
const { width } = this.props;
|
const { width } = this.props;
|
||||||
|
|
@ -134,7 +145,7 @@ export function onPathSet<
|
||||||
entity: entity2,
|
entity: entity2,
|
||||||
isList,
|
isList,
|
||||||
projection: projection2,
|
projection: projection2,
|
||||||
pagination: pagination,
|
pagination: pagination2,
|
||||||
filters: filters2,
|
filters: filters2,
|
||||||
sorters: sorters2,
|
sorters: sorters2,
|
||||||
id: oakId,
|
id: oakId,
|
||||||
|
|
|
||||||
|
|
@ -921,6 +921,7 @@ export function createComponent<
|
||||||
oakActions?: string;
|
oakActions?: string;
|
||||||
oakZombie?: boolean;
|
oakZombie?: boolean;
|
||||||
oakDisablePulldownRefresh?: boolean;
|
oakDisablePulldownRefresh?: boolean;
|
||||||
|
width?: 'xs',
|
||||||
} & Record<string, any>;
|
} & Record<string, any>;
|
||||||
features: BasicFeatures<ED> & FD;
|
features: BasicFeatures<ED> & FD;
|
||||||
oakOption: OakComponentOption<
|
oakOption: OakComponentOption<
|
||||||
|
|
@ -945,10 +946,12 @@ export function createComponent<
|
||||||
? Object.assign({}, data, {
|
? Object.assign({}, data, {
|
||||||
oakFullpath: '',
|
oakFullpath: '',
|
||||||
oakLoading: !!option.entity && !!option.projection,
|
oakLoading: !!option.entity && !!option.projection,
|
||||||
|
width: 'xs',
|
||||||
})
|
})
|
||||||
: {
|
: {
|
||||||
oakFullpath: '',
|
oakFullpath: '',
|
||||||
oakLoading: !!option.entity && !!option.projection,
|
oakLoading: !!option.entity && !!option.projection,
|
||||||
|
width: 'xs',
|
||||||
},
|
},
|
||||||
properties: Object.assign(
|
properties: Object.assign(
|
||||||
{},
|
{},
|
||||||
|
|
|
||||||
|
|
@ -119,6 +119,8 @@ type FeatureDef<
|
||||||
callback?: (this: ComponentPublicThisType<ED, T, Cxt, FrontCxt, AD, FD, FormedData, IsList, TData, TProperty, TMethod, EMethod>) => void;
|
callback?: (this: ComponentPublicThisType<ED, T, Cxt, FrontCxt, AD, FD, FormedData, IsList, TData, TProperty, TMethod, EMethod>) => void;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
type DevideWidth = 'pc' | 'mobile';
|
||||||
|
|
||||||
interface ComponentOption<
|
interface ComponentOption<
|
||||||
IsList extends boolean,
|
IsList extends boolean,
|
||||||
ED extends EntityDict & BaseEntityDict,
|
ED extends EntityDict & BaseEntityDict,
|
||||||
|
|
@ -136,7 +138,7 @@ interface ComponentOption<
|
||||||
isList?: IsList;
|
isList?: IsList;
|
||||||
getTotal?: {
|
getTotal?: {
|
||||||
max: number;
|
max: number;
|
||||||
deviceWidth?: 'pc' | 'mobile' | 'all';
|
deviceWidth?: DevideWidth | 'all';
|
||||||
} | number;
|
} | number;
|
||||||
entity?: T | ((this: ComponentPublicThisType<ED, T, Cxt, FrontCxt, AD, FD, FormedData, IsList, TData, TProperty, TMethod, EMethod>) => T);
|
entity?: T | ((this: ComponentPublicThisType<ED, T, Cxt, FrontCxt, AD, FD, FormedData, IsList, TData, TProperty, TMethod, EMethod>) => T);
|
||||||
path?: string;
|
path?: string;
|
||||||
|
|
@ -147,7 +149,9 @@ interface ComponentOption<
|
||||||
actions?: ActionDef<ED, T>[] | ((this: ComponentPublicThisType<ED, T, Cxt, FrontCxt, AD, FD, FormedData, IsList, TData, TProperty, TMethod, EMethod>) => ActionDef<ED, T>[]);
|
actions?: ActionDef<ED, T>[] | ((this: ComponentPublicThisType<ED, T, Cxt, FrontCxt, AD, FD, FormedData, IsList, TData, TProperty, TMethod, EMethod>) => ActionDef<ED, T>[]);
|
||||||
projection?: ED[T]['Selection']['data'] | ((this: ComponentPublicThisType<ED, T, Cxt, FrontCxt, AD, FD, FormedData, IsList, TData, TProperty, TMethod, EMethod>) => ED[T]['Selection']['data'] | undefined);
|
projection?: ED[T]['Selection']['data'] | ((this: ComponentPublicThisType<ED, T, Cxt, FrontCxt, AD, FD, FormedData, IsList, TData, TProperty, TMethod, EMethod>) => ED[T]['Selection']['data'] | undefined);
|
||||||
append?: boolean;
|
append?: boolean;
|
||||||
pagination?: Pick<Pagination, 'currentPage' | 'pageSize' | 'randomRange'>;
|
pagination?: Pick<Pagination, 'currentPage' | 'pageSize' | 'randomRange'> | [
|
||||||
|
Pick<Pagination, 'currentPage' | 'pageSize' | 'randomRange'> & { deviceWidth: DevideWidth }
|
||||||
|
];
|
||||||
filters?: Array<{
|
filters?: Array<{
|
||||||
filter: NonNullable<ED[T]['Selection']['filter']> | ((this: ComponentPublicThisType<ED, T, Cxt, FrontCxt, AD, FD, FormedData, IsList, TData, TProperty, TMethod, EMethod>) => ED[T]['Selection']['filter'] | undefined);
|
filter: NonNullable<ED[T]['Selection']['filter']> | ((this: ComponentPublicThisType<ED, T, Cxt, FrontCxt, AD, FD, FormedData, IsList, TData, TProperty, TMethod, EMethod>) => ED[T]['Selection']['filter'] | undefined);
|
||||||
'#name'?: string;
|
'#name'?: string;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue