|
|
|
@ -111,7 +111,7 @@ defineOptions({ name: '快捷问题管理' }) |
|
|
|
|
// 富文本编辑器相关 |
|
|
|
|
const editorRef = ref(null) |
|
|
|
|
const toolbarConfig = ref({}) |
|
|
|
|
// 富文本编辑器配置(核心修改) |
|
|
|
|
// 富文本编辑器配置 |
|
|
|
|
const editorConfig = ref({ |
|
|
|
|
placeholder: '请输入问题内容...', |
|
|
|
|
MENU_CONF: { |
|
|
|
@ -122,12 +122,13 @@ const editorConfig = ref({ |
|
|
|
|
headers: { |
|
|
|
|
'token': getToken() |
|
|
|
|
}, |
|
|
|
|
onFailed: (file, err, res) => { |
|
|
|
|
console.error('上传回调失败', file, err, res) |
|
|
|
|
}, |
|
|
|
|
// Add upload progress callback for debugging |
|
|
|
|
onProgress: (progress) => { |
|
|
|
|
console.log('Upload progress:', progress) |
|
|
|
|
// 自定义处理后端返回的数据 |
|
|
|
|
customInsert(res, insertFn) { |
|
|
|
|
if (res.code === 200 && res.data && res.data.url) { |
|
|
|
|
insertFn(res.data.url); |
|
|
|
|
} else { |
|
|
|
|
ElMessage.error(`上传失败: ${res.msg || '未知错误'}`); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
uploadVideo: { |
|
|
|
@ -137,8 +138,13 @@ const editorConfig = ref({ |
|
|
|
|
headers: { |
|
|
|
|
'token': getToken() |
|
|
|
|
}, |
|
|
|
|
onProgress: (progress) => { |
|
|
|
|
console.log('Upload progress:', progress) |
|
|
|
|
// 自定义处理后端返回的数据 |
|
|
|
|
customInsert(res, insertFn) { |
|
|
|
|
if (res.code === 200 && res.data && res.data.url) { |
|
|
|
|
insertFn(res.data.url); |
|
|
|
|
} else { |
|
|
|
|
ElMessage.error(`上传失败: ${res.msg || '未知错误'}`); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|