Commit 8feaa32b authored by 陈帅's avatar 陈帅 Committed by niko

Support typescript (#341)

* fix some errors found during use

* fix some errors found during use

* Replace  "string | React.ReactNode" with  React.ReactNode

* replace with * as React

* remove excess property
parent ee0f8db0
import React from "react";
import * as React from "react";
export interface AvatarItemProps {
tips: React.ReactNode;
src: string;
......
import React from "react";
import * as React from "react";
export interface BarProps {
title: string | React.ReactNode;
title: React.ReactNode;
color?: string;
margin?: [number, number, number, number];
height: number;
......
import React from "react";
import * as React from "react";
export interface ChartCardProps {
title: string | React.ReactNode;
title: React.ReactNode;
action?: React.ReactNode;
total?: React.ReactNode | number;
footer?: React.ReactNode;
contentHeight: number;
contentHeight?: number;
avatar?: React.ReactNode;
}
......
import React from "react";
import * as React from "react";
export interface FieldProps {
label: string | React.ReactNode;
value: string | React.ReactNode;
label: React.ReactNode;
value: React.ReactNode;
}
export default class Field extends React.Component<FieldProps, any> {}
import React from "react";
import * as React from "react";
export interface GaugeProps {
title: string | React.ReactNode;
title: React.ReactNode;
color?: string;
height: number;
bgColor?: number;
......
import React from "react";
import * as React from "react";
// g2已经更新到3.0
// 不带的写了
......
import React from "react";
import * as React from "react";
export interface MiniBarProps {
color?: string;
height: number;
......
import React from "react";
import * as React from "react";
export interface MiniProgressProps {
target: number;
color?: string;
strokeWidth: number;
percent: number;
strokeWidth?: number;
percent?: number;
}
export default class MiniProgress extends React.Component<
......
import React from "react";
import * as React from "react";
export interface PieProps {
animate?: boolean;
color?: string;
......@@ -11,10 +11,10 @@ export interface PieProps {
y: number;
}>;
total?: string;
title?: string | React.ReactNode;
title?: React.ReactNode;
tooltip?: boolean;
valueFormat?: (value: string) => string;
subTitle?: string | React.ReactNode;
subTitle?: React.ReactNode;
}
export default class Pie extends React.Component<PieProps, any> {}
import React from "react";
import * as React from "react";
export interface RadarProps {
title?: string | React.ReactNode;
title?: React.ReactNode;
height: number;
margin?: [number, number, number, number];
hasLegend?: boolean;
......
import React from "react";
import * as React from "react";
export interface TagCloudProps {
data: Array<{
name: string;
......
import React from "react";
import * as React from "react";
export interface TimelineChartProps {
data: Array<{
x: string;
......
import React from "react";
import * as React from "react";
export interface WaterWaveProps {
title: string | React.ReactNode;
title: React.ReactNode;
color?: string;
height: number;
percent: number;
......
import React from "react";
import * as React from "react";
export interface CountDownProps {
format?: (time: number) => void;
target: Date | number;
......
import React from "react";
import * as React from "react";
export interface DescriptionListProps {
layout?: "horizontal" | "vertical";
col?: number;
......
import React from "react";
import * as React from "react";
export interface EllipsisProps {
tooltip?: boolean;
length?: number;
......
import React from "react";
import * as 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;
linkElement?: React.ReactNode;
}
export default class Exception extends React.Component<ExceptionProps, any> {}
import React from "react";
import * as React from "react";
export interface FooterToolbarProps {
extra: React.ReactNode;
}
......
import React from "react";
import * as React from "react";
export interface GlobalFooterProps {
links: Array<{
title: string | React.ReactNode;
title: React.ReactNode;
href: string;
blankTarget?: boolean;
}>;
......
import React from "react";
import * as React from "react";
export interface HeaderSearchProps {
placeholder?: string;
dataSource?: Array<string>;
......
import React from "react";
import * as React from "react";
export interface NoticeIconData {
avatar: string;
title: React.ReactNode;
......
import React from "react";
import * as 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;
title?: React.ReactNode | string;
subTitle?: React.ReactNode | string;
total?: React.ReactNode | string;
status?: "up" | "down";
theme?: string;
gap?: number;
subTotal?: number;
}
export default class NumberInfo extends React.Component<NumberInfoProps, any> {}
......@@ -16,6 +16,7 @@ order: 10
title | 标题 | ReactNode\|string | -
subTitle | 子标题 | ReactNode\|string | -
total | 总量 | ReactNode\|string | -
subTotal | 子总量 | ReactNode\|string | -
status | 增加状态 | 'up \| down' | -
theme | 状态样式 | string | 'light'
gap | 设置数字和描述直接的间距(像素) | number | 8
import React from "react";
import * as React from "react";
export interface PageHeaderProps {
title?: React.ReactNode | string;
logo?: React.ReactNode | string;
......@@ -6,11 +6,11 @@ export interface PageHeaderProps {
content?: React.ReactNode;
extraContent?: React.ReactNode;
routes?: Array<any>;
params: 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;
linkElement?: React.ReactNode;
}
export default class PageHeader extends React.Component<PageHeaderProps, any> {}
import React from "react";
import * as React from "react";
export interface ResultProps {
type: "success" | "error";
title: React.ReactNode;
......
import React from "react";
import * as React from "react";
export interface TagSelectProps {
onChange?: (value: Array<string>) => void;
expandable?: boolean;
......
import React from "react";
import * as React from "react";
export interface TrendProps {
colorful?: boolean;
......
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