UNPKG

1.19 kBJavaScriptView Raw
1/* global
2 Store:false,
3 History:false,
4 LocaleId:false,
5*/
6
7/**
8 * 手动创建 Redux Store 时需要的相关对象
9 * @type {Object}
10 */
11import * as reduxForCreateStore from './React/redux'
12export { reduxForCreateStore }
13
14/**
15 * 通用的高阶组件/方法的装饰器
16 * @type {Function}
17 */
18export { default as extend } from "__KOOT_HOC_EXTEND__"
19
20/**
21 * 设置页面信息的高阶组件/方法
22 * @type {Function}
23 */
24export { default as pageinfo } from "__KOOT_HOC_PAGEINFO__"
25
26// 其他全局变量
27export const localeId = (() => {
28 if (__CLIENT__)
29 return window.LocaleId || ''
30 if (__SERVER__) {
31 if (typeof LocaleId === 'undefined')
32 return ''
33 return LocaleId || ''
34 }
35})()
36export const store = (() => {
37 if (__CLIENT__)
38 return window.Store
39 if (__SERVER__) {
40 if (typeof Store === 'undefined')
41 return ''
42 return Store
43 }
44})()
45export const history = (() => {
46 if (__CLIENT__)
47 return window.History
48 if (__SERVER__) {
49 if (typeof History === 'undefined')
50 return ''
51 return History
52 }
53})()