@keyblade/tinymce-editor-vue2 1.0.1 → 1.0.2
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.
- package/README.md +7 -5
- package/es/types.d.ts +2 -2
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -52,11 +52,13 @@ Vue.use(TinymceEditor, {
|
|
|
52
52
|
/** 1.x.x版本新增 */
|
|
53
53
|
action: '/api/man/uploadFile/uploadSingleFile',
|
|
54
54
|
handlerResponse: (response: any) => {
|
|
55
|
-
return {
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
55
|
+
return new Promise((resolve) => {
|
|
56
|
+
resolve({
|
|
57
|
+
success: !!response?.data.fileUrl,
|
|
58
|
+
url: response?.data.fileUrl,
|
|
59
|
+
errorMessage: response?.data.fileUrl ? undefined : response?.msg
|
|
60
|
+
})
|
|
61
|
+
})
|
|
60
62
|
},
|
|
61
63
|
headers: (parameters: { file: File | Blob, extParameters: Record<string, any> }) => {
|
|
62
64
|
console.log(parameters)
|
package/es/types.d.ts
CHANGED
|
@@ -33,11 +33,11 @@ export interface ImageUploadOptions {
|
|
|
33
33
|
extParameters?: Record<string, any>;
|
|
34
34
|
}) => Record<string, any>;
|
|
35
35
|
/** 响应处理(启用必传) */
|
|
36
|
-
handlerResponse?: (response: any) => {
|
|
36
|
+
handlerResponse?: (response: any) => Promise<{
|
|
37
37
|
success: boolean;
|
|
38
38
|
url?: string;
|
|
39
39
|
errorMessage?: string;
|
|
40
|
-
}
|
|
40
|
+
}>;
|
|
41
41
|
/** 图片上传请求处理(图片粘贴、复制时调用) */
|
|
42
42
|
handleRequest?: (file: File, filename: string, options?: {
|
|
43
43
|
extParameters?: Record<string, any>;
|
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": "1.0.
|
|
5
|
+
"version": "1.0.2",
|
|
6
6
|
"private": false,
|
|
7
7
|
"type": "module",
|
|
8
8
|
"main": "es/index.js",
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
},
|
|
28
28
|
"peerDependencies": {
|
|
29
29
|
"vue": "^2.7.0",
|
|
30
|
-
"@keyblade/pro-components-vue2": "^1.12.
|
|
30
|
+
"@keyblade/pro-components-vue2": "^1.12.7"
|
|
31
31
|
},
|
|
32
32
|
"scripts": {
|
|
33
33
|
"build": "vite build",
|