diff --git a/src/components/Page/index.d.ts b/src/components/Page/index.d.ts index 1e1aac7..fe0bd42 100644 --- a/src/components/Page/index.d.ts +++ b/src/components/Page/index.d.ts @@ -16,6 +16,8 @@ export interface PageProps { isShowFooter?: boolean; /** 是否显示头部和底部组件,默认 true */ isShowAllAction?: boolean; + /** 是否处于加载状态,默认 false */ + loading?: boolean; /** 取消按钮文字,默认 "关闭" */ backButtonText?: string; /** 内容区域的padding,默认 "20px" */ diff --git a/src/components/Page/index.js b/src/components/Page/index.js index ca75dca..a023b4e 100644 --- a/src/components/Page/index.js +++ b/src/components/Page/index.js @@ -1,4 +1,4 @@ -import { Button, Space } from "antd"; +import { Button, Space, Spin } from "antd"; import { useEffect, useState } from "react"; import { throttle } from "throttle-debounce"; import HeaderBack from "../HeaderBack"; @@ -14,6 +14,7 @@ function Page(props) { headerPrevious = true, isShowFooter = true, isShowAllAction = true, + loading = false, backButtonText = "关闭", contentPadding = "20px", customActionButtons, @@ -47,29 +48,31 @@ function Page(props) { }, [isShowAllAction, isShowFooter]); return ( -