Skip to content

Commit

Permalink
feat: add getCreateHistoryOptions api to get runtime history options (#…
Browse files Browse the repository at this point in the history
…5457)

* feat: add getCreateHistoryOptions api to get runtime history options

* chore: typo
  • Loading branch information
kuitos committed Sep 22, 2020
1 parent 686e003 commit f692219
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,7 @@ export const setCreateHistoryOptions = (newOpts: any = {}) => {
options = { ...options, ...newOpts };
};

export { history };
// 获取 history options 运行时配置
export const getCreateHistoryOptions = () => options;

export { history };
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ export default function (api: IApi) {
if (api.config.history === false) return [];

return {
specifiers: ['history', 'setCreateHistoryOptions'],
specifiers: ['history', 'setCreateHistoryOptions', 'getCreateHistoryOptions'],
source: `./history`,
};
});
Expand Down

0 comments on commit f692219

Please sign in to comment.