@flatbiz/pro-layout 4.0.0 → 4.0.2
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.
- package/cjs/index.css +95 -278
- package/cjs/index.js +1 -1
- package/cjs/index.js.map +1 -1
- package/index.d.ts +46 -6
- package/package.json +2 -3
package/index.d.ts
CHANGED
|
@@ -70,11 +70,34 @@ export declare type TAdminUser = null | {
|
|
|
70
70
|
};
|
|
71
71
|
export interface TRouteItemProps {
|
|
72
72
|
path: string;
|
|
73
|
-
element: ReactElement | null;
|
|
74
|
-
redirect?: string
|
|
73
|
+
element: ReactElement | ComponentType | null;
|
|
74
|
+
redirect?: string;
|
|
75
75
|
caseSensitive?: boolean;
|
|
76
76
|
}
|
|
77
77
|
export declare type BootstrapOptions = {
|
|
78
|
+
/**
|
|
79
|
+
* ```
|
|
80
|
+
* 1. 正常用法
|
|
81
|
+
* [{
|
|
82
|
+
* path: '/module/page',
|
|
83
|
+
* element: <Text />
|
|
84
|
+
* },{
|
|
85
|
+
* path: '*',
|
|
86
|
+
* redirect: '/module/page'
|
|
87
|
+
* }]
|
|
88
|
+
*
|
|
89
|
+
* 2. 懒加载用法
|
|
90
|
+
* [{
|
|
91
|
+
* path: '/module/page',
|
|
92
|
+
* element: lazy(() => import(\/* webpackChunkName: "xxx/xxx/module/chunks/page" *\/ './page')),
|
|
93
|
+
* },{
|
|
94
|
+
* path: '*',
|
|
95
|
+
* redirect: '/module/page'
|
|
96
|
+
* }]
|
|
97
|
+
*
|
|
98
|
+
* 3. 如果配置中 没有path = '*',程序会在路由中添加 <Route path="*" element={<NotFound />} />
|
|
99
|
+
* ```
|
|
100
|
+
*/
|
|
78
101
|
routeList: TRouteItemProps[];
|
|
79
102
|
breads?: BreadsData;
|
|
80
103
|
/**
|
|
@@ -178,9 +201,13 @@ export declare type BootstrapOptions = {
|
|
|
178
201
|
hideDefaultBread?: boolean;
|
|
179
202
|
headerThemeConfig?: {
|
|
180
203
|
bgColor?: string;
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
204
|
+
textColor?: string;
|
|
205
|
+
menuActiveBgColor?: string;
|
|
206
|
+
menuActiveTextColor?: string;
|
|
207
|
+
menuSelectedBgColor?: string;
|
|
208
|
+
menuSelectedTextColor?: string;
|
|
209
|
+
menuColor?: string;
|
|
210
|
+
menuTextFontSize?: number;
|
|
184
211
|
};
|
|
185
212
|
sidebarThemeConfig?: {
|
|
186
213
|
bgColor?: string;
|
|
@@ -189,6 +216,8 @@ export declare type BootstrapOptions = {
|
|
|
189
216
|
menuSelectedBgColor?: string;
|
|
190
217
|
menuSelectedTextColor?: string;
|
|
191
218
|
menuColor?: string;
|
|
219
|
+
menuTextFontSize?: number;
|
|
220
|
+
menuItemHeight?: number;
|
|
192
221
|
/**
|
|
193
222
|
* 默认值 16
|
|
194
223
|
*/
|
|
@@ -202,7 +231,19 @@ export declare type BootstrapOptions = {
|
|
|
202
231
|
* 是否隐藏侧边栏中收缩按键
|
|
203
232
|
*/
|
|
204
233
|
hideSidebarShrink?: boolean;
|
|
234
|
+
/**
|
|
235
|
+
* 自定义全局风格
|
|
236
|
+
* 如果项目通过本地引入源代码的方式,此配置不生效
|
|
237
|
+
*/
|
|
205
238
|
configProviderProps?: ConfigProviderProps;
|
|
239
|
+
/**
|
|
240
|
+
* 配置theme后 sidebarThemeConfig 配置失效
|
|
241
|
+
*/
|
|
242
|
+
sidebarMenuConfigProviderProps?: Omit<ConfigProviderProps, "locale">;
|
|
243
|
+
/**
|
|
244
|
+
* 配置theme后 headerThemeConfig 配置失效
|
|
245
|
+
*/
|
|
246
|
+
topMenuConfigProviderProps?: Omit<ConfigProviderProps, "locale">;
|
|
206
247
|
};
|
|
207
248
|
export declare type LayoutCtxProps = {
|
|
208
249
|
sidebarWidth: number;
|
|
@@ -254,7 +295,6 @@ export declare type IframeHandler<T = unknown> = (data: T) => void;
|
|
|
254
295
|
* @example
|
|
255
296
|
* ```tsx
|
|
256
297
|
* const iframeApi = useIframe<MessageData>((data) => {
|
|
257
|
-
* console.log('onMainMessageReceived', data.name);
|
|
258
298
|
* updateMessage(data);
|
|
259
299
|
* });
|
|
260
300
|
*
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@flatbiz/pro-layout",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.2",
|
|
4
4
|
"description": "WEB菜单布局",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"typings": "index.d.ts",
|
|
@@ -56,6 +56,5 @@
|
|
|
56
56
|
"react-dom": "18.2.0",
|
|
57
57
|
"react-router": "^6.4.4",
|
|
58
58
|
"react-router-dom": "^6.4.4"
|
|
59
|
-
}
|
|
60
|
-
"gitHead": "5381ba2486f8ee1fdfb6ff8957b82166f69a1b0c"
|
|
59
|
+
}
|
|
61
60
|
}
|