UNPKG

943 BJavaScriptView Raw
1/**
2 * Redux Store
3 * @type {Object}
4 */
5export let store
6export const setStore = o => store = o
7
8/**
9 * History 对象
10 * @type {Object}
11 */
12export let history
13export const setHistory = o => history = o
14
15/**
16 * [仅当多语言开启时存在] 当前语种ID
17 * @type {String}
18 */
19export let localeId
20export const setLocaleId = o => localeId = o
21
22/**
23 * 通用的高阶组件/方法的装饰器
24 * @type {Function}
25 */
26export let wrapper = () => (WrappedComponent) => WrappedComponent
27export const setWrapper = o => wrapper = o
28
29/**
30 * 设置页面信息的高阶组件/方法
31 * @type {Function}
32 */
33export let pageinfo = () => (WrappedComponent) => WrappedComponent
34export const setPageinfo = o => pageinfo = o
35
36/**
37 * 负责数据同构的高阶组件/方法
38 * @type {Function}
39 */
40export let fetchdata = () => (WrappedComponent) => WrappedComponent
41export const setFetchdata = o => fetchdata = o