gongchunyi
3 天以前 0a251e40e30e7c8a96d71b3b9b6c459d4dfa4b22
src/main.js
@@ -43,11 +43,13 @@
// 富文本组件
import Editor from "@/components/Editor";
// 文件上传组件
import FileUpload from "@/components/FileUpload";
import FileUpload from "@/components/AttachmentUpload/file";
// 图片上传组件
import ImageUpload from "@/components/ImageUpload";
import ImageUpload from "@/components/AttachmentUpload/image";
// 图片预览组件
import ImagePreview from "@/components/ImagePreview";
import ImagePreview from "@/components/AttachmentPreview/image";
// 附件弹窗组件
import FileListDialog from "@/components/Dialog/FileList.vue";
// 字典标签组件
import DictTag from "@/components/DictTag";
// 表格组件
@@ -92,6 +94,7 @@
app.component("FileUpload", FileUpload);
app.component("ImageUpload", ImageUpload);
app.component("ImagePreview", ImagePreview);
app.component("FileListDialog", FileListDialog);
app.component("RightToolbar", RightToolbar);
app.component("Editor", Editor);
app.component("PIMTable", PIMTable);
@@ -112,5 +115,22 @@
  size: Cookies.get("size") || "default",
});
app._context.components.ElDialog.props.closeOnClickModal.default = false;
const ElTable = app._context.components.ElTable;
if (ElTable?.props?.tooltipOptions) {
  if (ElTable.props.tooltipOptions === Object) {
    ElTable.props.tooltipOptions = {
      type: Object,
      default: () => ({
        appendTo: "body",
      }),
    };
  } else if (typeof ElTable.props.tooltipOptions === "object") {
    ElTable.props.tooltipOptions.default =
      ElTable.props.tooltipOptions.default ||
      (() => ({
        appendTo: "body",
      }));
  }
}
app.mount("#app");