10 changed files with 112 additions and 55 deletions
@ -0,0 +1,13 @@ |
|||||
|
import * as React from 'react'; |
||||
|
import { RouteProps } from 'react-router'; |
||||
|
|
||||
|
type authorityFN = (currentAuthority?: string) => boolean; |
||||
|
|
||||
|
type authority = string | string[] | authorityFN | Promise<any>; |
||||
|
|
||||
|
export interface IAuthorizedRouteProps extends RouteProps { |
||||
|
authority: authority; |
||||
|
} |
||||
|
export { authority }; |
||||
|
|
||||
|
export class AuthorizedRoute extends React.Component<IAuthorizedRouteProps, any> {} |
||||
@ -0,0 +1,11 @@ |
|||||
|
import * as React from 'react'; |
||||
|
export interface ILoginItemProps { |
||||
|
name?: string; |
||||
|
rules?: any[]; |
||||
|
style?: React.CSSProperties; |
||||
|
onGetCaptcha?: () => void; |
||||
|
placeholder?: string; |
||||
|
buttonText?: React.ReactNode; |
||||
|
} |
||||
|
|
||||
|
export class LoginItem extends React.Component<ILoginItemProps, any> {} |
||||
@ -0,0 +1,7 @@ |
|||||
|
import * as React from 'react'; |
||||
|
|
||||
|
export interface ILoginTabProps { |
||||
|
key?: string; |
||||
|
tab?: React.ReactNode; |
||||
|
} |
||||
|
export default class LoginTab extends React.Component<ILoginTabProps, any> {} |
||||
@ -1,34 +1,20 @@ |
|||||
import * as React from 'react'; |
|
||||
import Button from 'antd/lib/button'; |
import Button from 'antd/lib/button'; |
||||
export interface LoginProps { |
import * as React from 'react'; |
||||
|
import LoginItem from './LoginItem'; |
||||
|
import LoginTab from './LoginTab'; |
||||
|
|
||||
|
export interface ILoginProps { |
||||
defaultActiveKey?: string; |
defaultActiveKey?: string; |
||||
onTabChange?: (key: string) => void; |
onTabChange?: (key: string) => void; |
||||
style?: React.CSSProperties; |
style?: React.CSSProperties; |
||||
onSubmit?: (error: any, values: any) => void; |
onSubmit?: (error: any, values: any) => void; |
||||
} |
} |
||||
|
|
||||
export interface TabProps { |
export default class Login extends React.Component<ILoginProps, any> { |
||||
key?: string; |
public static Tab: typeof LoginTab; |
||||
tab?: React.ReactNode; |
public static UserName: typeof LoginItem; |
||||
} |
public static Password: typeof LoginItem; |
||||
export class Tab extends React.Component<TabProps, any> {} |
public static Mobile: typeof LoginItem; |
||||
|
public static Captcha: typeof LoginItem; |
||||
export interface LoginItemProps { |
public static Submit: typeof Button; |
||||
name?: string; |
|
||||
rules?: any[]; |
|
||||
style?: React.CSSProperties; |
|
||||
onGetCaptcha?: () => void; |
|
||||
placeholder?: string; |
|
||||
buttonText?: React.ReactNode; |
|
||||
} |
|
||||
|
|
||||
export class LoginItem extends React.Component<LoginItemProps, any> {} |
|
||||
|
|
||||
export default class Login extends React.Component<LoginProps, any> { |
|
||||
static Tab: typeof Tab; |
|
||||
static UserName: typeof LoginItem; |
|
||||
static Password: typeof LoginItem; |
|
||||
static Mobile: typeof LoginItem; |
|
||||
static Captcha: typeof LoginItem; |
|
||||
static Submit: typeof Button; |
|
||||
} |
} |
||||
|
|||||
@ -1,6 +1,6 @@ |
|||||
import * as React from 'react'; |
import * as React from 'react'; |
||||
import { IPageHeaderProps } from './index' |
import { IPageHeaderProps } from './index'; |
||||
|
|
||||
export default class BreadcrumbView extends React.Component<IPageHeaderProps, any> {} |
export default class BreadcrumbView extends React.Component<IPageHeaderProps, any> {} |
||||
|
|
||||
export function getBreadcrumb(breadcrumbNameMap: Object, url: string): Object; |
export function getBreadcrumb(breadcrumbNameMap: object, url: string): object; |
||||
|
|||||
@ -0,0 +1,35 @@ |
|||||
|
{ |
||||
|
"compilerOptions": { |
||||
|
"outDir": "build/dist", |
||||
|
"module": "esnext", |
||||
|
"target": "es2016", |
||||
|
"lib": ["es6", "dom"], |
||||
|
"sourceMap": true, |
||||
|
"baseUrl": ".", |
||||
|
"jsx": "react", |
||||
|
"allowSyntheticDefaultImports": true, |
||||
|
"moduleResolution": "node", |
||||
|
"rootDirs": ["/src", "/test", "/mock","./typings"], |
||||
|
"forceConsistentCasingInFileNames": true, |
||||
|
"noImplicitReturns": true, |
||||
|
"suppressImplicitAnyIndexErrors": true, |
||||
|
"noUnusedLocals": true, |
||||
|
"allowJs": true, |
||||
|
"experimentalDecorators": true, |
||||
|
"paths": { |
||||
|
"@/*": ["./src/*"] |
||||
|
} |
||||
|
}, |
||||
|
"include": ["./src"], |
||||
|
"exclude": [ |
||||
|
"node_modules", |
||||
|
"build", |
||||
|
"scripts", |
||||
|
"acceptance-tests", |
||||
|
"webpack", |
||||
|
"jest", |
||||
|
"src/setupTests.ts", |
||||
|
"tslint:latest", |
||||
|
"tslint-config-prettier" |
||||
|
] |
||||
|
} |
||||
@ -0,0 +1,11 @@ |
|||||
|
{ |
||||
|
"extends": ["tslint:latest", "tslint-react", "tslint-config-prettier"], |
||||
|
"rules": { |
||||
|
"no-var-requires": false, |
||||
|
"no-submodule-imports": false, |
||||
|
"object-literal-sort-keys": false, |
||||
|
"jsx-no-lambda": false, |
||||
|
"no-implicit-dependencies": false, |
||||
|
"no-console": false |
||||
|
} |
||||
|
} |
||||
Loading…
Reference in new issue