1.1.5 • Published 12 months ago

@kkt/pro v1.1.5

Weekly downloads
-
License
MIT
Repository
github
Last release
12 months ago

包集成管理

  1. 为了方便把自动生成文件内的数据导出使用
  2. 根据使用的plugin,导出对应相关包内方法
  3. 导出一部分自定义类型

install

$ npm install @kkt/pro -D # yarn add @kkt/pro -D

类型

KktproRoutesProps

路由类型

export interface KktproRoutesProps extends Omit<RouteObject, 'children' | 'element'> {
  /** 名称 */
  name?: string;
  /**  图标 */
  icon?: string | React.ReactNode;
  /** 重定向  当 index===true生效 */
  redirect?: string;
  /** 页面权限, 用于页面校验权限 */
  roles?: string[];
  /** 隐藏主菜单 */
  hiddenMainMenu?: boolean;
  /** 是否隐藏菜单 */
  hideInMenu?: boolean;
  /** 自定义 跳转 */
  // navigate?: (navigate: NavigateFunction) => void;
  navigate?: string;
  /** 控制是否侧边只展示子路由 **/
  side?: boolean;
  /** 是否渲染当前路由 */
  hideRoute?: boolean;
  /** route component */
  element?: string | React.LazyExoticComponent<() => JSX.Element> | JSX.Element;
  /** 子集 路由 */
  children?: KktproRoutesProps[];
}

KktproPageProps

页面props类型

export interface KktproPageProps extends KktproIProps {
  /** 页面权限 */
  roles?: string;
  navigate: NavigateFunction;
  /** path="/" 路由下的子集路由集合 */ 
  routes: KktproRoutesProps[];
}

Contributors

License

Licensed under the MIT License.

1.1.1

1 year ago

1.1.0

1 year ago

1.1.5

12 months ago

1.1.4

12 months ago

1.1.3

1 year ago

1.1.2

1 year ago

1.0.14

1 year ago

1.0.13

1 year ago

1.0.12

1 year ago

1.0.11

1 year ago

1.0.11-bate.2

1 year ago

1.0.11-bate.1

1 year ago

1.0.10

1 year ago

1.0.9

1 year ago

1.0.8

1 year ago

1.0.7

1 year ago

1.0.6

1 year ago

1.0.6-bate.2

1 year ago

1.0.6-bate.1

1 year ago

1.0.5

1 year ago

1.0.4

1 year ago

1.0.3

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.1-bate.1

1 year ago

1.0.0-bate.1

1 year ago

1.0.0-alpha.1

1 year ago