diff --git a/src/components/Exception/index.d.ts b/src/components/Exception/index.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..c966a00a8fa0e919889e530f8e5c877f02b9a872 --- /dev/null +++ b/src/components/Exception/index.d.ts @@ -0,0 +1,11 @@ +import React from "react"; +export interface ExceptionProps { + type?: "403" | "404" | "500"; + title?: React.ReactNode; + desc?: React.ReactNode; + img?: string; + actions?: React.ReactNode; + linkElement?: string | React.ReactNode; +} + +export default class Exception extends React.Component {} diff --git a/src/components/FooterToolbar/index.d.ts b/src/components/FooterToolbar/index.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..14f02755c5fa7021f752b9fb77f19bae8446f245 --- /dev/null +++ b/src/components/FooterToolbar/index.d.ts @@ -0,0 +1,9 @@ +import React from "react"; +export interface FooterToolbarProps { + extra: React.ReactNode; +} + +export default class FooterToolbar extends React.Component< + FooterToolbarProps, + any +> {} diff --git a/src/components/GlobalFooter/index.d.ts b/src/components/GlobalFooter/index.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..7f6c7dd3f685fd3d1068549ce1f07364967e2843 --- /dev/null +++ b/src/components/GlobalFooter/index.d.ts @@ -0,0 +1,14 @@ +import React from "react"; +export interface GlobalFooterProps { + links: Array<{ + title: string | React.ReactNode; + href: string; + blankTarget?: boolean; + }>; + copyright: React.ReactNode; +} + +export default class GlobalFooter extends React.Component< + GlobalFooterProps, + any +> {} diff --git a/src/components/HeaderSearch/index.d.ts b/src/components/HeaderSearch/index.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..69cff7af41301b516c06cdd61aef4c5eca604c33 --- /dev/null +++ b/src/components/HeaderSearch/index.d.ts @@ -0,0 +1,13 @@ +import React from "react"; +export interface HeaderSearchProps { + placeholder?: string; + dataSource?: Array; + onSearch?: (value: string) => void; + onChange?: (value: string) => void; + onPressEnter?: (value: string) => void; +} + +export default class HeaderSearch extends React.Component< + HeaderSearchProps, + any +> {} diff --git a/src/components/NoticeIcon/index.d.ts b/src/components/NoticeIcon/index.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..6bf9dd5617541228afa89caf1c940450687bb55e --- /dev/null +++ b/src/components/NoticeIcon/index.d.ts @@ -0,0 +1,42 @@ +import React from "react"; +export interface NoticeIconData { + avatar: string; + title: React.ReactNode; + description: React.ReactNode; + datetime: React.ReactNode; + extra: React.ReactNode; +} + +export interface NoticeIconProps { + count?: number; + className?: string; + loading?: boolean; + onClear?: (tableTile: string) => void; + onItemClick?: (item: NoticeIconData, tabProps: NoticeIconProps) => void; + onTabChange?: (tableTile: string) => void; + popupAlign?: { + points?: [string, string]; + offset?: [number, number]; + targetOffset?: [number, number]; + overflow?: any; + useCssRight?: boolean; + useCssBottom?: boolean; + useCssTransform?: boolean; + }; + onPopupVisibleChange?: (visible: boolean) => void; + popupVisible?: boolean; + locale?: { emptyText: string; clear: string }; +} + +export interface NoticeIconTabProps { + list: Array; + title: string; + emptyText?: React.ReactNode; + emptyImage?: string; +} + +export class NoticeIconTab extends React.Component {} + +export default class NoticeIcon extends React.Component { + static Tab: typeof NoticeIconTab; +} diff --git a/src/components/NoticeIcon/index.md b/src/components/NoticeIcon/index.md index 3f0f8d9913c49d35fb66d306c227c7f5bfda0700..fefdbdcf544aac335905a040596b936ac480b0df 100644 --- a/src/components/NoticeIcon/index.md +++ b/src/components/NoticeIcon/index.md @@ -28,7 +28,7 @@ locale | 默认文案 | Object | `{ emptyText: '暂无数据', clear: '清空' } 参数 | 说明 | 类型 | 默认值 ----|------|-----|------ title | 消息分类的页签标题 | string | - -data | 列表数据,格式参照下表 | Array | `[]` +list | 列表数据,格式参照下表 | Array | `[]` emptyText | 针对每个 Tab 定制空数据文案 | ReactNode | - emptyImage | 针对每个 Tab 定制空数据图片 | string | - diff --git a/src/components/NumberInfo/index.d.ts b/src/components/NumberInfo/index.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..c4c4c4f769eaac50f11b551e2a019c6e87331ca2 --- /dev/null +++ b/src/components/NumberInfo/index.d.ts @@ -0,0 +1,11 @@ +import React from "react"; +export interface NumberInfoProps { + title: React.ReactNode | string; + subTitle: React.ReactNode | string; + total: React.ReactNode | string; + status: "up" | "down"; + theme: string; + gap: number; +} + +export default class NumberInfo extends React.Component {} diff --git a/src/components/NumberInfo/index.md b/src/components/NumberInfo/index.md index a07ab4d96c548b2f292f3bda4a7821cdbab20cdf..8b29c2952f9093d75fdc8407ff0ef81e30b2669b 100644 --- a/src/components/NumberInfo/index.md +++ b/src/components/NumberInfo/index.md @@ -16,6 +16,6 @@ order: 10 title | 标题 | ReactNode\|string | - subTitle | 子标题 | ReactNode\|string | - total | 总量 | ReactNode\|string | - -status | 增加状态 | 'up'\/'down' | - +status | 增加状态 | 'up \| down' | - theme | 状态样式 | string | 'light' gap | 设置数字和描述直接的间距(像素) | number | 8 diff --git a/src/components/PageHeader/index.d.ts b/src/components/PageHeader/index.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..b21fd1600e71c81275059e968a0c007e5c546642 --- /dev/null +++ b/src/components/PageHeader/index.d.ts @@ -0,0 +1,16 @@ +import React from "react"; +export interface PageHeaderProps { + title?: React.ReactNode | string; + logo?: React.ReactNode | string; + action?: React.ReactNode | string; + content?: React.ReactNode; + extraContent?: React.ReactNode; + routes?: Array; + params: any; + breadcrumbList?: Array<{ title: React.ReactNode; href?: string }>; + tabList?: Array<{ key: string; tab: React.ReactNode }>; + onTabChange?: (key: string) => void; + linkElement?: string | React.ReactNode; +} + +export default class PageHeader extends React.Component {} diff --git a/src/components/Result/demo/classic.md b/src/components/Result/demo/classic.md index 81e6a2eb8b8968e6828edbb4a6d390e3aa865688..b4ccdcf148e73d9b3ce38b72f443f8f1b4cdf8e4 100644 --- a/src/components/Result/demo/classic.md +++ b/src/components/Result/demo/classic.md @@ -33,7 +33,7 @@ const desc2 = ( const extra = (
-
+
项目名称
diff --git a/src/components/Result/demo/error.md b/src/components/Result/demo/error.md index f84720a745643b94762bb1db239687331c980410..836bd8cb07b48298b98fcf53d0b3c8b7853784ab 100644 --- a/src/components/Result/demo/error.md +++ b/src/components/Result/demo/error.md @@ -11,7 +11,7 @@ import { Button, Icon } from 'antd'; const extra = (
-
+
您提交的内容有如下错误:
diff --git a/src/components/Result/index.d.ts b/src/components/Result/index.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..6bd317170d5da5f6bcc205b9fd5545baefe20685 --- /dev/null +++ b/src/components/Result/index.d.ts @@ -0,0 +1,10 @@ +import React from "react"; +export interface ResultProps { + type: "success" | "error"; + title: React.ReactNode; + description?: React.ReactNode; + extra?: React.ReactNode; + actions?: React.ReactNode; +} + +export default class Result extends React.Component {} diff --git a/src/components/TagSelect/index.d.ts b/src/components/TagSelect/index.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..0258094297db5e0c916d072a751ab8e64082f4b8 --- /dev/null +++ b/src/components/TagSelect/index.d.ts @@ -0,0 +1,20 @@ +import React from "react"; +export interface TagSelectProps { + onChange?: (value: Array) => void; + expandable?: boolean; +} +export interface TagSelectOptionProps { + value: string; +} + +export class TagSelectOption extends React.Component< + TagSelectOptionProps, + any +> {} + +export default class TagSelect extends React.Component { + static Option: typeof TagSelectOption; + children: + | React.ReactElement + | Array>; +} diff --git a/src/components/TagSelect/index.md b/src/components/TagSelect/index.md index 396c144dda6f2362f585a047de551f01bf9bbe01..6b39e4f5d358bf8f235d98d3da91730d50649ac6 100644 --- a/src/components/TagSelect/index.md +++ b/src/components/TagSelect/index.md @@ -17,3 +17,11 @@ order: 13 |----------|------------------------------------------|-------------|-------| | onChange | 标签选择的回调函数 | Function(checkedTags) | | | expandable | 是否展示 `展开/收起` 按钮 | Boolean | false | + + +### TagSelectOption + +| 参数 | 说明 | 类型 | 默认值 | +|----------|------------------------------------------|-------------|-------| +| value | TagSelect的值 | Function(checkedTags) | - | +| children | tag的内容 | string \| ReactNode | - | diff --git a/src/components/Trend/index.d.ts b/src/components/Trend/index.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..6ac7c460bd70a1a61d450de8937b4b99e975d5c2 --- /dev/null +++ b/src/components/Trend/index.d.ts @@ -0,0 +1,8 @@ +import React from "react"; + +export interface TrendProps { + colorful?: boolean; + flag: "up" | "down"; +} + +export default class Trend extends React.Component {} diff --git a/src/components/Trend/index.md b/src/components/Trend/index.md index 54c241f457f8325b4881e85aa0dfa61191911c52..683ed6199b4554c447c379335dd5f9ba7575cdc1 100644 --- a/src/components/Trend/index.md +++ b/src/components/Trend/index.md @@ -18,4 +18,4 @@ order: 14 | 参数 | 说明 | 类型 | 默认值 | |----------|------------------------------------------|-------------|-------| | colorful | 是否彩色标记 | Boolean | true | -| flag | 上升下降标识:`up\|down` | string | - | +| flag | 上升下降标识:`up|down` | string | - |