///
import React from 'react';
import { LocaleProps } from 'amis-core';
import { ThemeProps } from 'amis-core';
export interface MultilineTextProps extends ThemeProps, LocaleProps {
/**
* 最大行数
*/
maxRows?: number;
/**
* 展示文本
*/
text: string;
/**
* 展开按钮文本
*/
expendButtonText?: string;
/**
* 收起按钮文本
*/
collapseButtonText?: string;
}
export interface MultilineTextState {
isExpend: boolean;
showBtn: boolean;
}
export declare class MultilineText extends React.Component {
static defaultProps: {
maxRows: number;
expendButtonText: string;
collapseButtonText: string;
};
state: {
isExpend: boolean;
showBtn: boolean;
};
ref?: React.RefObject;
constructor(props: MultilineTextProps);
componentDidMount(): void;
shouldComponentUpdate(nextProps: Readonly, nextState: Readonly, nextContext: any): boolean;
componentDidUpdate(oldProps: any, oldState: any): void;
toggleExpend(): void;
render(): React.JSX.Element | null;
}
declare const _default: {
new (props: Omit, "classPrefix" | "classnames" | "className" | "theme" | "mobileUI" | "style" | "text"> & {
maxRows?: number | undefined;
expendButtonText?: string | undefined;
collapseButtonText?: string | undefined;
} & {} & {
locale?: string | undefined;
translate?: ((str: string, ...args: any[]) => string) | undefined;
}, keyof ThemeProps> & import("packages/amis-core/lib/theme").ThemeOuterProps): {
ref: any;
childRef(ref: any): void;
getWrappedInstance(): any;
render(): React.JSX.Element;
context: unknown;
setState(state: {} | ((prevState: Readonly<{}>, props: Readonly, "classPrefix" | "classnames" | "className" | "theme" | "mobileUI" | "style" | "text"> & {
maxRows?: number | undefined;
expendButtonText?: string | undefined;
collapseButtonText?: string | undefined;
} & {} & {
locale?: string | undefined;
translate?: ((str: string, ...args: any[]) => string) | undefined;
}, keyof ThemeProps> & import("packages/amis-core/lib/theme").ThemeOuterProps>) => {} | Pick<{}, K> | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void;
forceUpdate(callback?: (() => void) | undefined): void;
readonly props: Readonly, "classPrefix" | "classnames" | "className" | "theme" | "mobileUI" | "style" | "text"> & {
maxRows?: number | undefined;
expendButtonText?: string | undefined;
collapseButtonText?: string | undefined;
} & {} & {
locale?: string | undefined;
translate?: ((str: string, ...args: any[]) => string) | undefined;
}, keyof ThemeProps> & import("packages/amis-core/lib/theme").ThemeOuterProps>;
state: Readonly<{}>;
refs: {
[key: string]: React.ReactInstance;
};
componentDidMount?(): void;
shouldComponentUpdate?(nextProps: Readonly, "classPrefix" | "classnames" | "className" | "theme" | "mobileUI" | "style" | "text"> & {
maxRows?: number | undefined;
expendButtonText?: string | undefined;
collapseButtonText?: string | undefined;
} & {} & {
locale?: string | undefined;
translate?: ((str: string, ...args: any[]) => string) | undefined;
}, keyof ThemeProps> & import("packages/amis-core/lib/theme").ThemeOuterProps>, nextState: Readonly<{}>, nextContext: any): boolean;
componentWillUnmount?(): void;
componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void;
getSnapshotBeforeUpdate?(prevProps: Readonly, "classPrefix" | "classnames" | "className" | "theme" | "mobileUI" | "style" | "text"> & {
maxRows?: number | undefined;
expendButtonText?: string | undefined;
collapseButtonText?: string | undefined;
} & {} & {
locale?: string | undefined;
translate?: ((str: string, ...args: any[]) => string) | undefined;
}, keyof ThemeProps> & import("packages/amis-core/lib/theme").ThemeOuterProps>, prevState: Readonly<{}>): any;
componentDidUpdate?(prevProps: Readonly, "classPrefix" | "classnames" | "className" | "theme" | "mobileUI" | "style" | "text"> & {
maxRows?: number | undefined;
expendButtonText?: string | undefined;
collapseButtonText?: string | undefined;
} & {} & {
locale?: string | undefined;
translate?: ((str: string, ...args: any[]) => string) | undefined;
}, keyof ThemeProps> & import("packages/amis-core/lib/theme").ThemeOuterProps>, prevState: Readonly<{}>, snapshot?: any): void;
componentWillMount?(): void;
UNSAFE_componentWillMount?(): void;
componentWillReceiveProps?(nextProps: Readonly, "classPrefix" | "classnames" | "className" | "theme" | "mobileUI" | "style" | "text"> & {
maxRows?: number | undefined;
expendButtonText?: string | undefined;
collapseButtonText?: string | undefined;
} & {} & {
locale?: string | undefined;
translate?: ((str: string, ...args: any[]) => string) | undefined;
}, keyof ThemeProps> & import("packages/amis-core/lib/theme").ThemeOuterProps>, nextContext: any): void;
UNSAFE_componentWillReceiveProps?(nextProps: Readonly, "classPrefix" | "classnames" | "className" | "theme" | "mobileUI" | "style" | "text"> & {
maxRows?: number | undefined;
expendButtonText?: string | undefined;
collapseButtonText?: string | undefined;
} & {} & {
locale?: string | undefined;
translate?: ((str: string, ...args: any[]) => string) | undefined;
}, keyof ThemeProps> & import("packages/amis-core/lib/theme").ThemeOuterProps>, nextContext: any): void;
componentWillUpdate?(nextProps: Readonly, "classPrefix" | "classnames" | "className" | "theme" | "mobileUI" | "style" | "text"> & {
maxRows?: number | undefined;
expendButtonText?: string | undefined;
collapseButtonText?: string | undefined;
} & {} & {
locale?: string | undefined;
translate?: ((str: string, ...args: any[]) => string) | undefined;
}, keyof ThemeProps> & import("packages/amis-core/lib/theme").ThemeOuterProps>, nextState: Readonly<{}>, nextContext: any): void;
UNSAFE_componentWillUpdate?(nextProps: Readonly, "classPrefix" | "classnames" | "className" | "theme" | "mobileUI" | "style" | "text"> & {
maxRows?: number | undefined;
expendButtonText?: string | undefined;
collapseButtonText?: string | undefined;
} & {} & {
locale?: string | undefined;
translate?: ((str: string, ...args: any[]) => string) | undefined;
}, keyof ThemeProps> & import("packages/amis-core/lib/theme").ThemeOuterProps>, nextState: Readonly<{}>, nextContext: any): void;
};
displayName: string;
contextType: React.Context;
ComposedComponent: React.ComponentType<{
new (props: Pick, "classPrefix" | "classnames" | "className" | "theme" | "mobileUI" | "style" | "text"> & {
maxRows?: number | undefined;
expendButtonText?: string | undefined;
collapseButtonText?: string | undefined;
} & {} & {
locale?: string | undefined;
translate?: ((str: string, ...args: any[]) => string) | undefined;
}): {
ref: any;
childRef(ref: any): void;
getWrappedInstance(): any;
render(): React.JSX.Element;
context: unknown;
setState(state: {} | ((prevState: Readonly<{}>, props: Readonly, "classPrefix" | "classnames" | "className" | "theme" | "mobileUI" | "style" | "text"> & {
maxRows?: number | undefined;
expendButtonText?: string | undefined;
collapseButtonText?: string | undefined;
} & {} & {
locale?: string | undefined;
translate?: ((str: string, ...args: any[]) => string) | undefined;
}>) => {} | Pick<{}, K_1> | null) | Pick<{}, K_1> | null, callback?: (() => void) | undefined): void;
forceUpdate(callback?: (() => void) | undefined): void;
readonly props: Readonly, "classPrefix" | "classnames" | "className" | "theme" | "mobileUI" | "style" | "text"> & {
maxRows?: number | undefined;
expendButtonText?: string | undefined;
collapseButtonText?: string | undefined;
} & {} & {
locale?: string | undefined;
translate?: ((str: string, ...args: any[]) => string) | undefined;
}>;
state: Readonly<{}>;
refs: {
[key: string]: React.ReactInstance;
};
componentDidMount?(): void;
shouldComponentUpdate?(nextProps: Readonly, "classPrefix" | "classnames" | "className" | "theme" | "mobileUI" | "style" | "text"> & {
maxRows?: number | undefined;
expendButtonText?: string | undefined;
collapseButtonText?: string | undefined;
} & {} & {
locale?: string | undefined;
translate?: ((str: string, ...args: any[]) => string) | undefined;
}>, nextState: Readonly<{}>, nextContext: any): boolean;
componentWillUnmount?(): void;
componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void;
getSnapshotBeforeUpdate?(prevProps: Readonly, "classPrefix" | "classnames" | "className" | "theme" | "mobileUI" | "style" | "text"> & {
maxRows?: number | undefined;
expendButtonText?: string | undefined;
collapseButtonText?: string | undefined;
} & {} & {
locale?: string | undefined;
translate?: ((str: string, ...args: any[]) => string) | undefined;
}>, prevState: Readonly<{}>): any;
componentDidUpdate?(prevProps: Readonly, "classPrefix" | "classnames" | "className" | "theme" | "mobileUI" | "style" | "text"> & {
maxRows?: number | undefined;
expendButtonText?: string | undefined;
collapseButtonText?: string | undefined;
} & {} & {
locale?: string | undefined;
translate?: ((str: string, ...args: any[]) => string) | undefined;
}>, prevState: Readonly<{}>, snapshot?: any): void;
componentWillMount?(): void;
UNSAFE_componentWillMount?(): void;
componentWillReceiveProps?(nextProps: Readonly, "classPrefix" | "classnames" | "className" | "theme" | "mobileUI" | "style" | "text"> & {
maxRows?: number | undefined;
expendButtonText?: string | undefined;
collapseButtonText?: string | undefined;
} & {} & {
locale?: string | undefined;
translate?: ((str: string, ...args: any[]) => string) | undefined;
}>, nextContext: any): void;
UNSAFE_componentWillReceiveProps?(nextProps: Readonly, "classPrefix" | "classnames" | "className" | "theme" | "mobileUI" | "style" | "text"> & {
maxRows?: number | undefined;
expendButtonText?: string | undefined;
collapseButtonText?: string | undefined;
} & {} & {
locale?: string | undefined;
translate?: ((str: string, ...args: any[]) => string) | undefined;
}>, nextContext: any): void;
componentWillUpdate?(nextProps: Readonly, "classPrefix" | "classnames" | "className" | "theme" | "mobileUI" | "style" | "text"> & {
maxRows?: number | undefined;
expendButtonText?: string | undefined;
collapseButtonText?: string | undefined;
} & {} & {
locale?: string | undefined;
translate?: ((str: string, ...args: any[]) => string) | undefined;
}>, nextState: Readonly<{}>, nextContext: any): void;
UNSAFE_componentWillUpdate?(nextProps: Readonly, "classPrefix" | "classnames" | "className" | "theme" | "mobileUI" | "style" | "text"> & {
maxRows?: number | undefined;
expendButtonText?: string | undefined;
collapseButtonText?: string | undefined;
} & {} & {
locale?: string | undefined;
translate?: ((str: string, ...args: any[]) => string) | undefined;
}>, nextState: Readonly<{}>, nextContext: any): void;
};
displayName: string;
contextType: React.Context;
ComposedComponent: React.ComponentType;
} & import("hoist-non-react-statics").NonReactStatics & {
ComposedComponent: typeof MultilineText;
}>;
} & import("hoist-non-react-statics").NonReactStatics<{
new (props: Pick, "classPrefix" | "classnames" | "className" | "theme" | "mobileUI" | "style" | "text"> & {
maxRows?: number | undefined;
expendButtonText?: string | undefined;
collapseButtonText?: string | undefined;
} & {} & {
locale?: string | undefined;
translate?: ((str: string, ...args: any[]) => string) | undefined;
}): {
ref: any;
childRef(ref: any): void;
getWrappedInstance(): any;
render(): React.JSX.Element;
context: unknown;
setState(state: {} | ((prevState: Readonly<{}>, props: Readonly, "classPrefix" | "classnames" | "className" | "theme" | "mobileUI" | "style" | "text"> & {
maxRows?: number | undefined;
expendButtonText?: string | undefined;
collapseButtonText?: string | undefined;
} & {} & {
locale?: string | undefined;
translate?: ((str: string, ...args: any[]) => string) | undefined;
}>) => {} | Pick<{}, K_1> | null) | Pick<{}, K_1> | null, callback?: (() => void) | undefined): void;
forceUpdate(callback?: (() => void) | undefined): void;
readonly props: Readonly, "classPrefix" | "classnames" | "className" | "theme" | "mobileUI" | "style" | "text"> & {
maxRows?: number | undefined;
expendButtonText?: string | undefined;
collapseButtonText?: string | undefined;
} & {} & {
locale?: string | undefined;
translate?: ((str: string, ...args: any[]) => string) | undefined;
}>;
state: Readonly<{}>;
refs: {
[key: string]: React.ReactInstance;
};
componentDidMount?(): void;
shouldComponentUpdate?(nextProps: Readonly, "classPrefix" | "classnames" | "className" | "theme" | "mobileUI" | "style" | "text"> & {
maxRows?: number | undefined;
expendButtonText?: string | undefined;
collapseButtonText?: string | undefined;
} & {} & {
locale?: string | undefined;
translate?: ((str: string, ...args: any[]) => string) | undefined;
}>, nextState: Readonly<{}>, nextContext: any): boolean;
componentWillUnmount?(): void;
componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void;
getSnapshotBeforeUpdate?(prevProps: Readonly, "classPrefix" | "classnames" | "className" | "theme" | "mobileUI" | "style" | "text"> & {
maxRows?: number | undefined;
expendButtonText?: string | undefined;
collapseButtonText?: string | undefined;
} & {} & {
locale?: string | undefined;
translate?: ((str: string, ...args: any[]) => string) | undefined;
}>, prevState: Readonly<{}>): any;
componentDidUpdate?(prevProps: Readonly, "classPrefix" | "classnames" | "className" | "theme" | "mobileUI" | "style" | "text"> & {
maxRows?: number | undefined;
expendButtonText?: string | undefined;
collapseButtonText?: string | undefined;
} & {} & {
locale?: string | undefined;
translate?: ((str: string, ...args: any[]) => string) | undefined;
}>, prevState: Readonly<{}>, snapshot?: any): void;
componentWillMount?(): void;
UNSAFE_componentWillMount?(): void;
componentWillReceiveProps?(nextProps: Readonly, "classPrefix" | "classnames" | "className" | "theme" | "mobileUI" | "style" | "text"> & {
maxRows?: number | undefined;
expendButtonText?: string | undefined;
collapseButtonText?: string | undefined;
} & {} & {
locale?: string | undefined;
translate?: ((str: string, ...args: any[]) => string) | undefined;
}>, nextContext: any): void;
UNSAFE_componentWillReceiveProps?(nextProps: Readonly, "classPrefix" | "classnames" | "className" | "theme" | "mobileUI" | "style" | "text"> & {
maxRows?: number | undefined;
expendButtonText?: string | undefined;
collapseButtonText?: string | undefined;
} & {} & {
locale?: string | undefined;
translate?: ((str: string, ...args: any[]) => string) | undefined;
}>, nextContext: any): void;
componentWillUpdate?(nextProps: Readonly, "classPrefix" | "classnames" | "className" | "theme" | "mobileUI" | "style" | "text"> & {
maxRows?: number | undefined;
expendButtonText?: string | undefined;
collapseButtonText?: string | undefined;
} & {} & {
locale?: string | undefined;
translate?: ((str: string, ...args: any[]) => string) | undefined;
}>, nextState: Readonly<{}>, nextContext: any): void;
UNSAFE_componentWillUpdate?(nextProps: Readonly, "classPrefix" | "classnames" | "className" | "theme" | "mobileUI" | "style" | "text"> & {
maxRows?: number | undefined;
expendButtonText?: string | undefined;
collapseButtonText?: string | undefined;
} & {} & {
locale?: string | undefined;
translate?: ((str: string, ...args: any[]) => string) | undefined;
}>, nextState: Readonly<{}>, nextContext: any): void;
};
displayName: string;
contextType: React.Context;
ComposedComponent: React.ComponentType;
} & import("hoist-non-react-statics").NonReactStatics & {
ComposedComponent: typeof MultilineText;
}, {}> & {
ComposedComponent: {
new (props: Pick, "classPrefix" | "classnames" | "className" | "theme" | "mobileUI" | "style" | "text"> & {
maxRows?: number | undefined;
expendButtonText?: string | undefined;
collapseButtonText?: string | undefined;
} & {} & {
locale?: string | undefined;
translate?: ((str: string, ...args: any[]) => string) | undefined;
}): {
ref: any;
childRef(ref: any): void;
getWrappedInstance(): any;
render(): React.JSX.Element;
context: unknown;
setState(state: {} | ((prevState: Readonly<{}>, props: Readonly, "classPrefix" | "classnames" | "className" | "theme" | "mobileUI" | "style" | "text"> & {
maxRows?: number | undefined;
expendButtonText?: string | undefined;
collapseButtonText?: string | undefined;
} & {} & {
locale?: string | undefined;
translate?: ((str: string, ...args: any[]) => string) | undefined;
}>) => {} | Pick<{}, K_1> | null) | Pick<{}, K_1> | null, callback?: (() => void) | undefined): void;
forceUpdate(callback?: (() => void) | undefined): void;
readonly props: Readonly, "classPrefix" | "classnames" | "className" | "theme" | "mobileUI" | "style" | "text"> & {
maxRows?: number | undefined;
expendButtonText?: string | undefined;
collapseButtonText?: string | undefined;
} & {} & {
locale?: string | undefined;
translate?: ((str: string, ...args: any[]) => string) | undefined;
}>;
state: Readonly<{}>;
refs: {
[key: string]: React.ReactInstance;
};
componentDidMount?(): void;
shouldComponentUpdate?(nextProps: Readonly, "classPrefix" | "classnames" | "className" | "theme" | "mobileUI" | "style" | "text"> & {
maxRows?: number | undefined;
expendButtonText?: string | undefined;
collapseButtonText?: string | undefined;
} & {} & {
locale?: string | undefined;
translate?: ((str: string, ...args: any[]) => string) | undefined;
}>, nextState: Readonly<{}>, nextContext: any): boolean;
componentWillUnmount?(): void;
componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void;
getSnapshotBeforeUpdate?(prevProps: Readonly, "classPrefix" | "classnames" | "className" | "theme" | "mobileUI" | "style" | "text"> & {
maxRows?: number | undefined;
expendButtonText?: string | undefined;
collapseButtonText?: string | undefined;
} & {} & {
locale?: string | undefined;
translate?: ((str: string, ...args: any[]) => string) | undefined;
}>, prevState: Readonly<{}>): any;
componentDidUpdate?(prevProps: Readonly, "classPrefix" | "classnames" | "className" | "theme" | "mobileUI" | "style" | "text"> & {
maxRows?: number | undefined;
expendButtonText?: string | undefined;
collapseButtonText?: string | undefined;
} & {} & {
locale?: string | undefined;
translate?: ((str: string, ...args: any[]) => string) | undefined;
}>, prevState: Readonly<{}>, snapshot?: any): void;
componentWillMount?(): void;
UNSAFE_componentWillMount?(): void;
componentWillReceiveProps?(nextProps: Readonly, "classPrefix" | "classnames" | "className" | "theme" | "mobileUI" | "style" | "text"> & {
maxRows?: number | undefined;
expendButtonText?: string | undefined;
collapseButtonText?: string | undefined;
} & {} & {
locale?: string | undefined;
translate?: ((str: string, ...args: any[]) => string) | undefined;
}>, nextContext: any): void;
UNSAFE_componentWillReceiveProps?(nextProps: Readonly, "classPrefix" | "classnames" | "className" | "theme" | "mobileUI" | "style" | "text"> & {
maxRows?: number | undefined;
expendButtonText?: string | undefined;
collapseButtonText?: string | undefined;
} & {} & {
locale?: string | undefined;
translate?: ((str: string, ...args: any[]) => string) | undefined;
}>, nextContext: any): void;
componentWillUpdate?(nextProps: Readonly, "classPrefix" | "classnames" | "className" | "theme" | "mobileUI" | "style" | "text"> & {
maxRows?: number | undefined;
expendButtonText?: string | undefined;
collapseButtonText?: string | undefined;
} & {} & {
locale?: string | undefined;
translate?: ((str: string, ...args: any[]) => string) | undefined;
}>, nextState: Readonly<{}>, nextContext: any): void;
UNSAFE_componentWillUpdate?(nextProps: Readonly, "classPrefix" | "classnames" | "className" | "theme" | "mobileUI" | "style" | "text"> & {
maxRows?: number | undefined;
expendButtonText?: string | undefined;
collapseButtonText?: string | undefined;
} & {} & {
locale?: string | undefined;
translate?: ((str: string, ...args: any[]) => string) | undefined;
}>, nextState: Readonly<{}>, nextContext: any): void;
};
displayName: string;
contextType: React.Context;
ComposedComponent: React.ComponentType;
} & import("hoist-non-react-statics").NonReactStatics & {
ComposedComponent: typeof MultilineText;
};
};
export default _default;