@keyblade/tinymce-editor-vue2 0.0.12-alpha.22 → 0.0.12-alpha.24

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 CHANGED
@@ -31,13 +31,9 @@ Vue.use(PicViewer, {})
31
31
  Vue.use(ImgPond, {})
32
32
 
33
33
  Vue.use(TinymceEditor, {
34
+ // 图片
34
35
  imageUploadOptions: {
35
36
  handleRequest: (file: File | Blob, filename: string, parameters: { extParameters: Record<string, any> }) => {
36
- const form = new FormData()
37
- form.append('file', file, filename)
38
- postRequest('/api/man/uploadFile/uploadSingleFile', form).then((res) => {
39
- console.log(res)
40
- })
41
37
  return new Promise((resolve) => {
42
38
  setTimeout(() => {
43
39
  resolve({
@@ -61,7 +57,6 @@ Vue.use(TinymceEditor, {
61
57
  return {}
62
58
  },
63
59
  handlerResponse: (response: any) => {
64
- debugger
65
60
  return { url: response.data, errorMessage: response.msg }
66
61
  }
67
62
  },
@@ -75,9 +70,7 @@ Vue.use(TinymceEditor, {
75
70
  }
76
71
  },
77
72
  data: (parameters: { file: File | Blob, extParameters: Record<string, any> }) => {
78
- return {
79
- a: '1'
80
- }
73
+ return {}
81
74
  },
82
75
  handlerResponse: (response: any) => {
83
76
  return { url: response.data, errorMessage: response.msg }
@@ -142,6 +135,7 @@ interface ComponentOptions {
142
135
 
143
136
  /** 图片上传选项 */
144
137
  imageUploadOptions?: ImageUploadOptions;
138
+
145
139
  /** imgPond选项 */
146
140
  imgPondOptions?: Record<string, any>;
147
141
 
@@ -167,8 +161,6 @@ export interface ImageUploadOptions {
167
161
  maxSize?: number;
168
162
  /** 图片允许的后缀类型(小写,如: png、jpg) */
169
163
  allowedType?: string[];
170
- // /** 图片允许的类型(如: image/png、image/jpg) */
171
- // allowedMineType?: string[];
172
164
  /** 图片最小宽度 */
173
165
  minWidth?: number;
174
166
  /** 图片最小高度 */
package/es/editor.vue2.js CHANGED
@@ -319,7 +319,7 @@ const ra = /* @__PURE__ */ ge({
319
319
  if (u.hasTransform) {
320
320
  l = u.file;
321
321
  const G = s == null ? void 0 : s.split(".");
322
- G.pop(), s = `${G.join(",")}.jpeg`;
322
+ G.pop(), s = `${G.join(",")}.jpg`;
323
323
  }
324
324
  const p = await K(l);
325
325
  if (!p.success)
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.22",
5
+ "version": "0.0.12-alpha.24",
6
6
  "private": false,
7
7
  "type": "module",
8
8
  "main": "es/index.js",