@teamias/pro-layout 0.0.6 → 0.0.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -17,7 +17,7 @@ export declare class KeepAliveClass {
17
17
  updateAllComponent(type?: 'all' | 'pagesHook' | 'context'): Promise<void>;
18
18
  /** 获取页面数据 */
19
19
  getPages(): (import("react-router-dom").Location & {
20
- pageStatus: 403 | 404 | 200;
20
+ pageStatus: 200 | 403 | 404;
21
21
  pageTitle: string;
22
22
  })[];
23
23
  /** 关闭页面 */
@@ -32,7 +32,7 @@ export declare class KeepAliveClass {
32
32
  useLifeCycle: (callback: IPageLifeCycleCallback) => void;
33
33
  /** 获取缓存页面数组 */
34
34
  useKeepAlivePages: () => (import("react-router-dom").Location & {
35
- pageStatus: 403 | 404 | 200;
35
+ pageStatus: 200 | 403 | 404;
36
36
  pageTitle: string;
37
37
  })[];
38
38
  /** 更新当前路由页面 */
@@ -6,7 +6,7 @@ export declare const keepAliveControl: KeepAliveClass;
6
6
  export declare const useLifeCycle: (callback: import("./types").IPageLifeCycleCallback) => void;
7
7
  /** 获取页面数组 */
8
8
  export declare const useKeepAlivePages: () => (import("react-router-dom").Location & {
9
- pageStatus: 403 | 404 | 200;
9
+ pageStatus: 200 | 403 | 404;
10
10
  pageTitle: string;
11
11
  })[];
12
12
  /** 根 */
@@ -30,7 +30,7 @@ export var LayoutContextProvide = function LayoutContextProvide(_ref) {
30
30
  /** 有部分保护字段 */
31
31
  var getRetainField = function getRetainField() {
32
32
  /** 几个 ui 相关字段 */
33
- var keys = ['collapsed', 'asideWidth'];
33
+ var keys = ['collapsed', 'asideWidth', 'hideMenu'];
34
34
  var retainField = {};
35
35
  keys.forEach(function (key) {
36
36
  if (state.value[key] !== undefined) {
@@ -34,6 +34,7 @@ var InlineProLayout = function InlineProLayout(_ref) {
34
34
  childrens = _ref.childrens,
35
35
  projectTitle = _ref.projectTitle,
36
36
  loginBgImg = _ref.loginBgImg,
37
+ coverPageContent = _ref.coverPageContent,
37
38
  renderTopRightContent = _ref.renderTopRightContent,
38
39
  requestUserInfoMenuData = _ref.requestUserInfoMenuData,
39
40
  renderSelectLang = _ref.renderSelectLang,
@@ -105,6 +106,7 @@ var InlineProLayout = function InlineProLayout(_ref) {
105
106
  wait: 0
106
107
  });
107
108
  if (pageLoading) return /*#__PURE__*/_jsx(PageLoading, {});
109
+ if (coverPageContent) return coverPageContent;
108
110
  return /*#__PURE__*/_jsxs(_Fragment, {
109
111
  children: [layoutContext.token ? /*#__PURE__*/_jsxs(_Fragment, {
110
112
  children: [/*#__PURE__*/_jsx(DocumentTitle, {}), /*#__PURE__*/_jsxs(Layout, {
@@ -205,6 +207,8 @@ export var ProLayout = function ProLayout(_ref4) {
205
207
  pageComponentMap = _ref4.pageComponentMap,
206
208
  access = _ref4.access,
207
209
  placeholderElement = _ref4.placeholderElement,
210
+ coverPageContent = _ref4.coverPageContent,
211
+ hideMenu = _ref4.hideMenu,
208
212
  renderTopRightContent = _ref4.renderTopRightContent,
209
213
  renderSelectLang = _ref4.renderSelectLang,
210
214
  requestUserInfoMenuData = _ref4.requestUserInfoMenuData,
@@ -223,6 +227,7 @@ export var ProLayout = function ProLayout(_ref4) {
223
227
  access: access,
224
228
  basename: basename,
225
229
  placeholderElement: placeholderElement,
230
+ hideMenu: hideMenu,
226
231
  children: /*#__PURE__*/_jsx(InlineProLayout, {
227
232
  renderSelectLang: renderSelectLang,
228
233
  renderTopRightContent: renderTopRightContent,
@@ -231,6 +236,7 @@ export var ProLayout = function ProLayout(_ref4) {
231
236
  loginBgImg: loginBgImg,
232
237
  requestUserInfoMenuData: requestUserInfoMenuData,
233
238
  childrens: childrens,
239
+ coverPageContent: coverPageContent,
234
240
  onLogin: onLogin,
235
241
  onLogout: onLogout
236
242
  })
@@ -1,5 +1,5 @@
1
1
  import { FC, ReactNode } from 'react';
2
- export interface IProLayoutProps extends Pick<TLayoutContext, 'projectId' | 'pageComponentMap' | 'access' | 'basename' | 'placeholderElement'> {
2
+ export interface IProLayoutProps extends Pick<TLayoutContext, 'hideMenu' | 'projectId' | 'pageComponentMap' | 'access' | 'basename' | 'placeholderElement'> {
3
3
  /** title */
4
4
  projectTitle?: string;
5
5
  /** logo img */
@@ -35,6 +35,8 @@ export interface IProLayoutProps extends Pick<TLayoutContext, 'projectId' | 'pag
35
35
  /** 公共内容 */
36
36
  common?: ReactNode;
37
37
  };
38
+ /** 覆盖页面内容 */
39
+ coverPageContent?: ReactNode;
38
40
  /** 渲染多语言选择控件 */
39
41
  renderSelectLang?: () => ReactNode;
40
42
  /** 渲染左上角内容 */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@teamias/pro-layout",
3
- "version": "0.0.6",
3
+ "version": "0.0.7",
4
4
  "description": "A react library developed with dumi",
5
5
  "license": "MIT",
6
6
  "module": "dist/index.js",