@fe-free/core 1.0.1 → 1.0.3

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
+ ## 1.0.3
4
+
5
+ ### Patch Changes
6
+
7
+ - feat: 优化 crud
8
+ - @fe-free/tool@1.0.3
9
+
10
+ ## 1.0.2
11
+
12
+ ### Patch Changes
13
+
14
+ - Updated dependencies
15
+ - @fe-free/tool@1.0.2
16
+
3
17
  ## 1.0.1
4
18
 
5
19
  ### Patch Changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fe-free/core",
3
- "version": "1.0.1",
3
+ "version": "1.0.3",
4
4
  "description": "",
5
5
  "main": "./src/index.ts",
6
6
  "author": "",
@@ -29,7 +29,7 @@
29
29
  "react-syntax-highlighter": "^15.5.0",
30
30
  "vanilla-jsoneditor": "^0.23.1",
31
31
  "zustand": "^4.5.4",
32
- "@fe-free/tool": "1.0.1"
32
+ "@fe-free/tool": "1.0.3"
33
33
  },
34
34
  "peerDependencies": {
35
35
  "@ant-design/pro-components": "^2.7.15",
package/src/crud/crud.tsx CHANGED
@@ -34,6 +34,8 @@ interface CRUDProps {
34
34
  readProps?: {
35
35
  /** 文本 */
36
36
  operateText?: string;
37
+ /** 打开方式, action 为 read_detail 有效 */
38
+ target?: '_blank';
37
39
  };
38
40
 
39
41
  /** 删除接口 */
@@ -172,7 +174,10 @@ const CRUD = forwardRef<CRUDMethods, CRUDProps>(function CRUD(props, ref) {
172
174
  />
173
175
  )}
174
176
  {actions.includes('read_detail') && (
175
- <Link to={`${location.pathname}/detail/${record[detailIdIndex || 'id']}`}>
177
+ <Link
178
+ to={`${location.pathname}/detail/${record[detailIdIndex || 'id']}`}
179
+ target={readProps?.target}
180
+ >
176
181
  {readProps?.operateText || '查看'}
177
182
  </Link>
178
183
  )}