ivue-material-plus
Version:
A high quality UI components Library with Vue.js
167 lines (166 loc) • 3.96 kB
TypeScript
import { PropType } from 'vue';
import { Interceptor } from '../../utils/interceptor';
import { isImageFile, getSizeStyle } from '../../utils/helpers';
import { File } from './types/upload-list';
declare const _sfc_main: import("vue").DefineComponent<{
/**
* 上传的文件的列表
*
* @type {Array}
*/
files: {
type: PropType<File[]>;
default: () => any[];
};
/**
* 错误时的图标
*
* @type {String}
*/
failedIcon: {
type: StringConstructor;
default: string;
};
/**
* 是否展示删除按钮
*
* @type {Boolean}
*/
deletable: {
type: BooleanConstructor;
};
/**
* 文件删除前的回调函数,返回 false 可终止文件读取,
* 支持返回 Promise
*
* @type {Function}
*/
beforeDelete: {
type: PropType<Interceptor>;
};
/**
* 标识符,可以在回调函数的第二项参数中获取
*
* @type {Number, String}
*/
name: {
type: (NumberConstructor | StringConstructor)[];
default: string;
};
/**
* 预览图和上传区域的尺寸,默认单位为 px
*
* @type {Number | String}
*/
previewSize: (NumberConstructor | StringConstructor)[];
/**
* 预览图片放大
*
* @type {Boolean}
*/
previewFullImage: {
type: BooleanConstructor;
default: boolean;
};
/**
* 预览图裁剪模式
*
* @type {String}
*/
imageFit: {
type: StringConstructor;
default: string;
};
}, {
prefixCls: string;
imageClass: (file: File) => (string | {
[x: string]: boolean;
})[];
fileStatusClass: (file: File) => (string | {
[x: string]: boolean;
})[];
currentStatus: (item: File) => boolean;
handleRemove: (file: File, index: number) => void;
handleFileData: (file: File, index: number) => void;
isImageFile: typeof isImageFile;
isDeletable: (file: File) => boolean;
imgStyle: (file: File) => {};
getSizeStyle: typeof getSizeStyle;
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
/**
* 上传的文件的列表
*
* @type {Array}
*/
files: {
type: PropType<File[]>;
default: () => any[];
};
/**
* 错误时的图标
*
* @type {String}
*/
failedIcon: {
type: StringConstructor;
default: string;
};
/**
* 是否展示删除按钮
*
* @type {Boolean}
*/
deletable: {
type: BooleanConstructor;
};
/**
* 文件删除前的回调函数,返回 false 可终止文件读取,
* 支持返回 Promise
*
* @type {Function}
*/
beforeDelete: {
type: PropType<Interceptor>;
};
/**
* 标识符,可以在回调函数的第二项参数中获取
*
* @type {Number, String}
*/
name: {
type: (NumberConstructor | StringConstructor)[];
default: string;
};
/**
* 预览图和上传区域的尺寸,默认单位为 px
*
* @type {Number | String}
*/
previewSize: (NumberConstructor | StringConstructor)[];
/**
* 预览图片放大
*
* @type {Boolean}
*/
previewFullImage: {
type: BooleanConstructor;
default: boolean;
};
/**
* 预览图裁剪模式
*
* @type {String}
*/
imageFit: {
type: StringConstructor;
default: string;
};
}>>, {
name: string | number;
files: File[];
failedIcon: string;
deletable: boolean;
previewFullImage: boolean;
imageFit: string;
}>;
export default _sfc_main;