@cloudtower/eagle 0.33.19 → 0.33.21

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.
@@ -0,0 +1 @@
1
+ export declare const BasicCTErrorStyle: import("@linaria/core").LinariaClassName;
@@ -22,16 +22,16 @@ export interface ErrorContainerRenderProps {
22
22
  errorMsgs: (string | undefined)[];
23
23
  }
24
24
  /**
25
- * CTModalFooterError 组件的 props
25
+ * BasicCTError 组件的 props
26
26
  */
27
- export interface CTModalFooterErrorProps {
27
+ export interface BasicCTErrorProps {
28
28
  /**
29
29
  * 错误对象,支持多种格式的错误
30
30
  * - AxiosError: Axios 请求错误
31
31
  * - CloudTowerErrorResponse: 服务端响应错误
32
32
  * - 其他类型: 会被转换为字符串显示
33
33
  */
34
- error: CTError;
34
+ error: CTError | string;
35
35
  /**
36
36
  * 自定义类名,会应用到错误容器上
37
37
  */
@@ -0,0 +1,3 @@
1
+ import React from "react";
2
+ import { BasicCTErrorProps } from "./BasicCTError.type";
3
+ export declare const BasicCTError: React.FC<BasicCTErrorProps>;
@@ -21,7 +21,7 @@ export * from "./Card";
21
21
  export * from "./Cascader";
22
22
  export * from "./Checkbox";
23
23
  export * from "./ConfigProvider";
24
- export * from "./CTModalFooterError";
24
+ export * from "./BasicCTError";
25
25
  export * from "./DeprecatedProgress";
26
26
  export * from "./DetailCard";
27
27
  export * from "./DonutChart";
@@ -1,7 +1,7 @@
1
1
  import { CTErrorType as CloudTowerErrorResponse } from "../utils/type";
2
2
  import { AxiosError } from "axios";
3
3
  type ParsedCTErrorItem = {
4
- code?: string;
4
+ code?: string | number;
5
5
  params?: CloudTowerErrorResponse["params"];
6
6
  message?: string;
7
7
  } | {
@@ -1,6 +1,6 @@
1
1
  export type { SizeType as Antd5SizeType } from "antd5/lib/config-provider/SizeContext";
2
2
  export type CTErrorType = {
3
- code?: string;
3
+ code?: string | number;
4
4
  /**
5
5
  * @type array | undefined
6
6
  */
@@ -16,9 +16,9 @@ export type CTErrorType = {
16
16
  [key: string]: any;
17
17
  };
18
18
  /**
19
- * @type string | undefined
19
+ * @type string | number | undefined
20
20
  */
21
- reason?: string;
21
+ reason?: string | number;
22
22
  }[];
23
23
  /**
24
24
  * @type string
@@ -1,15 +1,15 @@
1
1
  import { Meta, StoryObj } from "@storybook/react";
2
- import { CTModalFooterError } from "../../../src/core/CTModalFooterError";
2
+ import { BasicCTError } from "../../../src/core/BasicCTError";
3
3
  /**
4
- * CTModalFooterError 组件用于在 Modal 底部显示错误信息,支持多种错误格式和自定义渲染。
4
+ * BasicCTError 用于接受 cloudtower 通用错误并解析
5
5
  *
6
6
  * - 支持多种错误格式(Axios 错误、服务端响应错误等)
7
7
  * - 内置 i18n 支持
8
8
  * - 支持自定义容器和详情渲染器
9
9
  */
10
- declare const meta: Meta<typeof CTModalFooterError>;
10
+ declare const meta: Meta<typeof BasicCTError>;
11
11
  export default meta;
12
- type Story = StoryObj<typeof CTModalFooterError>;
12
+ type Story = StoryObj<typeof BasicCTError>;
13
13
  /**
14
14
  * 基本用法 - 显示简单的错误消息
15
15
  *