react-toolkits 2.32.4 → 2.32.6

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/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # react-toolkits
2
2
 
3
+ ## 2.32.6
4
+
5
+ ### Patch Changes
6
+
7
+ - 86f0a3b: fix: conditionally render RequireGame component in Layout
8
+
9
+ ## 2.32.5
10
+
11
+ ### Patch Changes
12
+
13
+ - a08a7f2: feat: enhance GameSelect and Layout components with onChange callback
14
+
3
15
  ## 2.32.4
4
16
 
5
17
  ### Patch Changes
package/lib/index.d.ts CHANGED
@@ -309,6 +309,7 @@ type NavItem = Exclude<ItemType, SubMenuType | MenuItemGroupType | MenuItemType>
309
309
  interface GameSelectProps<T extends Game = Game> {
310
310
  filter?: (game: T) => boolean;
311
311
  options?: (data?: T[]) => SelectProps['options'];
312
+ onChange?: (value: string | number) => void;
312
313
  }
313
314
 
314
315
  /** Header 扩展项配置 */
@@ -344,6 +345,8 @@ interface GameSelectConfig<T extends Game = Game> {
344
345
  options?: GameSelectProps<T>['options'];
345
346
  /** 在这些路由路径下隐藏游戏选择器(支持 PathPattern 对象或正则表达式) */
346
347
  hideOnRoutes?: RouteMatchRule[];
348
+ /** 游戏切换时的回调函数 */
349
+ onChange?: (value: string | number) => void;
347
350
  }
348
351
  /** Layout 组件属性 */
349
352
  interface LayoutProps<T extends Game = Game> {