getCoreConfig()
Core.getCoreConfig() => object
获取Core
的所有配置项。
getSaas()
Core.getSaas() => bool
获取当前环境
是否为saas
。
getRouterAll()
Core.getRouterAll() => array
获取router
中所有路由信息。
withPermission()
按钮权限验证组件。
Core.withPermission(Component, permission, type) => ReactNode
参数名 | 说明 | 类型 | 默认值 | 必须 | 版本 |
---|---|---|---|---|---|
Component | 组件 | ReactNode | - | 是 | - |
permission | 权限编码 | string | - | 是 | - |
type | 唯一可填项(icon) | sting | - | - | - |
withDetail()
页面缓存组件,页面切换时不会刷新。
Core.withDetail(Component, routerUrl)
参数名 | 说明 | 类型 | 默认值 | 必须 | 版本 |
---|---|---|---|---|---|
Component | 组件 | ReactNode | - | 是 | - |
routerUrl | 主页面 url | string | - | 是 | - |
use()
加载依赖模块。
Core.use(Object)
参数名 | 说明 | 类型 | 默认值 | 必须 | 版本 |
---|---|---|---|---|---|
Object | 依赖模块 | string | - | 是 | - |
mount()
装载 Core。
Core.mount(Dom, routeType, store)
参数名 | 说明 | 类型 | 默认值 | 必须 | 版本 |
---|---|---|---|---|---|
Dom | 页面渲染容器 Dom 元素 | string | - | 是 | - |
routeType | 路由方式 | string | - | - | - |
store | store 初始化 | object | - | - | - |
登录页配置列表
修改系统登录页默认的一些配置,例如
const CoreConfig = {
picCenter: 'http://img/hvisions.png'
}
new Core({ CoreConfig }).mount('#root');
参数名 | 说明 | 类型 | 版本 |
---|---|---|---|
picCenter | 图片的路径,例如http://####.png | string | - |
topLogo | 图片的路径,例如http://####.png | string | - |
sysLogo | 图片的路径,例如http://####.png | string | - |
loginBottomDesc | - | string | - |
isDesktop | - | Boolean | - |

登录后系统配置列表
修改系统登录后页面默认的一些配置,例如
const CoreConfig = {
icon: 'http://img/hvisions.png'
}
new Core({ CoreConfig }).mount('#root');
参数名 | 说明 | 类型 | 版本 |
---|---|---|---|
icon | 左上角菜单处于缩状态的时候的图片路径,例如http://####.png | string | - |
img | 左上角菜单处于放状态的时候的图片路径,例如http://####.png | string | - |
needInternationalization | 是否需要国际化 | Boolean | - |
needNotification | 是否需要消息通知 | Boolean | - |
title | 搜索部分的标题 | string | - |
company | 搜索部分的公司名 | string | - |
placeholder | 搜索部分的 placeholder | string | - |
