zhangwencui
14 小时以前 6345dd63ca8f534b2d50e3d31231b8a04bfcd4ab
src/main.js
@@ -27,14 +27,7 @@
import "./permission"; // permission control
import { useDict } from "@/utils/dict";
import {
  parseTime,
  resetForm,
  addDateRange,
  handleTree,
  selectDictLabel,
  selectDictLabels,
} from "@/utils/ruoyi";
import { parseTime, resetForm, addDateRange, handleTree, selectDictLabel, selectDictLabels } from "@/utils/ruoyi";
// 分页组件
import Pagination from "@/components/Pagination";
@@ -58,11 +51,7 @@
import PageHeader from "@/components/PageHeader/index.vue";
import { getToken } from "@/utils/auth";
import {
  calculateTaxExclusiveTotalPrice,
  summarizeTable,
  calculateTaxIncludeTotalPrice,
} from "@/utils/summarizeTable.js";
import { calculateTaxExclusiveTotalPrice, summarizeTable, calculateTaxIncludeTotalPrice } from "@/utils/summarizeTable.js";
const app = createApp(App);
@@ -72,16 +61,14 @@
app.config.globalProperties.parseTime = parseTime;
app.config.globalProperties.resetForm = resetForm;
app.config.globalProperties.summarizeTable = summarizeTable;
app.config.globalProperties.calculateTaxExclusiveTotalPrice =
  calculateTaxExclusiveTotalPrice;
app.config.globalProperties.calculateTaxIncludeTotalPrice =
  calculateTaxIncludeTotalPrice;
app.config.globalProperties.calculateTaxExclusiveTotalPrice = calculateTaxExclusiveTotalPrice;
app.config.globalProperties.calculateTaxIncludeTotalPrice = calculateTaxIncludeTotalPrice;
app.config.globalProperties.handleTree = handleTree;
app.config.globalProperties.addDateRange = addDateRange;
app.config.globalProperties.selectDictLabel = selectDictLabel;
app.config.globalProperties.selectDictLabels = selectDictLabels;
app.config.globalProperties.javaApi = __BASE_API__;
app.config.globalProperties.HaveJson = (val) => {
app.config.globalProperties.HaveJson = val => {
  return JSON.parse(JSON.stringify(val));
};
app.config.globalProperties.uploadHeader = {
@@ -115,5 +102,21 @@
  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");