Jelajahi Sumber

两个文档方面的修改 (#307)

* 增加AvatarList d.ts说明文件

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

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

* 删除无用的空行.  优化格式
jim chen 8 tahun lalu
induk
melakukan
2dfe10fdc0
2 mengubah file dengan 23 tambahan dan 2 penghapusan
  1. 21 0
      src/components/AvatarList/index.d.ts
  2. 2 2
      src/components/Charts/index.md

+ 21 - 0
src/components/AvatarList/index.d.ts

@@ -0,0 +1,21 @@
+import React from "react";
+export interface AvatarItemProps {
+  tips: string | React.ReactNode;
+  src: string;
+}
+
+export interface AvatarListProps {
+  size?: "large" | "small" | "mini" | "default";
+  children:
+    | React.ReactElement<AvatarItem>
+    | Array<React.ReactElement<AvatarItem>>;
+}
+
+declare class AvatarItem extends React.Component<AvatarItemProps, any> {
+  constructor(props: AvatarItemProps);
+}
+
+export default class AvatarList extends React.Component<AvatarListProps, any> {
+  constructor(props: AvatarListProps);
+  static Item: typeof AvatarItem;
+}

+ 2 - 2
src/components/Charts/index.md

@@ -40,8 +40,8 @@ Ant Design Pro 提供的业务中常用的图表类型,都是基于 [G2](https
 | height | 图表高度 | number | - |
 | height | 图表高度 | number | - |
 | line | 是否显示描边 | boolean | false |
 | line | 是否显示描边 | boolean | false |
 | animate | 是否显示动画 | boolean | true |
 | animate | 是否显示动画 | boolean | true |
-| xAxis | [x 轴配置](https://antv.alipay.com/g2/doc/tutorial/start/axis.html) | object | - |
-| yAxis | [y 轴配置](https://antv.alipay.com/g2/doc/tutorial/start/axis.html) | object | - |
+| xAxis | [x 轴配置](http://antvis.github.io/g2/doc/tutorial/start/axis.html) | object | - |
+| yAxis | [y 轴配置](http://antvis.github.io/g2/doc/tutorial/start/axis.html) | object | - |
 | data | 数据 | array<{x, y}> | - |
 | data | 数据 | array<{x, y}> | - |
 
 
 ### MiniProgress
 ### MiniProgress