|
|
@ -30,10 +30,14 @@ import 'quill/dist/quill.bubble.css'; |
|
|
|
|
|
|
|
export default { |
|
|
|
name: 'QuillEditor', |
|
|
|
|
|
|
|
components: { quillEditor }, |
|
|
|
|
|
|
|
props: { |
|
|
|
/*编辑器的内容*/ |
|
|
|
value: { |
|
|
|
type: String, |
|
|
|
default: '', |
|
|
|
}, |
|
|
|
/*图片大小*/ |
|
|
|
maxSize: { |
|
|
@ -47,10 +51,6 @@ export default { |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
components: { |
|
|
|
quillEditor, |
|
|
|
}, |
|
|
|
|
|
|
|
data() { |
|
|
|
return { |
|
|
|
content: this.value, |
|
|
@ -58,16 +58,10 @@ export default { |
|
|
|
editorOption: { |
|
|
|
theme: 'snow', // or 'bubble' |
|
|
|
placeholder: this.placeholder, |
|
|
|
modules: { |
|
|
|
toolbar: { |
|
|
|
container: toolbarOptions, |
|
|
|
}, |
|
|
|
}, |
|
|
|
modules: { toolbar: { container: toolbarOptions } }, |
|
|
|
}, |
|
|
|
serverUrl: '/v1/blog/imgUpload', // 这里写你要上传的图片服务器地址 |
|
|
|
header: { |
|
|
|
// token: sessionStorage.token |
|
|
|
}, // 有的图片服务器要求请求头需要有token |
|
|
|
header: {}, // token: sessionStorage.token// 有的图片服务器要求请求头需要有token |
|
|
|
}; |
|
|
|
}, |
|
|
|
|
|
|
|