@ebl-vue/editor-full 1.1.3 → 1.1.5

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ebl-vue/editor-full",
3
- "version": "1.1.3",
3
+ "version": "1.1.5",
4
4
  "type": "module",
5
5
  "author": "lrj525@sina.com",
6
6
  "description": "结构化编辑器",
@@ -45,7 +45,7 @@ import ImageTool from "../../plugins/imageTool";
45
45
  import {ImageToolTune } from "../../plugins/imageResizeCrop";
46
46
 
47
47
  const EblEditorSettings: IEblEditorSettings | undefined = inject("EblEditorSettings");
48
-
48
+ console.log("EblEditorSettings",EblEditorSettings);
49
49
  defineOptions({
50
50
  name: 'EblEditor',
51
51
  inheritAttrs: false
@@ -136,7 +136,7 @@ export default class ImageTool implements BlockTool {
136
136
  onPreview: (src: string) => {
137
137
  this.ui.showPreloader(src);
138
138
  },
139
- noSelectedFile:()=>{
139
+ noSelectedFile: () => {
140
140
  this.noSelectedFile();
141
141
  }
142
142
  });
@@ -104,12 +104,13 @@ export default class Uploader {
104
104
  headers[tokenName] = tokenPrefix + " " + token
105
105
  }
106
106
  }
107
+ headers["Content-Type"] = "application/json";
107
108
  const axiosInstance: AxiosInstance = axios.create({
108
109
  timeout: 1800000,
109
110
  headers: headers,
110
111
  });
111
- headers["Content-Type"] = "application/json";
112
-
112
+
113
+ //console.log("this.config.endpoints", this.config.endpoints);
113
114
  const uploadBodyRes = await axiosInstance.post(this.config.endpoints.byFile!, {
114
115
  "fileName": file.name,
115
116
  "contentType": file.type
@@ -127,15 +128,17 @@ export default class Uploader {
127
128
  cdn = uploadRes.data.cdn;
128
129
  objectKey = uploadRes.data.objectKey;
129
130
 
130
-
131
- headers["Content-Type"] = file.type;
132
-
133
- let upload = axiosInstance.put(uploadRes.data.presignedUrl, file);
134
-
135
-
131
+ //headers["Content-Type"] = file.type;
132
+
133
+ const axiosUpload: AxiosInstance = axios.create({
134
+ timeout: 1800000,
135
+ headers: { "Content-Type": file.type }
136
+ });
137
+ let upload = axiosUpload.put(uploadRes.data.presignedUrl, file);
136
138
 
137
139
 
138
140
  upload.then((response) => {
141
+
139
142
  if (response.status === 200) {
140
143
  response = {
141
144
  success: 1,