Merge branch 'dev' into release
This commit is contained in:
commit
4a0c449bc6
|
|
@ -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',
|
||||
|
|
|
|||
|
|
@ -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链接列表
|
||||
});
|
||||
},
|
||||
|
|
|
|||
|
|
@ -37,7 +37,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(),
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ export default OakComponent({
|
|||
tablePagination: undefined,
|
||||
rowSelection: undefined,
|
||||
hideHeader: false,
|
||||
disableSerialNumber: false,
|
||||
disableSerialNumber: false, //是否禁用序号 默认启用
|
||||
size: 'large',
|
||||
scroll: undefined,
|
||||
empty: undefined,
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ export default OakComponent({
|
|||
multiple: false,
|
||||
entityId: '',
|
||||
entityIds: [],
|
||||
pickerRender: {},
|
||||
pickerRender: {}, // OakAbsRefAttrPickerRender
|
||||
onChange: (() => undefined),
|
||||
},
|
||||
formData() {
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ export default OakComponent({
|
|||
return this.props.entity;
|
||||
},
|
||||
properties: {
|
||||
helps: {},
|
||||
helps: {}, // Record<string, string>;
|
||||
entity: '',
|
||||
attributes: [],
|
||||
layout: 'horizontal',
|
||||
|
|
|
|||
|
|
@ -259,14 +259,20 @@ export class Cache extends Feature {
|
|||
}
|
||||
syncInner(records) {
|
||||
this.begin();
|
||||
this.cacheStore.sync(records, this.context);
|
||||
const ts2 = this.cacheStore.getLastUpdateTs();
|
||||
// 同步以后,当前所有缓存的action结果都不成立了
|
||||
this.entityActionAuthDict = {};
|
||||
// 唤起同步注册的回调
|
||||
this.syncEventsCallbacks.map((ele) => ele(records));
|
||||
this.context.commit();
|
||||
this.context = undefined;
|
||||
try {
|
||||
this.cacheStore.sync(records, this.context);
|
||||
// 同步以后,当前所有缓存的action结果都不成立了
|
||||
this.entityActionAuthDict = {};
|
||||
// 唤起同步注册的回调
|
||||
this.syncEventsCallbacks.map((ele) => ele(records));
|
||||
this.context.commit();
|
||||
this.context = undefined;
|
||||
}
|
||||
catch (err) {
|
||||
this.context.rollback();
|
||||
this.context = undefined;
|
||||
throw err;
|
||||
}
|
||||
}
|
||||
sync(records) {
|
||||
if (records.length) {
|
||||
|
|
@ -383,7 +389,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,
|
||||
});
|
||||
});
|
||||
|
|
|
|||
|
|
@ -165,7 +165,7 @@ declare class ListNode<ED extends EntityDict & BaseEntityDict, T extends keyof E
|
|||
constructSelection(withParent?: true, ignoreNewParent?: boolean, ignoreUnapplied?: true): {
|
||||
data: ED[T]["Selection"]["data"] | undefined;
|
||||
filter: ED[T]["Selection"]["filter"] | undefined;
|
||||
sorter: ED[T]["Selection"]["sorter"] | undefined;
|
||||
sorter: ED[T]["Selection"]["sorter"];
|
||||
total: number | undefined;
|
||||
indexFrom: number;
|
||||
count: number;
|
||||
|
|
|
|||
|
|
@ -900,7 +900,14 @@ class ListNode extends EntityNode {
|
|||
return sorter();
|
||||
}
|
||||
return sorter;
|
||||
}).flat().filter((ele) => !!ele) : undefined;
|
||||
}).flat().filter((ele) => !!ele) : [
|
||||
{
|
||||
$attr: {
|
||||
$$createAt$$: 1,
|
||||
},
|
||||
$direction: 'desc'
|
||||
}
|
||||
];
|
||||
const filters = this.constructFilters(withParent, ignoreNewParent, ignoreUnapplied);
|
||||
const filters2 = filters?.filter((ele) => !!ele);
|
||||
const filter = filters2 ? combineFilters(this.entity, this.schema, filters2) : 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,
|
||||
|
|
|
|||
|
|
@ -262,14 +262,20 @@ class Cache extends Feature_1.Feature {
|
|||
}
|
||||
syncInner(records) {
|
||||
this.begin();
|
||||
this.cacheStore.sync(records, this.context);
|
||||
const ts2 = this.cacheStore.getLastUpdateTs();
|
||||
// 同步以后,当前所有缓存的action结果都不成立了
|
||||
this.entityActionAuthDict = {};
|
||||
// 唤起同步注册的回调
|
||||
this.syncEventsCallbacks.map((ele) => ele(records));
|
||||
this.context.commit();
|
||||
this.context = undefined;
|
||||
try {
|
||||
this.cacheStore.sync(records, this.context);
|
||||
// 同步以后,当前所有缓存的action结果都不成立了
|
||||
this.entityActionAuthDict = {};
|
||||
// 唤起同步注册的回调
|
||||
this.syncEventsCallbacks.map((ele) => ele(records));
|
||||
this.context.commit();
|
||||
this.context = undefined;
|
||||
}
|
||||
catch (err) {
|
||||
this.context.rollback();
|
||||
this.context = undefined;
|
||||
throw err;
|
||||
}
|
||||
}
|
||||
sync(records) {
|
||||
if (records.length) {
|
||||
|
|
@ -386,7 +392,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,
|
||||
});
|
||||
});
|
||||
|
|
|
|||
|
|
@ -165,7 +165,7 @@ declare class ListNode<ED extends EntityDict & BaseEntityDict, T extends keyof E
|
|||
constructSelection(withParent?: true, ignoreNewParent?: boolean, ignoreUnapplied?: true): {
|
||||
data: ED[T]["Selection"]["data"] | undefined;
|
||||
filter: ED[T]["Selection"]["filter"] | undefined;
|
||||
sorter: ED[T]["Selection"]["sorter"] | undefined;
|
||||
sorter: ED[T]["Selection"]["sorter"];
|
||||
total: number | undefined;
|
||||
indexFrom: number;
|
||||
count: number;
|
||||
|
|
|
|||
|
|
@ -903,7 +903,14 @@ class ListNode extends EntityNode {
|
|||
return sorter();
|
||||
}
|
||||
return sorter;
|
||||
}).flat().filter((ele) => !!ele) : undefined;
|
||||
}).flat().filter((ele) => !!ele) : [
|
||||
{
|
||||
$attr: {
|
||||
$$createAt$$: 1,
|
||||
},
|
||||
$direction: 'desc'
|
||||
}
|
||||
];
|
||||
const filters = this.constructFilters(withParent, ignoreNewParent, ignoreUnapplied);
|
||||
const filters2 = filters?.filter((ele) => !!ele);
|
||||
const filter = filters2 ? (0, filter_1.combineFilters)(this.entity, this.schema, filters2) : 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,
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "oak-frontend-base",
|
||||
"version": "5.3.8",
|
||||
"version": "5.3.9",
|
||||
"description": "oak框架中前端与业务逻辑无关的平台部分",
|
||||
"author": {
|
||||
"name": "XuChang"
|
||||
|
|
@ -23,9 +23,9 @@
|
|||
"keepalive-for-react": "^2.0.7",
|
||||
"node-schedule": "^2.1.1",
|
||||
"nprogress": "^0.2.0",
|
||||
"oak-common-aspect": "^3.0.2",
|
||||
"oak-domain": "^5.1.1",
|
||||
"oak-memory-tree-store": "^3.3.5",
|
||||
"oak-common-aspect": "^3.0.3",
|
||||
"oak-domain": "^5.1.2",
|
||||
"oak-memory-tree-store": "^3.3.6",
|
||||
"ol": "^7.3.0",
|
||||
"react-activation": "^0.12.4",
|
||||
"react-native-device-info": "^10.12.0",
|
||||
|
|
|
|||
|
|
@ -382,16 +382,20 @@ export class Cache<ED extends EntityDict & BaseEntityDict> extends Feature {
|
|||
|
||||
private syncInner(records: OpRecord<ED>[]) {
|
||||
this.begin();
|
||||
this.cacheStore!.sync(records, this.context!);
|
||||
|
||||
const ts2 = this.cacheStore.getLastUpdateTs();
|
||||
|
||||
// 同步以后,当前所有缓存的action结果都不成立了
|
||||
this.entityActionAuthDict = {};
|
||||
// 唤起同步注册的回调
|
||||
this.syncEventsCallbacks.map((ele) => ele(records));
|
||||
this.context!.commit();
|
||||
this.context = undefined;
|
||||
try {
|
||||
this.cacheStore!.sync(records, this.context!);
|
||||
// 同步以后,当前所有缓存的action结果都不成立了
|
||||
this.entityActionAuthDict = {};
|
||||
// 唤起同步注册的回调
|
||||
this.syncEventsCallbacks.map((ele) => ele(records));
|
||||
this.context!.commit();
|
||||
this.context = undefined;
|
||||
}
|
||||
catch (err: any) {
|
||||
this.context!.rollback();
|
||||
this.context = undefined;
|
||||
throw err;
|
||||
}
|
||||
}
|
||||
|
||||
sync(records: OpRecord<ED>[]) {
|
||||
|
|
|
|||
|
|
@ -1118,7 +1118,7 @@ class ListNode<
|
|||
const { sorters, getTotal } = this;
|
||||
const data = this.getProjection();
|
||||
// assert(data, '取数据时找不到projection信息');
|
||||
const sorterArr = sorters.length > 0 ? sorters.filter(
|
||||
const sorterArr: ED[T]['Selection']['sorter'] = sorters.length > 0 ? sorters.filter(
|
||||
ele => !ignoreUnapplied || ele.applied
|
||||
).map((ele) => {
|
||||
const { sorter } = ele;
|
||||
|
|
@ -1126,7 +1126,14 @@ class ListNode<
|
|||
return (sorter as Function)();
|
||||
}
|
||||
return sorter;
|
||||
}).flat().filter((ele) => !!ele) as ED[T]['Selection']['sorter'] : undefined;
|
||||
}).flat().filter((ele) => !!ele) : [
|
||||
{
|
||||
$attr: {
|
||||
$$createAt$$: 1,
|
||||
},
|
||||
$direction: 'desc'
|
||||
}
|
||||
];
|
||||
|
||||
const filters = this.constructFilters(withParent, ignoreNewParent, ignoreUnapplied);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue