iview/types/upload.d.ts

135 lines
3 KiB
TypeScript
Raw Normal View History

// Type definitions for iview 3.3.1
// Project: https://github.com/iview/iview
// Definitions by: yangdan
// Definitions: https://github.com/yangdan8/iview.git
import Vue, { VNode } from 'vue';
export declare class Upload extends Vue {
/**
*
*/
action?: string;
/**
*
* @default {}
*/
headers?: object;
/**
*
* @default false
*/
multiple?: boolean;
/**
*
* @default false
*/
paste?: boolean;
2019-03-12 11:30:07 +08:00
/**
*
* @default false
*/
disabled?: boolean;
/**
*
*/
data?: object;
/**
*
* @default file
*/
name?: string;
/**
* cookie
* @default false
*/
'with-credentials'?: boolean;
/**
*
* @default true
*/
'show-upload-list'?: boolean;
/**
* selectdrag
* @default select
*/
type?: 'select' | 'drag';
/**
*
*/
accept?: string;
/**
* accept
* format
* accept input accept
* 使
* @default []
*/
format?: string[];
/**
* kb
*/
'max-size'?: number;
/**
* false Promise
*/
'before-upload'?: Function;
/**
* event, file, fileList
*/
'on-progress'?: Function;
/**
* response, file, fileList
*/
'on-success'?: Function;
/**
* error, file, fileList
*/
'on-error'?: Function;
/**
* file file.response
*/
'on-preview'?: Function;
/**
* file, fileList
*/
'on-remove'?: Function;
/**
* file, fileList
*/
'on-format-error'?: Function;
/**
* file, fileList
*/
'on-exceeded-size'?: Function;
/**
*
* [
* {
* name?: 'img1.jpg',
* url?: 'http://www.xxx.com/img1.jpg'
* },
* {
* name?: 'img2.jpg',
* url?: 'http://www.xxx.com/img2.jpg'
* }
* ]
*/
'default-file-list'?: string[];
/**
*
*/
'clearFiles'(): void;
/**
* slot插槽对象
*/
$slots: {
/**
*
*/
'': VNode[];
/**
*
*/
tip: VNode[];
};
}