@flatbiz/pro-layout 4.4.8 → 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/esm/index.js +1 -1
- package/esm/index.js.map +1 -1
- package/index.d.ts +38 -2
- package/package.json +1 -1
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
|
-
|
|
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;
|