@moluoxixi/ajax-package 0.0.51 → 0.0.52

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -47,6 +47,10 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
47
47
  type: BooleanConstructor;
48
48
  default: boolean;
49
49
  };
50
+ baseApi: {
51
+ type: ObjectConstructor;
52
+ required: true;
53
+ };
50
54
  }>, () => import('vue').VNode<import('vue').RendererNode, import('vue').RendererElement, {
51
55
  [key: string]: any;
52
56
  }>, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
@@ -103,6 +107,10 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
103
107
  type: BooleanConstructor;
104
108
  default: boolean;
105
109
  };
110
+ baseApi: {
111
+ type: ObjectConstructor;
112
+ required: true;
113
+ };
106
114
  }>> & Readonly<{
107
115
  onClose?: (() => any) | undefined;
108
116
  onConfirm?: ((data: any) => any) | undefined;
package/es/index.mjs CHANGED
@@ -2,9 +2,9 @@
2
2
  "use strict";
3
3
  try {
4
4
  if (typeof document !== "undefined") {
5
- if (!document.getElementById("c3461b9e-b5cd-4c9d-80e0-89cc777f094e")) {
5
+ if (!document.getElementById("4c7bf6b0-7b05-4c2b-a8dd-12bdc93f67e9")) {
6
6
  var elementStyle = document.createElement("style");
7
- elementStyle.id = "c3461b9e-b5cd-4c9d-80e0-89cc777f094e";
7
+ elementStyle.id = "4c7bf6b0-7b05-4c2b-a8dd-12bdc93f67e9";
8
8
  elementStyle.appendChild(document.createTextNode("._root_11p33_1 .el-dialog__header {\n padding: 0 12px 12px;\n}\n\n._root_11p33_1 .el-dialog__body {\n border-top: 1px solid #e5e7eb;\n border-bottom: 1px solid #e5e7eb;\n padding: 0 12px;\n}\n\n._root_11p33_1 .el-dialog__footer {\n padding: 0 12px;\n}"));
9
9
  document.head.appendChild(elementStyle);
10
10
  }
@@ -7535,7 +7535,6 @@ const _BaseHttpClient = class _BaseHttpClient {
7535
7535
  this.containerId = `ajaxPackage-container-${targetElementId}`;
7536
7536
  this.popoverContainerId = `ajaxPackage-popover-${targetElementId}`;
7537
7537
  this.messageContainerId = `ajaxPackage-message-${targetElementId}`;
7538
- /* @__PURE__ */ console.log("333333333333333333333", this.messageContainerId);
7539
7538
  }
7540
7539
  let container = document.getElementById(this.containerId);
7541
7540
  if (!container) {
@@ -8033,6 +8032,7 @@ const _BaseApi = class _BaseApi extends BaseHttpClient {
8033
8032
  props: {
8034
8033
  title: "系统异常信息",
8035
8034
  width: 600,
8035
+ baseApi: this,
8036
8036
  ...errorInfoData
8037
8037
  }
8038
8038
  }).then((result) => {
@@ -8489,6 +8489,10 @@ const SystemErrorDialog = defineComponent({
8489
8489
  modelValue: {
8490
8490
  type: Boolean,
8491
8491
  default: false
8492
+ },
8493
+ baseApi: {
8494
+ type: Object,
8495
+ required: true
8492
8496
  }
8493
8497
  },
8494
8498
  emits: {
@@ -8525,15 +8529,7 @@ const SystemErrorDialog = defineComponent({
8525
8529
  { label: "请求URL路径", value: props.requestUrl },
8526
8530
  { label: "链路ID", value: props.traceId }
8527
8531
  ]);
8528
- const baseApi = new BaseApi({
8529
- baseURL: "/ompBase",
8530
- responseFields: {
8531
- code: "statusCode",
8532
- message: "message",
8533
- data: "object"
8534
- },
8535
- enableSystemErrorDialog: false
8536
- });
8532
+ const { baseApi } = props;
8537
8533
  function handleClose() {
8538
8534
  emit("close");
8539
8535
  emit("update:modelValue", false);
@@ -8549,7 +8545,7 @@ const SystemErrorDialog = defineComponent({
8549
8545
  function getAjaxPackagePopoverContainer() {
8550
8546
  if (typeof document === "undefined")
8551
8547
  return null;
8552
- return document.getElementById("ajaxPackage-popover");
8548
+ return (baseApi == null ? void 0 : baseApi.popoverContainerId) ? document.getElementById(baseApi == null ? void 0 : baseApi.popoverContainerId) : null;
8553
8549
  }
8554
8550
  function showMessage(options) {
8555
8551
  const container = getAjaxPackageMessageContainer();
@@ -8613,7 +8609,7 @@ const SystemErrorDialog = defineComponent({
8613
8609
  return typeof props.width === "number" ? `${props.width}px` : props.width;
8614
8610
  });
8615
8611
  return () => {
8616
- getAjaxPackagePopoverContainer();
8612
+ const popoverContainer = getAjaxPackagePopoverContainer();
8617
8613
  return h(
8618
8614
  ElDialog,
8619
8615
  {
@@ -8624,6 +8620,7 @@ const SystemErrorDialog = defineComponent({
8624
8620
  "closeOnClickModal": false,
8625
8621
  "closeOnPressEscape": false,
8626
8622
  "style": { padding: "16px 0" },
8623
+ "appendTo": popoverContainer || void 0,
8627
8624
  "onUpdate:modelValue": handleModelValueChange
8628
8625
  },
8629
8626
  {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@moluoxixi/ajax-package",
3
- "version": "0.0.51",
3
+ "version": "0.0.52",
4
4
  "description": "AjaxPackage 组件",
5
5
  "sideEffects": [
6
6
  "*.css",