diff --git a/examples/sites/demos/apis/fluent-editor.js b/examples/sites/demos/apis/fluent-editor.js index 5a27195b8..6399cf3ed 100644 --- a/examples/sites/demos/apis/fluent-editor.js +++ b/examples/sites/demos/apis/fluent-editor.js @@ -38,6 +38,18 @@ export default { mode: ['pc', 'mobile-first'], pcDemo: 'disabled' }, + { + name: 'image-upload', + typeAnchorName: 'IImageUploadOptions', + type: 'IImageUploadOptions', + defaultValue: '', + desc: { + 'zh-CN': '图片上传模块配置项', + 'en-US': '' + }, + mode: ['pc', 'mobile-first'], + pcDemo: 'image-upload' + }, { name: 'modelValue / v-model', type: 'string', @@ -48,11 +60,51 @@ export default { }, mode: ['pc', 'mobile-first'], pcDemo: 'basic-usage' + }, + { + name: 'options', + type: 'object', + defaultValue: "", + desc: { + 'zh-CN': '编辑器配置项,参考 Quill 文档', + 'en-US': '' + }, + mode: ['pc', 'mobile-first'], + pcDemo: 'options' + }, + { + name: 'zIndex', + type: 'number', + defaultValue: "", + desc: { + 'zh-CN': '编辑器的 z-index', + 'en-US': '' + }, + mode: ['pc', 'mobile-first'], + pcDemo: 'basic-usage' } ], events: [], methods: [], slots: [] } + ], + types: [ + { + name: 'IImageUploadOptions', + type: 'interface', + code: ` +interface IImageUploadOptions { + url: string, // 图片上传地址 + method: string, // 上传方法 + name: string, // 图片名称 + withCredentials: boolean, // 是否需要认证,开启后会在请求里带上 cookie 信息 + headers: object, // 上传请求头部信息 + csrf: string, // 请求 csrf 携带信息 + success: (serverResponse: { file: { downloadUrl: string } }[], next: (imageUrl: string) => void) => void, // 上传成功回调信息 + fail: (serverError: string) => void // 上传失败回调信息 +} + ` + }, ] } diff --git a/examples/sites/demos/mobile-first/app/fluent-editor/basic-usage.vue b/examples/sites/demos/mobile-first/app/fluent-editor/basic-usage.vue index d08482596..ffd04f585 100644 --- a/examples/sites/demos/mobile-first/app/fluent-editor/basic-usage.vue +++ b/examples/sites/demos/mobile-first/app/fluent-editor/basic-usage.vue @@ -1,6 +1,6 @@