Commit 55e5d205 authored by jim chen's avatar jim chen Committed by 偏右

增加所有剩余对外开发的组件 .d.ts (#312)

* 增加AvatarList d.ts说明文件

* 修改 axis的链接 , g2修改了新的官网

* AvatarList 增加判断是否为必须属性

* 删除无用的空行.  优化格式

* 修改错误的图表文档. 增加几处漏写的文档

* 添加图表的 描述文件chart.d.ts

* 改了个错别字!

* 增加CountDown d.ts描述文件

* 增加 DescriptionList  d.ts描述文件

* 增加所有剩余对外开发的组件 .d.ts
完善一些文档

* fontWeight 推荐使用 number 来表示数字
parent ffbba86b
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<ExceptionProps, any> {}
import React from "react";
export interface FooterToolbarProps {
extra: React.ReactNode;
}
export default class FooterToolbar extends React.Component<
FooterToolbarProps,
any
> {}
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
> {}
import React from "react";
export interface HeaderSearchProps {
placeholder?: string;
dataSource?: Array<string>;
onSearch?: (value: string) => void;
onChange?: (value: string) => void;
onPressEnter?: (value: string) => void;
}
export default class HeaderSearch extends React.Component<
HeaderSearchProps,
any
> {}
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<NoticeIconData>;
title: string;
emptyText?: React.ReactNode;
emptyImage?: string;
}
export class NoticeIconTab extends React.Component<NoticeIconTabProps, any> {}
export default class NoticeIcon extends React.Component<NoticeIconProps, any> {
static Tab: typeof NoticeIconTab;
}
......@@ -28,7 +28,7 @@ locale | 默认文案 | Object | `{ emptyText: '暂无数据', clear: '清空' }
参数 | 说明 | 类型 | 默认值
----|------|-----|------
title | 消息分类的页签标题 | string | -
data | 列表数据,格式参照下表 | Array | `[]`
list | 列表数据,格式参照下表 | Array | `[]`
emptyText | 针对每个 Tab 定制空数据文案 | ReactNode | -
emptyImage | 针对每个 Tab 定制空数据图片 | string | -
......
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<NumberInfoProps, any> {}
......@@ -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
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<any>;
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<PageHeaderProps, any> {}
......@@ -33,7 +33,7 @@ const desc2 = (
const extra = (
<div>
<div style={{ fontSize: 16, color: 'rgba(0, 0, 0, 0.85)', fontWeight: '500', marginBottom: 20 }}>
<div style={{ fontSize: 16, color: 'rgba(0, 0, 0, 0.85)', fontWeight: 500, marginBottom: 20 }}>
项目名称
</div>
<Row style={{ marginBottom: 16 }}>
......
......@@ -11,7 +11,7 @@ import { Button, Icon } from 'antd';
const extra = (
<div>
<div style={{ fontSize: 16, color: 'rgba(0, 0, 0, 0.85)', fontWeight: '500', marginBottom: 16 }}>
<div style={{ fontSize: 16, color: 'rgba(0, 0, 0, 0.85)', fontWeight: 500, marginBottom: 16 }}>
您提交的内容有如下错误:
</div>
<div style={{ marginBottom: 16 }}>
......
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<ResultProps, any> {}
import React from "react";
export interface TagSelectProps {
onChange?: (value: Array<string>) => void;
expandable?: boolean;
}
export interface TagSelectOptionProps {
value: string;
}
export class TagSelectOption extends React.Component<
TagSelectOptionProps,
any
> {}
export default class TagSelect extends React.Component<TagSelectProps, any> {
static Option: typeof TagSelectOption;
children:
| React.ReactElement<TagSelectOption>
| Array<React.ReactElement<TagSelectOption>>;
}
......@@ -17,3 +17,11 @@ order: 13
|----------|------------------------------------------|-------------|-------|
| onChange | 标签选择的回调函数 | Function(checkedTags) | |
| expandable | 是否展示 `展开/收起` 按钮 | Boolean | false |
### TagSelectOption
| 参数 | 说明 | 类型 | 默认值 |
|----------|------------------------------------------|-------------|-------|
| value | TagSelect的值 | Function(checkedTags) | - |
| children | tag的内容 | string \| ReactNode | - |
import React from "react";
export interface TrendProps {
colorful?: boolean;
flag: "up" | "down";
}
export default class Trend extends React.Component<TrendProps, any> {}
......@@ -18,4 +18,4 @@ order: 14
| 参数 | 说明 | 类型 | 默认值 |
|----------|------------------------------------------|-------------|-------|
| colorful | 是否彩色标记 | Boolean | true |
| flag | 上升下降标识:`up\|down` | string | - |
| flag | 上升下降标识:`up|down` | string | - |
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment