@flatbiz/pro-layout 4.4.7 → 4.4.9

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/index.d.ts CHANGED
@@ -83,6 +83,9 @@ export type RouteBreadConfigData = {
83
83
  to?: string | BreadRoutePathFn;
84
84
  /**
85
85
  * 保留的URL query参数. 默认保留 `env`
86
+ * ```
87
+ * 当 A 携带指定参数(例如id)跳转 B,当在B页面点击面包屑回到A希望携带参数id时,则A的面包屑配置为 { name:'xxx', query:['id'] }
88
+ * ```
86
89
  */
87
90
  query?: string[];
88
91
  };
@@ -99,8 +102,41 @@ export interface TRouteItemProps {
99
102
  element: ReactElement | ComponentType | null;
100
103
  redirect?: string;
101
104
  caseSensitive?: boolean;
102
- /** 面包屑配置 */
103
- breadConfig?: string | RouteBreadConfig;
105
+ /**
106
+ * 面包屑配置
107
+ * ```
108
+ * 三种配置方式
109
+ * 1. 直接配置字符串
110
+ * 2. 配置对象 { name:'xxx' }
111
+ * 3. 当存在父子结构的二级路由写法时,需要在此处配置数组,例如:
112
+ * routeList: [
113
+ {
114
+ path: '/home',
115
+ element: lazy(
116
+ () =>
117
+ import(\/* webpackChunkName: "xxx/xxx/module/chunks/home" *\/ './home')
118
+ ),
119
+ breadConfig: [
120
+ { path: '/', breadConfig: '首页' },
121
+ { path: '/detail', breadConfig: '详情' },
122
+ ],
123
+ }]
124
+
125
+ ./home 文件内容
126
+ export default () => {
127
+ return (
128
+ <Routes>
129
+ <Route path="/detail" element={<Detail />} />
130
+ <Route path="/" element={<Home />} />
131
+ </Routes>
132
+ );
133
+ };
134
+ * ```
135
+ */
136
+ breadConfig?: string | RouteBreadConfig | {
137
+ path: string;
138
+ breadConfig: string | RouteBreadConfig;
139
+ }[];
104
140
  }
105
141
  export type BootstrapOptions = {
106
142
  dark?: boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flatbiz/pro-layout",
3
- "version": "4.4.7",
3
+ "version": "4.4.9",
4
4
  "description": "WEB菜单布局",
5
5
  "main": "index.js",
6
6
  "typings": "index.d.ts",