diff --git a/src/components/Editor/utils/helpers.js b/src/components/Editor/utils/helpers.js index a791bf0d..14613213 100644 --- a/src/components/Editor/utils/helpers.js +++ b/src/components/Editor/utils/helpers.js @@ -2,8 +2,8 @@ * 重写插入图片插件 * @param editHandler {Function} edit 事件 */ -export const overrideImagePlugin = (editHandler) => { - KindEditor.plugin('image', function (K) { +export const overrideImagePlugin = editHandler => { + window.KindEditor.plugin('image', function (K) { this.plugin.image = { edit: editHandler, delete: () => { diff --git a/src/components/Uploader/index.vue b/src/components/Uploader/index.vue index ce240c23..f14e1aeb 100644 --- a/src/components/Uploader/index.vue +++ b/src/components/Uploader/index.vue @@ -10,7 +10,8 @@ :on-format-error="handleFormatError" :on-exceeded-size="handleMaxSize" :before-upload="handleBeforeUpload" - action="//jsonplaceholder.typicode.com/posts/"> + :headers="headers" + action="//localhost:3002/apis/v1/files"> @@ -31,6 +32,8 @@