@keyblade/tinymce-editor-vue2 0.0.12-alpha.10 → 0.0.12-alpha.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +32 -0
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -107,6 +107,38 @@ import { oneTravelImageCheck, oneTravelImageCompressor } from '@keyblade/tinymce
107
107
  // oneTravelImageCompressor: 一码游图片压缩工具
108
108
  ```
109
109
 
110
+ ```typescript
111
+ export async function oneTravelImageCheck(data: File | Blob, options?: {
112
+ imageMaxSize?: number;
113
+ imageAllowedMineType?: string[]
114
+ imageMinWidth?: number;
115
+ imageMinHeight?: number;
116
+ imageMaxWidth?: number;
117
+ imageMaxHeight?: number;
118
+ }): Promise<{
119
+ /** 是否成功 */
120
+ success: boolean;
121
+ /** 处理完成的文件(有可能不需要处理) */
122
+ file?: File | Blob;
123
+ /** 失败 */
124
+ error?: {
125
+ size?: boolean;
126
+ format?: boolean;
127
+ pixel?: boolean;
128
+ message?: string
129
+ }
130
+ }> {}
131
+
132
+ export async function oneTravelImageCompressor(data: File | Blob): Promise<{
133
+ // 文件
134
+ file: File | Blob,
135
+ // 是否经过处理(没有处理的话,会返回原 file 对象)
136
+ hasConversion: boolean;
137
+ success: boolean;
138
+ errorMessage?: string
139
+ }>{}
140
+ ```
141
+
110
142
  ## 三、Api
111
143
  ### 1.全局属性
112
144
  ```typescript
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@keyblade/tinymce-editor-vue2",
3
3
  "description": "KeyBlade Tinymce Editor Vue2",
4
4
  "author": "yangshuai <704807396@qq.com>",
5
- "version": "0.0.12-alpha.10",
5
+ "version": "0.0.12-alpha.11",
6
6
  "private": false,
7
7
  "type": "module",
8
8
  "main": "es/index.js",