You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
30 lines
657 B
Plaintext
30 lines
657 B
Plaintext
/**
|
|
* @description 上传图片
|
|
* @author wangfupeng
|
|
*/
|
|
import Editor from '../../editor/index';
|
|
declare type ResImgItemType = string | {
|
|
url: string;
|
|
alt?: string;
|
|
href?: string;
|
|
};
|
|
export declare type ResType = {
|
|
errno: number | string;
|
|
data: ResImgItemType[];
|
|
};
|
|
declare class UploadImg {
|
|
private editor;
|
|
constructor(editor: Editor);
|
|
/**
|
|
* 往编辑区域插入图片
|
|
* @param src 图片地址
|
|
*/
|
|
insertImg(src: string, alt?: string, href?: string): void;
|
|
/**
|
|
* 上传图片
|
|
* @param files 文件列表
|
|
*/
|
|
uploadImg(files: FileList | File[]): void;
|
|
}
|
|
export default UploadImg;
|