We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8b0a00b commit 9e688c6Copy full SHA for 9e688c6
web/src/components/richtext/rich-edit.vue
@@ -27,6 +27,7 @@
27
28
import { ElMessage } from 'element-plus'
29
import { getUrl } from '@/utils/image'
30
+ import { useUserStore } from '@/pinia/modules/user'
31
32
const emits = defineEmits(['change', 'update:modelValue'])
33
@@ -35,6 +36,7 @@
35
36
emits('update:modelValue', valueHtml.value)
37
}
38
39
+ const userStore = useUserStore()
40
const props = defineProps({
41
modelValue: {
42
type: String,
@@ -53,6 +55,9 @@
53
55
editorConfig.MENU_CONF['uploadImage'] = {
54
56
fieldName: 'file',
57
server: basePath + '/fileUploadAndDownload/upload?noSave=1',
58
+ headers: {
59
+ 'x-token': userStore.token,
60
+ },
61
customInsert(res, insertFn) {
62
if (res.code === 0) {
63
const urlPath = getUrl(res.data.file.url)
0 commit comments