Browse Source
* 增加AvatarList d.ts说明文件 * 修改 axis的链接 , g2修改了新的官网 * AvatarList 增加判断是否为必须属性 * 删除无用的空行. 优化格式 * 修改错误的图表文档. 增加几处漏写的文档 * 添加图表的 描述文件chart.d.ts * 改了个错别字! * 增加CountDown d.ts描述文件 * 增加 DescriptionList d.ts描述文件pull/310/head
committed by
niko
19 changed files with 220 additions and 5 deletions
@ -0,0 +1,14 @@ |
|||
import React from "react"; |
|||
export interface BarProps { |
|||
title: string | React.ReactNode; |
|||
color?: string; |
|||
margin?: [number, number, number, number]; |
|||
height: number; |
|||
data: Array<{ |
|||
x: string; |
|||
y: number; |
|||
}>; |
|||
autoLabel?: boolean; |
|||
} |
|||
|
|||
export default class Bar extends React.Component<BarProps, any> {} |
|||
@ -0,0 +1,11 @@ |
|||
import React from "react"; |
|||
export interface ChartCardProps { |
|||
title: string | React.ReactNode; |
|||
action?: React.ReactNode; |
|||
total?: React.ReactNode | number; |
|||
footer?: React.ReactNode; |
|||
contentHeight: number; |
|||
avatar?: React.ReactNode; |
|||
} |
|||
|
|||
export default class ChartCard extends React.Component<ChartCardProps, any> {} |
|||
@ -0,0 +1,7 @@ |
|||
import React from "react"; |
|||
export interface FieldProps { |
|||
label: string | React.ReactNode; |
|||
value: string | React.ReactNode; |
|||
} |
|||
|
|||
export default class Field extends React.Component<FieldProps, any> {} |
|||
@ -0,0 +1,10 @@ |
|||
import React from "react"; |
|||
export interface GaugeProps { |
|||
title: string | React.ReactNode; |
|||
color?: string; |
|||
height: number; |
|||
bgColor?: number; |
|||
percent: number; |
|||
} |
|||
|
|||
export default class Gauge extends React.Component<GaugeProps, any> {} |
|||
@ -0,0 +1,29 @@ |
|||
import React from "react"; |
|||
|
|||
// g2已经更新到3.0
|
|||
// 不带的写了
|
|||
|
|||
export interface Axis { |
|||
title: any; |
|||
line: any; |
|||
gridAlign: any; |
|||
labels: any; |
|||
tickLine: any; |
|||
grid: any; |
|||
} |
|||
|
|||
export interface MiniAreaProps { |
|||
color?: string; |
|||
height: number; |
|||
borderColor?: string; |
|||
line?: boolean; |
|||
animate?: boolean; |
|||
xAxis?: Axis; |
|||
yAxis?: Axis; |
|||
data: Array<{ |
|||
x: number; |
|||
y: number; |
|||
}>; |
|||
} |
|||
|
|||
export default class MiniArea extends React.Component<MiniAreaProps, any> {} |
|||
@ -0,0 +1,11 @@ |
|||
import React from "react"; |
|||
export interface MiniBarProps { |
|||
color?: string; |
|||
height: number; |
|||
data: Array<{ |
|||
x: number; |
|||
y: number; |
|||
}>; |
|||
} |
|||
|
|||
export default class MiniBar extends React.Component<MiniBarProps, any> {} |
|||
@ -0,0 +1,12 @@ |
|||
import React from "react"; |
|||
export interface MiniProgressProps { |
|||
target: number; |
|||
color?: string; |
|||
strokeWidth: number; |
|||
percent: number; |
|||
} |
|||
|
|||
export default class MiniProgress extends React.Component< |
|||
MiniProgressProps, |
|||
any |
|||
> {} |
|||
@ -0,0 +1,20 @@ |
|||
import React from "react"; |
|||
export interface PieProps { |
|||
animate?: boolean; |
|||
color?: string; |
|||
height: number; |
|||
hasLegend?: boolean; |
|||
margin?: [number, number, number, number]; |
|||
percent?: number; |
|||
data?: Array<{ |
|||
x: string; |
|||
y: number; |
|||
}>; |
|||
total?: string; |
|||
title?: string | React.ReactNode; |
|||
tooltip?: boolean; |
|||
valueFormat?: (value: string) => string; |
|||
subTitle?: string | React.ReactNode; |
|||
} |
|||
|
|||
export default class Pie extends React.Component<PieProps, any> {} |
|||
@ -0,0 +1,14 @@ |
|||
import React from "react"; |
|||
export interface RadarProps { |
|||
title?: string | React.ReactNode; |
|||
height: number; |
|||
margin?: [number, number, number, number]; |
|||
hasLegend?: boolean; |
|||
data: Array<{ |
|||
name: string; |
|||
label: string; |
|||
value: string; |
|||
}>; |
|||
} |
|||
|
|||
export default class Radar extends React.Component<RadarProps, any> {} |
|||
@ -0,0 +1,10 @@ |
|||
import React from "react"; |
|||
export interface TagCloudProps { |
|||
data: Array<{ |
|||
name: string; |
|||
value: number; |
|||
}>; |
|||
height: number; |
|||
} |
|||
|
|||
export default class TagCloud extends React.Component<TagCloudProps, any> {} |
|||
@ -0,0 +1,15 @@ |
|||
import React from "react"; |
|||
export interface TimelineChartProps { |
|||
data: Array<{ |
|||
x: string; |
|||
y1: string; |
|||
y2: string; |
|||
}>; |
|||
titleMap: { y1: string; y2: string }; |
|||
height?: number; |
|||
} |
|||
|
|||
export default class TimelineChart extends React.Component< |
|||
TimelineChartProps, |
|||
any |
|||
> {} |
|||
@ -0,0 +1,9 @@ |
|||
import React from "react"; |
|||
export interface WaterWaveProps { |
|||
title: string | React.ReactNode; |
|||
color?: string; |
|||
height: number; |
|||
percent: number; |
|||
} |
|||
|
|||
export default class WaterWave extends React.Component<WaterWaveProps, any> {} |
|||
@ -0,0 +1,17 @@ |
|||
export { default as numeral } from "numeral"; |
|||
export { default as ChartCard } from "./ChartCard"; |
|||
export { default as Bar } from "./Bar"; |
|||
export { default as Pie } from "./Pie"; |
|||
export { default as Radar } from "./Radar"; |
|||
export { default as Gauge } from "./Gauge"; |
|||
export { default as MiniArea } from "./MiniArea"; |
|||
export { default as MiniBar } from "./MiniBar"; |
|||
export { default as MiniProgress } from "./MiniProgress"; |
|||
export { default as Field } from "./Field"; |
|||
export { default as WaterWave } from "./WaterWave"; |
|||
export { default as TagCloud } from "./TagCloud"; |
|||
export { default as TimelineChart } from "./TimelineChart"; |
|||
|
|||
declare const yuan: (value: number | string) => string; |
|||
|
|||
export { yuan }; |
|||
@ -0,0 +1,9 @@ |
|||
import React from "react"; |
|||
export interface CountDownProps { |
|||
format?: (time: number) => void; |
|||
target: Date | number; |
|||
onEnd?: () => void; |
|||
style?: React.CSSProperties; |
|||
} |
|||
|
|||
export default class CountDown extends React.Component<CountDownProps, any> {} |
|||
@ -0,0 +1,22 @@ |
|||
import React from "react"; |
|||
export interface DescriptionListProps { |
|||
layout?: "horizontal" | "vertical"; |
|||
col?: number; |
|||
title: React.ReactNode; |
|||
gutter?: number; |
|||
size?: "large" | "small"; |
|||
} |
|||
|
|||
declare class Description extends React.Component< |
|||
{ |
|||
term: React.ReactNode; |
|||
}, |
|||
any |
|||
> {} |
|||
|
|||
export default class DescriptionList extends React.Component< |
|||
DescriptionListProps, |
|||
any |
|||
> { |
|||
static Description: typeof Description; |
|||
} |
|||
Loading…
Reference in new issue