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"; |
import * as React from 'react'; |
||||
export interface AvatarItemProps { |
import AvatarItem from './AvatarItem'; |
||||
tips: React.ReactNode; |
|
||||
src: string; |
|
||||
style?: React.CSSProperties; |
|
||||
} |
|
||||
|
|
||||
export interface AvatarListProps { |
export interface IAvatarListProps { |
||||
size?: "large" | "small" | "mini" | "default"; |
size?: 'large' | 'small' | 'mini' | 'default'; |
||||
style?: React.CSSProperties; |
style?: React.CSSProperties; |
||||
children: |
children: |
||||
| React.ReactElement<AvatarItem> |
| React.ReactElement<AvatarItem> |
||||
| Array<React.ReactElement<AvatarItem>>; |
| Array<React.ReactElement<AvatarItem>>; |
||||
} |
} |
||||
|
|
||||
declare class AvatarItem extends React.Component<AvatarItemProps, any> { |
export default class AvatarList extends React.Component<IAvatarListProps, any> { |
||||
constructor(props: AvatarItemProps); |
public static Item: typeof AvatarItem; |
||||
} |
|
||||
|
|
||||
export default class AvatarList extends React.Component<AvatarListProps, any> { |
|
||||
constructor(props: AvatarListProps); |
|
||||
static Item: typeof AvatarItem; |
|
||||
} |
} |
||||
|
|||||
@ -1,8 +1,8 @@ |
|||||
import * as React from "react"; |
import * as React from "react"; |
||||
export interface FieldProps { |
export interface IFieldProps { |
||||
label: React.ReactNode; |
label: React.ReactNode; |
||||
value: React.ReactNode; |
value: React.ReactNode; |
||||
style?: React.CSSProperties; |
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"; |
import * as React from "react"; |
||||
export interface CountDownProps { |
export interface ICountDownProps { |
||||
format?: (time: number) => void; |
format?: (time: number) => void; |
||||
target: Date | number; |
target: Date | number; |
||||
onEnd?: () => void; |
onEnd?: () => void; |
||||
style?: React.CSSProperties; |
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'; |
import * as React from 'react'; |
||||
export interface FooterToolbarProps { |
export interface IFooterToolbarProps { |
||||
extra: React.ReactNode; |
extra: React.ReactNode; |
||||
style?: React.CSSProperties; |
style?: React.CSSProperties; |
||||
} |
} |
||||
|
|
||||
export default class FooterToolbar extends React.Component< |
export default class FooterToolbar extends React.Component< |
||||
FooterToolbarProps, |
IFooterToolbarProps, |
||||
any |
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'; |
import * as React from 'react'; |
||||
export interface PageHeaderProps { |
export interface IPageHeaderProps { |
||||
title?: React.ReactNode | string; |
title?: React.ReactNode | string; |
||||
logo?: React.ReactNode | string; |
logo?: React.ReactNode | string; |
||||
action?: React.ReactNode | string; |
action?: React.ReactNode | string; |
||||
content?: React.ReactNode; |
content?: React.ReactNode; |
||||
extraContent?: React.ReactNode; |
extraContent?: React.ReactNode; |
||||
routes?: Array<any>; |
routes?: any[]; |
||||
params?: any; |
params?: any; |
||||
breadcrumbList?: Array<{ title: React.ReactNode; href?: string }>; |
breadcrumbList?: Array<{ title: React.ReactNode; href?: string }>; |
||||
tabList?: Array<{ key: string; tab: React.ReactNode }>; |
tabList?: Array<{ key: string; tab: React.ReactNode }>; |
||||
tabActiveKey?: string; |
tabActiveKey?: string; |
||||
|
tabDefaultActiveKey?: string; |
||||
onTabChange?: (key: string) => void; |
onTabChange?: (key: string) => void; |
||||
tabBarExtraContent?: React.ReactNode; |
tabBarExtraContent?: React.ReactNode; |
||||
linkElement?: React.ReactNode; |
linkElement?: React.ReactNode; |
||||
style?: React.CSSProperties; |
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'; |
import * as React from 'react'; |
||||
export interface TagSelectProps { |
import TagSelectOption from './TagSelectOption'; |
||||
onChange?: (value: Array<string>) => void; |
|
||||
|
export interface ITagSelectProps { |
||||
|
onChange?: (value: string[]) => void; |
||||
expandable?: boolean; |
expandable?: boolean; |
||||
value?: Array<string>| Array<number>; |
value?: string[] | number[]; |
||||
style?: React.CSSProperties; |
|
||||
} |
|
||||
export interface TagSelectOptionProps { |
|
||||
value: string| number; |
|
||||
style?: React.CSSProperties; |
style?: React.CSSProperties; |
||||
} |
} |
||||
|
|
||||
export class TagSelectOption extends React.Component< |
export default class TagSelect extends React.Component<ITagSelectProps, any> { |
||||
TagSelectOptionProps, |
public static Option: typeof TagSelectOption; |
||||
any |
private children: |
||||
> {} |
|
||||
|
|
||||
export default class TagSelect extends React.Component<TagSelectProps, any> { |
|
||||
static Option: typeof TagSelectOption; |
|
||||
children: |
|
||||
| React.ReactElement<TagSelectOption> |
| React.ReactElement<TagSelectOption> |
||||
| Array<React.ReactElement<TagSelectOption>>; |
| Array<React.ReactElement<TagSelectOption>>; |
||||
} |
} |
||||
|
|||||
@ -1,9 +1,9 @@ |
|||||
import * as React from 'react'; |
import * as React from 'react'; |
||||
|
|
||||
export interface TrendProps { |
export interface ITrendProps { |
||||
colorful?: boolean; |
colorful?: boolean; |
||||
flag: 'up' | 'down'; |
flag: 'up' | 'down'; |
||||
style?: React.CSSProperties; |
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'; |
import request from '../utils/request'; |
||||
|
|
||||
export async function query404() { |
export async function query(code) { |
||||
return request('/api/404'); |
return request(`/api/${code}`); |
||||
} |
|
||||
|
|
||||
export async function query401() { |
|
||||
return request('/api/401'); |
|
||||
} |
|
||||
|
|
||||
export async function query403() { |
|
||||
return request('/api/403'); |
|
||||
} |
|
||||
|
|
||||
export async function query500() { |
|
||||
return request('/api/500'); |
|
||||
} |
} |
||||
|
|||||
Loading…
Reference in new issue