@fe-free/core 3.0.20 → 3.0.22

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,19 @@
1
1
  # @fe-free/core
2
2
 
3
+ ## 3.0.22
4
+
5
+ ### Patch Changes
6
+
7
+ - fix: routeTool
8
+ - @fe-free/tool@3.0.22
9
+
10
+ ## 3.0.21
11
+
12
+ ### Patch Changes
13
+
14
+ - feat: crud
15
+ - @fe-free/tool@3.0.21
16
+
3
17
  ## 3.0.20
4
18
 
5
19
  ### Patch Changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fe-free/core",
3
- "version": "3.0.20",
3
+ "version": "3.0.22",
4
4
  "description": "",
5
5
  "main": "./src/index.ts",
6
6
  "author": "",
@@ -41,7 +41,7 @@
41
41
  "safe-stable-stringify": "^2.5.0",
42
42
  "vanilla-jsoneditor": "^0.23.1",
43
43
  "zustand": "^4.5.4",
44
- "@fe-free/tool": "3.0.20"
44
+ "@fe-free/tool": "3.0.22"
45
45
  },
46
46
  "peerDependencies": {
47
47
  "@ant-design/pro-components": "2.8.9",
package/src/crud/crud.tsx CHANGED
@@ -111,6 +111,7 @@ function CRUD<DataSource extends Record<string, any> = any, Key extends string |
111
111
  const operateColumn = {
112
112
  title: '操作',
113
113
  fixed: 'right',
114
+ align: 'center',
114
115
  width: operateColumnProps?.width || 80,
115
116
  render: function (_, record) {
116
117
  const btns: React.ReactNode[] = [];
@@ -33,7 +33,8 @@ const routeTool = {
33
33
  params?: Record<string, string>;
34
34
  searchParams?: Record<string, string>;
35
35
  }) => {
36
- return `${routeTool.getBaseName()}${generatePath(path, params)}${searchParams ? `?${searchParams.toString()}` : ''}`;
36
+ const sp = new URLSearchParams(searchParams);
37
+ return `${routeTool.getBaseName()}${generatePath(path, params)}${searchParams ? `?${sp.toString()}` : ''}`;
37
38
  },
38
39
  setSearchParams: (sp: Record<string, any>) => {
39
40
  const url = new URL(window.location.href);