react-viewer/src/ViewerProps.ts
2016-12-28 17:53:34 +08:00

32 lines
787 B
TypeScript
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

export interface ImageDecorator {
src: string;
alt?: string;
}
interface ViewerProps {
/** viewer是否可见 */
visible?: boolean;
/** 点击关闭按钮的回调 */
onClose?: () => void;
/** 需要进行浏览的图片地址集合 */
images?: ImageDecorator[];
/** 当前图像index */
activeIndex?: number;
/** 自定义viewer组件的z-index */
zIndex?: number;
/** viewer渲染的父节点设置后开启inline mode */
container?: HTMLElement;
/** 图片是否可拖动 */
drag?: boolean;
/** 是否显示图片属性 */
attribute?: boolean;
/** 是否显示缩放按钮 */
zoomable?: boolean;
/** 是否显示旋转按钮 */
rotatable?: boolean;
/** 是否显示变换按钮 */
scalable?: boolean;
}
export default ViewerProps;