@keyblade/tinymce-editor-vue2 0.1.1 → 1.0.0

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/es/index.d.ts CHANGED
@@ -6,8 +6,6 @@ interface TinymceEditorGlobalOptions {
6
6
  options?: RawEditorOptions;
7
7
  /** 图片上传选项 */
8
8
  imageUploadOptions?: ImageUploadOptions;
9
- /** imgPond选项 */
10
- imgPondOptions?: Record<string, any>;
11
9
  /** 音频上传选项 */
12
10
  audioUploadOptions?: AudioUploadOptions;
13
11
  /** 视频上传选项 */
@@ -15,6 +13,10 @@ interface TinymceEditorGlobalOptions {
15
13
  }
16
14
  declare const globalProps: TinymceEditorGlobalOptions;
17
15
  declare const TinymceEditor: import('vue/types/v3-component-public-instance').ComponentPublicInstanceConstructor<import('vue/types/v3-component-public-instance').Vue3Instance<{}, Readonly<import('vue').ExtractPropTypes<{
16
+ options: {
17
+ type: import('vue').PropType<Partial<RawEditorOptions>>;
18
+ default: () => {};
19
+ };
18
20
  value: {
19
21
  type: import('vue').PropType<string>;
20
22
  default: string;
@@ -27,16 +29,9 @@ declare const TinymceEditor: import('vue/types/v3-component-public-instance').Co
27
29
  type: import('vue').PropType<Record<string, any>>;
28
30
  default: () => {};
29
31
  };
30
- options: {
31
- type: import('vue').PropType<Partial<RawEditorOptions>>;
32
- default: () => {};
33
- };
34
32
  imageUploadOptions: {
35
33
  type: import('vue').PropType<ImageUploadOptions>;
36
34
  };
37
- imgPondOptions: {
38
- type: import('vue').PropType<Record<string, any>>;
39
- };
40
35
  audioUploadOptions: {
41
36
  type: import('vue').PropType<AudioUploadOptions>;
42
37
  };
@@ -49,6 +44,10 @@ declare const TinymceEditor: import('vue/types/v3-component-public-instance').Co
49
44
  }) => void>;
50
45
  };
51
46
  }>>, Readonly<import('vue').ExtractPropTypes<{
47
+ options: {
48
+ type: import('vue').PropType<Partial<RawEditorOptions>>;
49
+ default: () => {};
50
+ };
52
51
  value: {
53
52
  type: import('vue').PropType<string>;
54
53
  default: string;
@@ -61,16 +60,9 @@ declare const TinymceEditor: import('vue/types/v3-component-public-instance').Co
61
60
  type: import('vue').PropType<Record<string, any>>;
62
61
  default: () => {};
63
62
  };
64
- options: {
65
- type: import('vue').PropType<Partial<RawEditorOptions>>;
66
- default: () => {};
67
- };
68
63
  imageUploadOptions: {
69
64
  type: import('vue').PropType<ImageUploadOptions>;
70
65
  };
71
- imgPondOptions: {
72
- type: import('vue').PropType<Record<string, any>>;
73
- };
74
66
  audioUploadOptions: {
75
67
  type: import('vue').PropType<AudioUploadOptions>;
76
68
  };
@@ -85,11 +77,15 @@ declare const TinymceEditor: import('vue/types/v3-component-public-instance').Co
85
77
  }>>, {
86
78
  input: (value: string) => void;
87
79
  }, {
80
+ options: Partial<RawEditorOptions>;
88
81
  value: string;
89
82
  disabled: boolean;
90
83
  extParameters: Record<string, any>;
91
- options: Partial<RawEditorOptions>;
92
84
  }, true, import('vue/types/v3-component-options').ComponentOptionsBase<any, any, any, any, any, any, any, any, any, any>> & Readonly<Readonly<import('vue').ExtractPropTypes<{
85
+ options: {
86
+ type: import('vue').PropType<Partial<RawEditorOptions>>;
87
+ default: () => {};
88
+ };
93
89
  value: {
94
90
  type: import('vue').PropType<string>;
95
91
  default: string;
@@ -102,16 +98,9 @@ declare const TinymceEditor: import('vue/types/v3-component-public-instance').Co
102
98
  type: import('vue').PropType<Record<string, any>>;
103
99
  default: () => {};
104
100
  };
105
- options: {
106
- type: import('vue').PropType<Partial<RawEditorOptions>>;
107
- default: () => {};
108
- };
109
101
  imageUploadOptions: {
110
102
  type: import('vue').PropType<ImageUploadOptions>;
111
103
  };
112
- imgPondOptions: {
113
- type: import('vue').PropType<Record<string, any>>;
114
- };
115
104
  audioUploadOptions: {
116
105
  type: import('vue').PropType<AudioUploadOptions>;
117
106
  };
@@ -124,6 +113,10 @@ declare const TinymceEditor: import('vue/types/v3-component-public-instance').Co
124
113
  }) => void>;
125
114
  };
126
115
  }>>> & import('vue').ShallowUnwrapRef<{}> & import('vue/types/v3-component-options').ExtractComputedReturns<{}> & import('vue').ComponentCustomProperties & Readonly<import('vue').ExtractPropTypes<{
116
+ options: {
117
+ type: import('vue').PropType<Partial<RawEditorOptions>>;
118
+ default: () => {};
119
+ };
127
120
  value: {
128
121
  type: import('vue').PropType<string>;
129
122
  default: string;
@@ -136,16 +129,9 @@ declare const TinymceEditor: import('vue/types/v3-component-public-instance').Co
136
129
  type: import('vue').PropType<Record<string, any>>;
137
130
  default: () => {};
138
131
  };
139
- options: {
140
- type: import('vue').PropType<Partial<RawEditorOptions>>;
141
- default: () => {};
142
- };
143
132
  imageUploadOptions: {
144
133
  type: import('vue').PropType<ImageUploadOptions>;
145
134
  };
146
- imgPondOptions: {
147
- type: import('vue').PropType<Record<string, any>>;
148
- };
149
135
  audioUploadOptions: {
150
136
  type: import('vue').PropType<AudioUploadOptions>;
151
137
  };
@@ -158,6 +144,10 @@ declare const TinymceEditor: import('vue/types/v3-component-public-instance').Co
158
144
  }) => void>;
159
145
  };
160
146
  }>>> & import('vue/types/v3-component-options').ComponentOptionsBase<Readonly<import('vue').ExtractPropTypes<{
147
+ options: {
148
+ type: import('vue').PropType<Partial<RawEditorOptions>>;
149
+ default: () => {};
150
+ };
161
151
  value: {
162
152
  type: import('vue').PropType<string>;
163
153
  default: string;
@@ -170,16 +160,9 @@ declare const TinymceEditor: import('vue/types/v3-component-public-instance').Co
170
160
  type: import('vue').PropType<Record<string, any>>;
171
161
  default: () => {};
172
162
  };
173
- options: {
174
- type: import('vue').PropType<Partial<RawEditorOptions>>;
175
- default: () => {};
176
- };
177
163
  imageUploadOptions: {
178
164
  type: import('vue').PropType<ImageUploadOptions>;
179
165
  };
180
- imgPondOptions: {
181
- type: import('vue').PropType<Record<string, any>>;
182
- };
183
166
  audioUploadOptions: {
184
167
  type: import('vue').PropType<AudioUploadOptions>;
185
168
  };
@@ -194,12 +177,16 @@ declare const TinymceEditor: import('vue/types/v3-component-public-instance').Co
194
177
  }>>, {}, {}, {}, {}, import('vue/types/v3-component-options').ComponentOptionsMixin, import('vue/types/v3-component-options').ComponentOptionsMixin, {
195
178
  input: (value: string) => void;
196
179
  }, string, {
180
+ options: Partial<RawEditorOptions>;
197
181
  value: string;
198
182
  disabled: boolean;
199
183
  extParameters: Record<string, any>;
200
- options: Partial<RawEditorOptions>;
201
184
  }> & {
202
185
  props: {
186
+ options: {
187
+ type: import('vue').PropType<Partial<RawEditorOptions>>;
188
+ default: () => {};
189
+ };
203
190
  value: {
204
191
  type: import('vue').PropType<string>;
205
192
  default: string;
@@ -212,16 +199,9 @@ declare const TinymceEditor: import('vue/types/v3-component-public-instance').Co
212
199
  type: import('vue').PropType<Record<string, any>>;
213
200
  default: () => {};
214
201
  };
215
- options: {
216
- type: import('vue').PropType<Partial<RawEditorOptions>>;
217
- default: () => {};
218
- };
219
202
  imageUploadOptions: {
220
203
  type: import('vue').PropType<ImageUploadOptions>;
221
204
  };
222
- imgPondOptions: {
223
- type: import('vue').PropType<Record<string, any>>;
224
- };
225
205
  audioUploadOptions: {
226
206
  type: import('vue').PropType<AudioUploadOptions>;
227
207
  };
package/es/types.d.ts CHANGED
@@ -1,22 +1,44 @@
1
+ import { ImageUploadCheckOptions, ImageUploadCompressorOptions, ImageUploadCropOptions } from '@keyblade/pro-components-vue2';
2
+
1
3
  /** 图片选项 */
2
4
  export interface ImageUploadOptions {
3
- /** 图片上传组件最大数量 */
4
- maxCount?: number;
5
- /** 图片上传组件下方文字 */
6
- tipText?: string;
7
- /** 图片最大值(单位M,主要用于错误提示) */
8
- maxSize?: number;
9
- /** 图片允许的后缀类型(小写,如: png、jpg) */
10
- allowedType?: string[];
11
- /** 图片最小宽度 */
12
- minWidth?: number;
13
- /** 图片最小高度 */
14
- minHeight?: number;
15
- /** 图片最大宽度 */
16
- maxWidth?: number;
17
- /** 图片最大高度 */
18
- maxHeight?: number;
19
- /** 图片上传请求处理 */
5
+ /** 上传的文件字段名 - 默认: file */
6
+ name?: string;
7
+ /** 接受上传的文件类型 - 默认: ['jpg', 'jpeg', 'png', 'bmp', 'heif', 'heic', 'gif', 'webp'] */
8
+ accept?: string[];
9
+ /** 是否支持多选文件 - 默认: true */
10
+ multiple?: boolean;
11
+ /** 最大允许上传个数 - 默认: 10 */
12
+ limit?: number;
13
+ /** 是否禁用 - 默认: false */
14
+ disabled?: boolean;
15
+ /** 隐藏内置上传文件之前的loading效果 - 默认: false */
16
+ hideInnerBeforeUploadLoading?: boolean;
17
+ /** 校验选项 */
18
+ checkOptions?: ImageUploadCheckOptions;
19
+ /** 压缩选项 */
20
+ compressorOptions?: ImageUploadCompressorOptions;
21
+ /** 剪裁选项 */
22
+ cropOptions?: ImageUploadCropOptions;
23
+ /** 上传地址(启用必传) */
24
+ action?: string;
25
+ /** 请求头 */
26
+ headers?: (parameters: {
27
+ file: File | Blob | undefined;
28
+ extParameters?: Record<string, any>;
29
+ }) => Record<string, any>;
30
+ /** 额外请求体 */
31
+ data?: (parameters: {
32
+ file: File | Blob | undefined;
33
+ extParameters?: Record<string, any>;
34
+ }) => Record<string, any>;
35
+ /** 响应处理(启用必传) */
36
+ handlerResponse?: (response: any) => {
37
+ success: boolean;
38
+ url?: string;
39
+ errorMessage?: string;
40
+ };
41
+ /** 图片上传请求处理(图片粘贴、复制时调用) */
20
42
  handleRequest?: (file: File, filename: string, options?: {
21
43
  extParameters?: Record<string, any>;
22
44
  }) => Promise<{
@@ -24,7 +46,7 @@ export interface ImageUploadOptions {
24
46
  url?: string;
25
47
  errorMessage?: string;
26
48
  }>;
27
- /** 图片URL上传请求处理(前端跨域,交给后端处理) */
49
+ /** 图片URL上传请求处理(图片粘贴、复制时调用,前端跨域,交给后端处理) */
28
50
  handleRequestByUrl?: (url: string, options?: {
29
51
  extParameters?: Record<string, any>;
30
52
  }) => Promise<{
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.1.1",
5
+ "version": "1.0.0",
6
6
  "private": false,
7
7
  "type": "module",
8
8
  "main": "es/index.js",
@@ -27,8 +27,7 @@
27
27
  },
28
28
  "peerDependencies": {
29
29
  "vue": "^2.7.0",
30
- "pic-viewer": "^0.5.1",
31
- "imgpond": "^0.6.2"
30
+ "@keyblade/pro-components-vue2": "^1.12.6"
32
31
  },
33
32
  "scripts": {
34
33
  "build": "vite build",
package/src/index.ts CHANGED
@@ -12,9 +12,6 @@ interface TinymceEditorGlobalOptions {
12
12
  /** 图片上传选项 */
13
13
  imageUploadOptions?: ImageUploadOptions;
14
14
 
15
- /** imgPond选项 */
16
- imgPondOptions?: Record<string, any>;
17
-
18
15
  /** 音频上传选项 */
19
16
  audioUploadOptions?: AudioUploadOptions;
20
17