best-unit 1.2.13 → 1.2.15

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.
@@ -17,6 +17,11 @@ export enum Env {
17
17
  PRODUCTION = "production",
18
18
  }
19
19
 
20
+ export enum Size {
21
+ SMALL = "small",
22
+ MEDIUM = "medium",
23
+ }
24
+
20
25
  // 类型定义
21
26
  export interface BalanceData {
22
27
  fundBalanceId: string;
@@ -43,15 +48,22 @@ export interface InitParams {
43
48
  theme?: Theme;
44
49
  locale?: Locale;
45
50
  env: Env;
51
+ size?: Size;
46
52
  themeConfig?: ThemeConfig;
47
53
  }
48
54
 
49
55
  export interface ThemeConfig {
50
56
  white?: {
51
57
  color?: string;
58
+ fontSize?: number;
52
59
  };
53
60
  dark?: {
54
61
  color?: string;
62
+ fontSize?: number;
63
+ };
64
+ global?: {
65
+ size?: Size;
66
+ fontSize?: number;
55
67
  };
56
68
  }
57
69
 
@@ -68,6 +80,7 @@ export declare function initFundUnit(params: {
68
80
  theme?: Theme;
69
81
  locale?: Locale;
70
82
  env: Env;
83
+ size?: Size;
71
84
  themeConfig?: ThemeConfig;
72
85
  }): {
73
86
  token: string;
@@ -77,6 +90,7 @@ export declare function initFundUnit(params: {
77
90
  theme?: Theme;
78
91
  locale: Locale;
79
92
  env: Env;
93
+ size?: Size;
80
94
  themeConfig?: ThemeConfig;
81
95
  };
82
96
 
@@ -16,6 +16,10 @@ export enum Env {
16
16
  PRODUCTION = "production",
17
17
  }
18
18
 
19
+ export enum Size {
20
+ SMALL = "small",
21
+ MEDIUM = "medium",
22
+ }
19
23
 
20
24
  export interface ThemeConfig {
21
25
  white?: {
@@ -1,6 +1,6 @@
1
1
  import { getAllDicts, getBalance } from "@/api";
2
2
  import { resetHttpInstance } from "@/api/axiosInstance";
3
- import { Locale, Theme, type Env } from "@/types";
3
+ import { Locale, Size, Theme, type Env } from "@/types";
4
4
 
5
5
  // 余额数据结构接口
6
6
  export interface BalanceData {
@@ -37,6 +37,7 @@ export interface InitParams {
37
37
  theme?: Theme;
38
38
  locale?: Locale;
39
39
  env: Env;
40
+ size?: Size;
40
41
  themeConfig?: ThemeConfig;
41
42
  }
42
43
 
@@ -59,6 +60,7 @@ export function initFundUnit(params: InitParams) {
59
60
  theme = Theme.WHITE,
60
61
  locale = Locale.ZH,
61
62
  env,
63
+ size,
62
64
  themeConfig,
63
65
  } = params;
64
66
  const token = "Bearer " + params.token;
@@ -73,6 +75,7 @@ export function initFundUnit(params: InitParams) {
73
75
  theme,
74
76
  locale,
75
77
  env,
78
+ size,
76
79
  themeConfig,
77
80
  })
78
81
  );
@@ -89,6 +92,7 @@ export function initFundUnit(params: InitParams) {
89
92
  theme,
90
93
  locale,
91
94
  env,
95
+ size,
92
96
  };
93
97
  }
94
98