fix: 增加兼容 API

This commit is contained in:
mario.gk 2020-08-06 15:19:22 +08:00
parent 36621ea55c
commit 2960446197
3 changed files with 14 additions and 0 deletions

View File

@ -584,6 +584,13 @@ export class DocumentModel {
refresh() {
console.warn('refresh method is deprecated');
}
/**
* @deprecated
*/
onRefresh(func: () => void) {
console.warn('onRefresh method is deprecated');
}
}
export function isDocumentModel(obj: any): obj is DocumentModel {

View File

@ -113,6 +113,10 @@ export class Trunk {
}
return setter;
}
getRecents(limit: number) {
return this.getList().filter((prototype) => prototype.getCategory()).slice(0, limit);
}
}
export default new Trunk();

View File

@ -161,6 +161,9 @@ const actionPane = Object.assign(skeleton.topArea, {
setActions() {
// empty
},
get actions() {
return skeleton.topArea.container.items;
},
});
const dockPane = Object.assign(skeleton.leftArea, {
/**