UNPKG

fastlion-amis

Version:

一种MIS页面生成工具

127 lines (126 loc) 6.3 kB
/// <reference types="hoist-non-react-statics" /> import React from 'react'; import { ThemeProps } from '../theme'; import { BaseSchema } from '../Schema'; export declare enum StepStatus { wait = "wait", process = "process", finish = "finish", error = "error" } export declare type StepSchema = { /** * 标题 */ title?: string | JSX.Element; /** * 子标题 */ subTitle?: string | JSX.Element; /** * 图标 */ icon?: string; value?: string | number; /** * 描述 */ description?: string | JSX.Element; status?: StepStatus; } & Omit<BaseSchema, 'type'>; export interface StepsSchema extends BaseSchema { /** * 指定为 Steps 步骤条渲染器 */ type: 'steps'; /** * 步骤 */ steps?: Array<StepSchema>; /** * API 或 数据映射 */ source?: string; /** * 指定当前步骤 */ value?: number | string; /** * 变量映射 */ name?: string; status: StepStatus; /** * 展示模式 */ mode?: 'horizontal' | 'vertical'; } export interface StepsProps extends ThemeProps { steps: StepSchema[]; className: string; current: number; status?: StepStatus | { [propName: string]: StepStatus; }; mode?: 'horizontal' | 'vertical'; useMobileUI?: boolean; } export declare function Steps(props: StepsProps): JSX.Element; declare const _default: { new (props: (Omit<StepsProps, keyof ThemeProps> & import("../theme").ThemeOutterProps) | Readonly<Omit<StepsProps, keyof ThemeProps> & import("../theme").ThemeOutterProps>): { render(): JSX.Element; context: any; setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<Omit<StepsProps, keyof ThemeProps> & import("../theme").ThemeOutterProps>) => {} | Pick<{}, K> | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void; forceUpdate(callback?: (() => void) | undefined): void; readonly props: Readonly<Omit<StepsProps, keyof ThemeProps> & import("../theme").ThemeOutterProps> & Readonly<{ children?: React.ReactNode; }>; state: Readonly<{}>; refs: { [key: string]: React.ReactInstance; }; componentDidMount?(): void; shouldComponentUpdate?(nextProps: Readonly<Omit<StepsProps, keyof ThemeProps> & import("../theme").ThemeOutterProps>, nextState: Readonly<{}>, nextContext: any): boolean; componentWillUnmount?(): void; componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void; getSnapshotBeforeUpdate?(prevProps: Readonly<Omit<StepsProps, keyof ThemeProps> & import("../theme").ThemeOutterProps>, prevState: Readonly<{}>): any; componentDidUpdate?(prevProps: Readonly<Omit<StepsProps, keyof ThemeProps> & import("../theme").ThemeOutterProps>, prevState: Readonly<{}>, snapshot?: any): void; componentWillMount?(): void; UNSAFE_componentWillMount?(): void; componentWillReceiveProps?(nextProps: Readonly<Omit<StepsProps, keyof ThemeProps> & import("../theme").ThemeOutterProps>, nextContext: any): void; UNSAFE_componentWillReceiveProps?(nextProps: Readonly<Omit<StepsProps, keyof ThemeProps> & import("../theme").ThemeOutterProps>, nextContext: any): void; componentWillUpdate?(nextProps: Readonly<Omit<StepsProps, keyof ThemeProps> & import("../theme").ThemeOutterProps>, nextState: Readonly<{}>, nextContext: any): void; UNSAFE_componentWillUpdate?(nextProps: Readonly<Omit<StepsProps, keyof ThemeProps> & import("../theme").ThemeOutterProps>, nextState: Readonly<{}>, nextContext: any): void; }; new (props: Omit<StepsProps, keyof ThemeProps> & import("../theme").ThemeOutterProps, context: any): { render(): JSX.Element; context: any; setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<Omit<StepsProps, keyof ThemeProps> & import("../theme").ThemeOutterProps>) => {} | Pick<{}, K> | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void; forceUpdate(callback?: (() => void) | undefined): void; readonly props: Readonly<Omit<StepsProps, keyof ThemeProps> & import("../theme").ThemeOutterProps> & Readonly<{ children?: React.ReactNode; }>; state: Readonly<{}>; refs: { [key: string]: React.ReactInstance; }; componentDidMount?(): void; shouldComponentUpdate?(nextProps: Readonly<Omit<StepsProps, keyof ThemeProps> & import("../theme").ThemeOutterProps>, nextState: Readonly<{}>, nextContext: any): boolean; componentWillUnmount?(): void; componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void; getSnapshotBeforeUpdate?(prevProps: Readonly<Omit<StepsProps, keyof ThemeProps> & import("../theme").ThemeOutterProps>, prevState: Readonly<{}>): any; componentDidUpdate?(prevProps: Readonly<Omit<StepsProps, keyof ThemeProps> & import("../theme").ThemeOutterProps>, prevState: Readonly<{}>, snapshot?: any): void; componentWillMount?(): void; UNSAFE_componentWillMount?(): void; componentWillReceiveProps?(nextProps: Readonly<Omit<StepsProps, keyof ThemeProps> & import("../theme").ThemeOutterProps>, nextContext: any): void; UNSAFE_componentWillReceiveProps?(nextProps: Readonly<Omit<StepsProps, keyof ThemeProps> & import("../theme").ThemeOutterProps>, nextContext: any): void; componentWillUpdate?(nextProps: Readonly<Omit<StepsProps, keyof ThemeProps> & import("../theme").ThemeOutterProps>, nextState: Readonly<{}>, nextContext: any): void; UNSAFE_componentWillUpdate?(nextProps: Readonly<Omit<StepsProps, keyof ThemeProps> & import("../theme").ThemeOutterProps>, nextState: Readonly<{}>, nextContext: any): void; }; displayName: string; contextType: React.Context<string>; ComposedComponent: React.ComponentType<typeof Steps>; } & import("hoist-non-react-statics").NonReactStatics<typeof Steps, {}> & { ComposedComponent: typeof Steps; }; export default _default;