删除富文本中不用的插件,新增商品上传提示
parent
f0882793e4
commit
5218388eff
|
@ -1,29 +1,25 @@
|
||||||
import plugins from "./plugins";
|
import plugins from "./plugins";
|
||||||
import toobar from "./toolbar";
|
import toobar from "./toolbar";
|
||||||
import { upLoadFile } from "@/api/common";
|
import { upLoadFileMethods } from "@/api/common";
|
||||||
|
|
||||||
export const initEditor = {
|
export const initEditor = {
|
||||||
height: "400px",
|
height: "400px",
|
||||||
language: "zh_CN",
|
language: "zh_CN",
|
||||||
menubar: "file edit insert view format table", // 菜单:指定应该出现哪些菜单
|
menubar: "file edit view format table", // 菜单:指定应该出现哪些菜单
|
||||||
toolbar: toobar, // 分组工具栏控件
|
toolbar: toobar, // 分组工具栏控件
|
||||||
plugins: plugins, // 插件(比如: advlist | link | image | preview等)
|
plugins: plugins, // 插件(比如: advlist | link | image | preview等)
|
||||||
object_resizing: false, // 是否禁用表格图片大小调整
|
object_resizing: false, // 是否禁用表格图片大小调整
|
||||||
end_container_on_empty_block: true, // enter键 分块
|
end_container_on_empty_block: true, // enter键 分块
|
||||||
powerpaste_word_import: "merge", // 是否保留word粘贴样式 clean | merge
|
powerpaste_word_import: "merge", // 是否保留word粘贴样式 clean | merge
|
||||||
code_dialog_height: 450, // 代码框高度 、宽度
|
|
||||||
code_dialog_width: 1000,
|
|
||||||
advlist_bullet_styles: "square", // 无序列表 有序列表
|
advlist_bullet_styles: "square", // 无序列表 有序列表
|
||||||
maxSize: "2097152", // 设置图片大小
|
maxSize: "2097152", // 设置图片大小
|
||||||
accept: "image/jpeg, image/png", // 设置图片上传规则
|
accept: "image/jpeg, image/png", // 设置图片上传规则
|
||||||
images_upload_handler: async function (blobInfo, success, failure) {
|
images_upload_handler: async function (blobInfo, success, failure) {
|
||||||
console.log("请求")
|
|
||||||
const formData = new FormData();
|
const formData = new FormData();
|
||||||
formData.append("file", blobInfo.blob());
|
formData.append("file", blobInfo.blob());
|
||||||
try {
|
try {
|
||||||
const res = await upLoadFile(formData);
|
const res = await upLoadFileMethods(formData);
|
||||||
if (res.result) {
|
if (res.result) {
|
||||||
|
|
||||||
success(res.result)
|
success(res.result)
|
||||||
} else {
|
} else {
|
||||||
failure("上传文件有误请稍后重试");
|
failure("上传文件有误请稍后重试");
|
||||||
|
@ -33,7 +29,7 @@ export const initEditor = {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// init_instance_callback: function (editor) {
|
// init_instance_callback: function (editor) {
|
||||||
// var freeTiny = document.querySelector(".tox .tox-notification--in");
|
// var freeTiny = document.querySelector(".tox .tox-notification--in .tox-notification .tox-notification--warning .tox .tox-notification--warning .tox-notifications-container");
|
||||||
// freeTiny.style.display = "none";
|
// freeTiny.style.display = "none";
|
||||||
// },
|
// },
|
||||||
content_style: `
|
content_style: `
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
const toolbar = ['searchreplace bold italic underline strikethrough alignleft aligncenter alignright outdent indent blockquote undo redo removeformat subscript superscript code codesample', 'hr bullist numlist link image charmap preview anchor pagebreak insertdatetime media table emoticons forecolor backcolor ']
|
const toolbar = ['searchreplace bold italic underline strikethrough alignleft aligncenter alignright outdent indent blockquote undo redo removeformat subscript superscript', 'hr bullist numlist link charmap preview pagebreak insertdatetime table emoticons forecolor backcolor ']
|
||||||
export default toolbar
|
export default toolbar
|
||||||
|
|
|
@ -365,4 +365,9 @@ export const editOtherUser = (id, params) => {
|
||||||
return putRequest(`/clerk/${id}`,params);
|
return putRequest(`/clerk/${id}`,params);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 搜索部门 先加入此api防止运行warn
|
||||||
|
*/
|
||||||
|
export const searchDepartment = (params) => {
|
||||||
|
return getRequest("/permission/department/search", params);
|
||||||
|
};
|
||||||
|
|
|
@ -535,6 +535,7 @@
|
||||||
prop="intro"
|
prop="intro"
|
||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
>
|
>
|
||||||
|
<Alert class='editor-alert' type="warning">将文件夹下的图片进行拖拽到文本框内,即可完成单/多图片上传。</Alert>
|
||||||
<editor
|
<editor
|
||||||
ref="editor"
|
ref="editor"
|
||||||
v-model="baseInfoForm.intro"
|
v-model="baseInfoForm.intro"
|
||||||
|
@ -1954,7 +1955,9 @@ export default {
|
||||||
.ivu-select .ivu-select-dropdown {
|
.ivu-select .ivu-select-dropdown {
|
||||||
overflow: hidden !important;
|
overflow: hidden !important;
|
||||||
}
|
}
|
||||||
|
.editor-alert{
|
||||||
|
text-align: left;
|
||||||
|
}
|
||||||
/* .tox-notifications-container{
|
/* .tox-notifications-container{
|
||||||
display: none !important;
|
display: none !important;
|
||||||
} */
|
} */
|
||||||
|
|
|
@ -5,20 +5,17 @@ import { upLoadFileMethods } from "@/api/common";
|
||||||
export const initEditor = {
|
export const initEditor = {
|
||||||
height: "400px",
|
height: "400px",
|
||||||
language: "zh_CN",
|
language: "zh_CN",
|
||||||
menubar: "file edit insert view format table", // 菜单:指定应该出现哪些菜单
|
menubar: "file edit view format table", // 菜单:指定应该出现哪些菜单
|
||||||
toolbar: toobar, // 分组工具栏控件
|
toolbar: toobar, // 分组工具栏控件
|
||||||
plugins: plugins, // 插件(比如: advlist | link | image | preview等)
|
plugins: plugins, // 插件(比如: advlist | link | image | preview等)
|
||||||
object_resizing: false, // 是否禁用表格图片大小调整
|
object_resizing: false, // 是否禁用表格图片大小调整
|
||||||
end_container_on_empty_block: true, // enter键 分块
|
end_container_on_empty_block: true, // enter键 分块
|
||||||
powerpaste_word_import: "merge", // 是否保留word粘贴样式 clean | merge
|
powerpaste_word_import: "merge", // 是否保留word粘贴样式 clean | merge
|
||||||
code_dialog_height: 450, // 代码框高度 、宽度
|
|
||||||
code_dialog_width: 1000,
|
|
||||||
advlist_bullet_styles: "square", // 无序列表 有序列表
|
advlist_bullet_styles: "square", // 无序列表 有序列表
|
||||||
maxSize: "2097152", // 设置图片大小
|
maxSize: "2097152", // 设置图片大小
|
||||||
accept: "image/jpeg, image/png", // 设置图片上传规则
|
accept: "image/jpeg, image/png", // 设置图片上传规则
|
||||||
images_upload_handler: async function (blobInfo, success, failure) {
|
images_upload_handler: async function (blobInfo, success, failure) {
|
||||||
const formData = new FormData();
|
const formData = new FormData();
|
||||||
console.log("请求")
|
|
||||||
formData.append("file", blobInfo.blob());
|
formData.append("file", blobInfo.blob());
|
||||||
try {
|
try {
|
||||||
const res = await upLoadFileMethods(formData);
|
const res = await upLoadFileMethods(formData);
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
const toolbar = ['searchreplace bold italic underline strikethrough alignleft aligncenter alignright outdent indent blockquote undo redo removeformat subscript superscript code codesample', 'hr bullist numlist link image charmap preview anchor pagebreak insertdatetime media table emoticons forecolor backcolor ']
|
const toolbar = ['searchreplace bold italic underline strikethrough alignleft aligncenter alignright outdent indent blockquote undo redo removeformat subscript superscript', 'hr bullist numlist link charmap preview pagebreak insertdatetime table emoticons forecolor backcolor ']
|
||||||
export default toolbar
|
export default toolbar
|
||||||
|
|
Loading…
Reference in New Issue