|
|
@@ -2,6 +2,7 @@
|
|
|
import '@wangeditor/editor/dist/css/style.css'
|
|
|
import { Editor, Toolbar } from '@wangeditor/editor-for-vue'
|
|
|
import { useUserStore } from '@/stores/user'
|
|
|
+import { ACCESS_TOKEN } from '@/utils/constants'
|
|
|
|
|
|
defineOptions({
|
|
|
name: 'ElEditor'
|
|
|
@@ -35,7 +36,7 @@ const editorConfig = {
|
|
|
MENU_CONF: {
|
|
|
uploadImage: {
|
|
|
server: `${import.meta.env.VITE_BASE_API}/file/upload`,
|
|
|
- headers: { 'x-token': userStore.token },
|
|
|
+ headers: { [ACCESS_TOKEN]: userStore.token },
|
|
|
fieldName: 'file',
|
|
|
// 自定义插入图片
|
|
|
customInsert(res: any, insertFn: Function) {
|