UNPKG

522 BTypeScriptView Raw
1/**
2 * @description 上传图片
3 * @author wangfupeng
4 */
5import Editor from '../../editor/index';
6export declare type ResType = {
7 errno: number | string;
8 data: string[];
9};
10declare class UploadImg {
11 private editor;
12 constructor(editor: Editor);
13 /**
14 * 往编辑区域插入图片
15 * @param src 图片地址
16 */
17 insertImg(src: string): void;
18 /**
19 * 上传图片
20 * @param files 文件列表
21 */
22 uploadImg(files: FileList | File[]): void;
23}
24export default UploadImg;