63 changed files with 470 additions and 380 deletions
@ -1,21 +0,0 @@ |
|||
{ |
|||
"entry": "src/index.js", |
|||
"extraBabelPlugins": [ |
|||
"transform-decorators-legacy", |
|||
["import", { "libraryName": "antd", "libraryDirectory": "es", "style": true }] |
|||
], |
|||
"env": { |
|||
"development": { |
|||
"extraBabelPlugins": [ |
|||
"dva-hmr" |
|||
] |
|||
} |
|||
}, |
|||
"ignoreMomentLocale": true, |
|||
"theme": "./src/theme.js", |
|||
"html": { |
|||
"template": "./src/index.ejs" |
|||
}, |
|||
"publicPath": "/", |
|||
"hash": true |
|||
} |
|||
@ -0,0 +1,25 @@ |
|||
const path = require("path"); |
|||
|
|||
export default { |
|||
entry: "src/index.js", |
|||
extraBabelPlugins: [ |
|||
"transform-decorators-legacy", |
|||
["import", { libraryName: "antd", libraryDirectory: "es", style: true }] |
|||
], |
|||
env: { |
|||
development: { |
|||
extraBabelPlugins: ["dva-hmr"] |
|||
} |
|||
}, |
|||
alias: { |
|||
components: path.resolve(__dirname, "src/components/") |
|||
}, |
|||
ignoreMomentLocale: true, |
|||
theme: "./src/theme.js", |
|||
html: { |
|||
template: "./src/index.ejs" |
|||
}, |
|||
disableDynamicImport: true, |
|||
publicPath: "/", |
|||
hash: true |
|||
}; |
|||
@ -0,0 +1,10 @@ |
|||
import * as React from 'react'; |
|||
export interface IAvatarItemProps { |
|||
tips: React.ReactNode; |
|||
src: string; |
|||
style?: React.CSSProperties; |
|||
} |
|||
|
|||
export default class AvatarItem extends React.Component<IAvatarItemProps, any> { |
|||
constructor(props: IAvatarItemProps); |
|||
} |
|||
@ -1,23 +1,14 @@ |
|||
import * as React from "react"; |
|||
export interface AvatarItemProps { |
|||
tips: React.ReactNode; |
|||
src: string; |
|||
style?: React.CSSProperties; |
|||
} |
|||
import * as React from 'react'; |
|||
import AvatarItem from './AvatarItem'; |
|||
|
|||
export interface AvatarListProps { |
|||
size?: "large" | "small" | "mini" | "default"; |
|||
export interface IAvatarListProps { |
|||
size?: 'large' | 'small' | 'mini' | 'default'; |
|||
style?: React.CSSProperties; |
|||
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; |
|||
export default class AvatarList extends React.Component<IAvatarListProps, any> { |
|||
public static Item: typeof AvatarItem; |
|||
} |
|||
|
|||
@ -1,8 +1,8 @@ |
|||
import * as React from "react"; |
|||
export interface FieldProps { |
|||
export interface IFieldProps { |
|||
label: React.ReactNode; |
|||
value: React.ReactNode; |
|||
style?: React.CSSProperties; |
|||
} |
|||
|
|||
export default class Field extends React.Component<FieldProps, any> {} |
|||
export default class Field extends React.Component<IFieldProps, any> {} |
|||
|
|||
@ -1,9 +1,9 @@ |
|||
import * as React from "react"; |
|||
export interface CountDownProps { |
|||
export interface ICountDownProps { |
|||
format?: (time: number) => void; |
|||
target: Date | number; |
|||
onEnd?: () => void; |
|||
style?: React.CSSProperties; |
|||
} |
|||
|
|||
export default class CountDown extends React.Component<CountDownProps, any> {} |
|||
export default class CountDown extends React.Component<ICountDownProps, any> {} |
|||
|
|||
@ -0,0 +1,9 @@ |
|||
import * as React from 'react'; |
|||
|
|||
export default class Description extends React.Component< |
|||
{ |
|||
term: React.ReactNode; |
|||
style?: React.CSSProperties; |
|||
}, |
|||
any |
|||
> {} |
|||
@ -1,10 +1,10 @@ |
|||
import * as React from 'react'; |
|||
export interface FooterToolbarProps { |
|||
export interface IFooterToolbarProps { |
|||
extra: React.ReactNode; |
|||
style?: React.CSSProperties; |
|||
} |
|||
|
|||
export default class FooterToolbar extends React.Component< |
|||
FooterToolbarProps, |
|||
IFooterToolbarProps, |
|||
any |
|||
> {} |
|||
|
|||
@ -0,0 +1,22 @@ |
|||
import * as React from 'react'; |
|||
export interface INoticeIconData { |
|||
avatar?: string; |
|||
title?: React.ReactNode; |
|||
description?: React.ReactNode; |
|||
datetime?: React.ReactNode; |
|||
extra?: React.ReactNode; |
|||
style?: React.CSSProperties; |
|||
} |
|||
|
|||
export interface INoticeIconTabProps { |
|||
list?: INoticeIconData[]; |
|||
title?: string; |
|||
emptyText?: React.ReactNode; |
|||
emptyImage?: string; |
|||
style?: React.CSSProperties; |
|||
} |
|||
|
|||
export default class NoticeIconTab extends React.Component< |
|||
INoticeIconTabProps, |
|||
any |
|||
> {} |
|||
@ -1,19 +1,20 @@ |
|||
import * as React from 'react'; |
|||
export interface PageHeaderProps { |
|||
export interface IPageHeaderProps { |
|||
title?: React.ReactNode | string; |
|||
logo?: React.ReactNode | string; |
|||
action?: React.ReactNode | string; |
|||
content?: React.ReactNode; |
|||
extraContent?: React.ReactNode; |
|||
routes?: Array<any>; |
|||
routes?: any[]; |
|||
params?: any; |
|||
breadcrumbList?: Array<{ title: React.ReactNode; href?: string }>; |
|||
tabList?: Array<{ key: string; tab: React.ReactNode }>; |
|||
tabActiveKey?: string; |
|||
tabDefaultActiveKey?: string; |
|||
onTabChange?: (key: string) => void; |
|||
tabBarExtraContent?: React.ReactNode; |
|||
linkElement?: React.ReactNode; |
|||
style?: React.CSSProperties; |
|||
} |
|||
|
|||
export default class PageHeader extends React.Component<PageHeaderProps, any> {} |
|||
export default class PageHeader extends React.Component<IPageHeaderProps, any> {} |
|||
|
|||
@ -0,0 +1,11 @@ |
|||
import * as React from 'react'; |
|||
|
|||
export interface ITagSelectOptionProps { |
|||
value: string | number; |
|||
style?: React.CSSProperties; |
|||
} |
|||
|
|||
export default class TagSelectOption extends React.Component< |
|||
ITagSelectOptionProps, |
|||
any |
|||
> {} |
|||
@ -1,23 +1,16 @@ |
|||
import * as React from 'react'; |
|||
export interface TagSelectProps { |
|||
onChange?: (value: Array<string>) => void; |
|||
import TagSelectOption from './TagSelectOption'; |
|||
|
|||
export interface ITagSelectProps { |
|||
onChange?: (value: string[]) => void; |
|||
expandable?: boolean; |
|||
value?: Array<string>| Array<number>; |
|||
style?: React.CSSProperties; |
|||
} |
|||
export interface TagSelectOptionProps { |
|||
value: string| number; |
|||
value?: string[] | number[]; |
|||
style?: React.CSSProperties; |
|||
} |
|||
|
|||
export class TagSelectOption extends React.Component< |
|||
TagSelectOptionProps, |
|||
any |
|||
> {} |
|||
|
|||
export default class TagSelect extends React.Component<TagSelectProps, any> { |
|||
static Option: typeof TagSelectOption; |
|||
children: |
|||
export default class TagSelect extends React.Component<ITagSelectProps, any> { |
|||
public static Option: typeof TagSelectOption; |
|||
private children: |
|||
| React.ReactElement<TagSelectOption> |
|||
| Array<React.ReactElement<TagSelectOption>>; |
|||
} |
|||
|
|||
@ -1,9 +1,9 @@ |
|||
import * as React from 'react'; |
|||
|
|||
export interface TrendProps { |
|||
export interface ITrendProps { |
|||
colorful?: boolean; |
|||
flag: 'up' | 'down'; |
|||
style?: React.CSSProperties; |
|||
} |
|||
|
|||
export default class Trend extends React.Component<TrendProps, any> {} |
|||
export default class Trend extends React.Component<ITrendProps, any> {} |
|||
|
|||
@ -1,17 +1,5 @@ |
|||
import request from '../utils/request'; |
|||
|
|||
export async function query404() { |
|||
return request('/api/404'); |
|||
} |
|||
|
|||
export async function query401() { |
|||
return request('/api/401'); |
|||
} |
|||
|
|||
export async function query403() { |
|||
return request('/api/403'); |
|||
} |
|||
|
|||
export async function query500() { |
|||
return request('/api/500'); |
|||
export async function query(code) { |
|||
return request(`/api/${code}`); |
|||
} |
|||
|
|||
Loading…
Reference in new issue